Differences between ffmpeg and ffplay

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Differences between ffmpeg and ffplay

Michael Koch
I'm still experimenting with the ultrasonic converter. Converting from
one file to another file works without problems:

C:\Users\mkoch\Desktop\Ultrasonic Live>c://ffmpeg/ffmpeg -i
test_15kHz.mp3 -f la
vfi -i aevalsrc="sin(12000*2*PI*t):c=stereo:s=44100" -filter_complex
"[0]volume=
1,highpass=f=12000,highpass=f=12000,highpass=f=12000,highpass=f=12000[sound];[so
und][1]amultiply,lowpass=f=10000,lowpass=f=10000,lowpass=f=10000,lowpass=f=10000
" -y out.mp3

(no console output, because this is working fine)

As the next step, I want to hear the output live on the speakers. I did
use exactly the same command line as above, but I replaced ffmpeg by
ffplay and I omitted the output file. At the end of the console output
is an error message. Can't ffplay handle two inputs? Why doesn't ffplay
accept the command line that works fine with ffmpeg?

C:\Users\mkoch\Desktop\Ultrasonic Live>c://ffmpeg/ffplay -i
test_15kHz.mp3 -f la
vfi -i aevalsrc="sin(12000*2*PI*t):c=stereo:s=44100" -filter_complex
"[0]volume=
1,highpass=f=12000,highpass=f=12000,highpass=f=12000,highpass=f=12000[sound];[so
und][1]amultiply,lowpass=f=10000,lowpass=f=10000,lowpass=f=10000,lowpass=f=10000
"
ffplay version N-92078-g179ed2d2e0 Copyright (c) 2003-2018 the FFmpeg
developers

   built with gcc 8.2.1 (GCC) 20180813
   configuration: --enable-gpl --enable-version3 --enable-sdl2
--enable-fontconfi
g --enable-gnutls --enable-iconv --enable-libass --enable-libbluray
--enable-lib
freetype --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amr
wb --enable-libopenjpeg --enable-libopus --enable-libshine
--enable-libsnappy --
enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx
--enable-l
ibwavpack --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxml2 --
enable-libzimg --enable-lzma --enable-zlib --enable-gmp
--enable-libvidstab --en
able-libvorbis --enable-libvo-amrwbenc --enable-libmysofa
--enable-libspeex --en
able-libxvid --enable-libaom --enable-libmfx --enable-amf
--enable-ffnvcodec --e
nable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec
--enable-dxva2 --enab
le-avisynth
   libavutil      56. 19.101 / 56. 19.101
   libavcodec     58. 31.101 / 58. 31.101
   libavformat    58. 18.103 / 58. 18.103
   libavdevice    58.  4.104 / 58.  4.104
   libavfilter     7. 33.100 /  7. 33.100
   libswscale      5.  2.100 /  5.  2.100
   libswresample   3.  2.100 /  3.  2.100
   libpostproc    55.  2.100 / 55.  2.100
Argument 'aevalsrc=sin(12000*2*PI*t):c=stereo:s=44100' provided as input
filenam
e, but 'test_15kHz.mp3' was already specified.

Michael
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Differences between ffmpeg and ffplay

Moritz Barsnick
On Tue, Oct 02, 2018 at 23:33:04 +0200, Michael Koch wrote:
> As the next step, I want to hear the output live on the speakers. I did
> use exactly the same command line as above, but I replaced ffmpeg by
> ffplay and I omitted the output file. At the end of the console output
> is an error message. Can't ffplay handle two inputs? Why doesn't ffplay
> accept the command line that works fine with ffmpeg?

Indeed, ffplay can't handle multiple inputs that way.

> C:\Users\mkoch\Desktop\Ultrasonic Live>c://ffmpeg/ffplay -i test_15kHz.mp3 -f lavfi -i aevalsrc="sin(12000*2*PI*t):c=stereo:s=44100" -filter_complex "[0]volume=1,highpass=f=12000,highpass=f=12000,highpass=f=12000,highpass=f=12000[sound];[sound][1]amultiply,lowpass=f=10000,lowpass=f=10000,lowpass=f=10000,lowpass=f=10000"

But what you can do is to put both your lavfi source as well as the
input file into a filter chain. ffmpeg provides the "movie" and
"amovie" filter sources for this.

So you can probably do (I'm doing this as a wild guess, without
testing):

$ ffplay -f lavfi "amovie=test_15kHz.mp3[a0]; aevalsrc="sin(12000*2*PI*t):c=stereo:s=44100[a1]; [a0]volume=1,highpass=f=12000,highpass=f=12000,highpass=f=12000,highpass=f=12000[sound];[sound][a1]amultiply,lowpass=f=10000,lowpass=f=10000,lowpass=f=10000,lowpass=f=10000"

(I'm not sure whether you need the "graph" option, or what it's even
good for.)
The "lavfi" input device documentation has some examples.

Moritz
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Differences between ffmpeg and ffplay

Paul B Mahol
In reply to this post by Michael Koch
On 10/2/18, Michael Koch <[hidden email]> wrote:

> I'm still experimenting with the ultrasonic converter. Converting from
> one file to another file works without problems:
>
> C:\Users\mkoch\Desktop\Ultrasonic Live>c://ffmpeg/ffmpeg -i
> test_15kHz.mp3 -f la
> vfi -i aevalsrc="sin(12000*2*PI*t):c=stereo:s=44100" -filter_complex
> "[0]volume=
> 1,highpass=f=12000,highpass=f=12000,highpass=f=12000,highpass=f=12000[sound];[so
> und][1]amultiply,lowpass=f=10000,lowpass=f=10000,lowpass=f=10000,lowpass=f=10000
> " -y out.mp3
>
> (no console output, because this is working fine)
>
> As the next step, I want to hear the output live on the speakers. I did
> use exactly the same command line as above, but I replaced ffmpeg by
> ffplay and I omitted the output file. At the end of the console output
> is an error message. Can't ffplay handle two inputs? Why doesn't ffplay
> accept the command line that works fine with ffmpeg?

You should really, really use mpv, it supports multiple inputs, and
complex filtergraph (unlike ffplay)

mpv test.mp3 -lavfi-complex
"aevalsrc=sin(5000*2*PI*t):c=stereo:s=44100[sine],[aid1]highpass=f=5000,highpass=f=5000,highpass=f=5000,highpass=f=5000[sound],[sound][sine]amultiply,dynaudnorm=m=100,lowpass=f=1000,lowpass=f=10000,lowpass=f=10000,lowpass=f=10000,asplit[ao],showspectrum=scale=log:size=hd720:color=channel[vo]"

>
> C:\Users\mkoch\Desktop\Ultrasonic Live>c://ffmpeg/ffplay -i
> test_15kHz.mp3 -f la
> vfi -i aevalsrc="sin(12000*2*PI*t):c=stereo:s=44100" -filter_complex
> "[0]volume=
> 1,highpass=f=12000,highpass=f=12000,highpass=f=12000,highpass=f=12000[sound];[so
> und][1]amultiply,lowpass=f=10000,lowpass=f=10000,lowpass=f=10000,lowpass=f=10000
> "
> ffplay version N-92078-g179ed2d2e0 Copyright (c) 2003-2018 the FFmpeg
> developers
>
>    built with gcc 8.2.1 (GCC) 20180813
>    configuration: --enable-gpl --enable-version3 --enable-sdl2
> --enable-fontconfi
> g --enable-gnutls --enable-iconv --enable-libass --enable-libbluray
> --enable-lib
> freetype --enable-libmp3lame --enable-libopencore-amrnb
> --enable-libopencore-amr
> wb --enable-libopenjpeg --enable-libopus --enable-libshine
> --enable-libsnappy --
> enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx
> --enable-l
> ibwavpack --enable-libwebp --enable-libx264 --enable-libx265
> --enable-libxml2 --
> enable-libzimg --enable-lzma --enable-zlib --enable-gmp
> --enable-libvidstab --en
> able-libvorbis --enable-libvo-amrwbenc --enable-libmysofa
> --enable-libspeex --en
> able-libxvid --enable-libaom --enable-libmfx --enable-amf
> --enable-ffnvcodec --e
> nable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec
> --enable-dxva2 --enab
> le-avisynth
>    libavutil      56. 19.101 / 56. 19.101
>    libavcodec     58. 31.101 / 58. 31.101
>    libavformat    58. 18.103 / 58. 18.103
>    libavdevice    58.  4.104 / 58.  4.104
>    libavfilter     7. 33.100 /  7. 33.100
>    libswscale      5.  2.100 /  5.  2.100
>    libswresample   3.  2.100 /  3.  2.100
>    libpostproc    55.  2.100 / 55.  2.100
> Argument 'aevalsrc=sin(12000*2*PI*t):c=stereo:s=44100' provided as input
> filenam
> e, but 'test_15kHz.mp3' was already specified.
>
> Michael
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Differences between ffmpeg and ffplay

Michael Koch
Am 03.10.2018 um 10:43 schrieb Paul B Mahol:

> On 10/2/18, Michael Koch <[hidden email]> wrote:
>> I'm still experimenting with the ultrasonic converter. Converting from
>> one file to another file works without problems:
>>
>> C:\Users\mkoch\Desktop\Ultrasonic Live>c://ffmpeg/ffmpeg -i
>> test_15kHz.mp3 -f la
>> vfi -i aevalsrc="sin(12000*2*PI*t):c=stereo:s=44100" -filter_complex
>> "[0]volume=
>> 1,highpass=f=12000,highpass=f=12000,highpass=f=12000,highpass=f=12000[sound];[so
>> und][1]amultiply,lowpass=f=10000,lowpass=f=10000,lowpass=f=10000,lowpass=f=10000
>> " -y out.mp3
>>
>> (no console output, because this is working fine)
>>
>> As the next step, I want to hear the output live on the speakers. I did
>> use exactly the same command line as above, but I replaced ffmpeg by
>> ffplay and I omitted the output file. At the end of the console output
>> is an error message. Can't ffplay handle two inputs? Why doesn't ffplay
>> accept the command line that works fine with ffmpeg?
> You should really, really use mpv, it supports multiple inputs, and
> complex filtergraph (unlike ffplay)
>
> mpv test.mp3 -lavfi-complex
> "aevalsrc=sin(5000*2*PI*t):c=stereo:s=44100[sine],[aid1]highpass=f=5000,highpass=f=5000,highpass=f=5000,highpass=f=5000[sound],[sound][sine]amultiply,dynaudnorm=m=100,lowpass=f=1000,lowpass=f=10000,lowpass=f=10000,lowpass=f=10000,asplit[ao],showspectrum=scale=log:size=hd720:color=channel[vo]"

oh no, I don't want to learn a new command line syntax only to solve
this simple problem.
I have a long ffmpeg command line that's working fine when writing the
output to a file. Is there really no easy way to send the output to the
speakers instead?

Michael
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Differences between ffmpeg and ffplay

Paul B Mahol
On 10/3/18, Michael Koch <[hidden email]> wrote:

> Am 03.10.2018 um 10:43 schrieb Paul B Mahol:
>> On 10/2/18, Michael Koch <[hidden email]> wrote:
>>> I'm still experimenting with the ultrasonic converter. Converting from
>>> one file to another file works without problems:
>>>
>>> C:\Users\mkoch\Desktop\Ultrasonic Live>c://ffmpeg/ffmpeg -i
>>> test_15kHz.mp3 -f la
>>> vfi -i aevalsrc="sin(12000*2*PI*t):c=stereo:s=44100" -filter_complex
>>> "[0]volume=
>>> 1,highpass=f=12000,highpass=f=12000,highpass=f=12000,highpass=f=12000[sound];[so
>>> und][1]amultiply,lowpass=f=10000,lowpass=f=10000,lowpass=f=10000,lowpass=f=10000
>>> " -y out.mp3
>>>
>>> (no console output, because this is working fine)
>>>
>>> As the next step, I want to hear the output live on the speakers. I did
>>> use exactly the same command line as above, but I replaced ffmpeg by
>>> ffplay and I omitted the output file. At the end of the console output
>>> is an error message. Can't ffplay handle two inputs? Why doesn't ffplay
>>> accept the command line that works fine with ffmpeg?
>> You should really, really use mpv, it supports multiple inputs, and
>> complex filtergraph (unlike ffplay)
>>
>> mpv test.mp3 -lavfi-complex
>> "aevalsrc=sin(5000*2*PI*t):c=stereo:s=44100[sine],[aid1]highpass=f=5000,highpass=f=5000,highpass=f=5000,highpass=f=5000[sound],[sound][sine]amultiply,dynaudnorm=m=100,lowpass=f=1000,lowpass=f=10000,lowpass=f=10000,lowpass=f=10000,asplit[ao],showspectrum=scale=log:size=hd720:color=channel[vo]"
>
> oh no, I don't want to learn a new command line syntax only to solve
> this simple problem.
> I have a long ffmpeg command line that's working fine when writing the
> output to a file. Is there really no easy way to send the output to the
> speakers instead?

It is very easy syntax to learn, you can send output directly to
speakers with ffmpeg
too but that is extremly limited funcionality.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Differences between ffmpeg and ffplay

Michael Koch

>> oh no, I don't want to learn a new command line syntax only to solve
>> this simple problem.
>> I have a long ffmpeg command line that's working fine when writing the
>> output to a file. Is there really no easy way to send the output to the
>> speakers instead?
> It is very easy syntax to learn, you can send output directly to
> speakers with ffmpeg
> too but that is extremly limited funcionality.

How can I send the ffmpeg output to the speakers (on a Windows system)?
I would like to test it.

Michael

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Differences between ffmpeg and ffplay

DopeLabs
im not sure if windows has the ability to 'pipe' like a *nix system does.. but this works to pipe the output of ffmpeg to ffplay instead of a file..

hope this helps...

ffmpeg -i test_15kHz.mp3 -filter_complex "volume=1,highpass=f=12000,highpass=f=12000,highpass=f=12000,highpass=f=12000[a0];aevalsrc="sin\(12000*2*PI*t\)":c=stereo:s=44100[a1];[a0][a1]amultiply,lowpass=f=10000,lowpass=f=10000,lowpass=f=10000,lowpass=f=10000" -y -f wav - | ffplay -f wav -

cheers,

DL

> On Oct 3, 2018, at 2:42 27AM, Michael Koch <[hidden email]> wrote:
>
>
>>> oh no, I don't want to learn a new command line syntax only to solve
>>> this simple problem.
>>> I have a long ffmpeg command line that's working fine when writing the
>>> output to a file. Is there really no easy way to send the output to the
>>> speakers instead?
>> It is very easy syntax to learn, you can send output directly to
>> speakers with ffmpeg
>> too but that is extremly limited funcionality.
>
> How can I send the ffmpeg output to the speakers (on a Windows system)? I would like to test it.
>
> Michael
>
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Differences between ffmpeg and ffplay

Michael Koch
Am 03.10.2018 um 12:28 schrieb DopeLabs:
> im not sure if windows has the ability to 'pipe' like a *nix system does.. but this works to pipe the output of ffmpeg to ffplay instead of a file..
>
> hope this helps...
>
> ffmpeg -i test_15kHz.mp3 -filter_complex "volume=1,highpass=f=12000,highpass=f=12000,highpass=f=12000,highpass=f=12000[a0];aevalsrc="sin\(12000*2*PI*t\)":c=stereo:s=44100[a1];[a0][a1]amultiply,lowpass=f=10000,lowpass=f=10000,lowpass=f=10000,lowpass=f=10000" -y -f wav - | ffplay -f wav -

I did already try this, but unfortunately it doesn't work on a windows
system.

Michael

--
**********************************************
   ASTRO ELECTRONIC   Dipl.-Ing. Michael Koch
        Raabestr. 43   37412 Herzberg
           www.astro-electronic.de
   Tel. +49 5521 854265   Fax +49 5521 854266
**********************************************

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Differences between ffmpeg and ffplay

Paul B Mahol
On 10/3/18, Michael Koch <[hidden email]> wrote:

> Am 03.10.2018 um 12:28 schrieb DopeLabs:
>> im not sure if windows has the ability to 'pipe' like a *nix system does..
>> but this works to pipe the output of ffmpeg to ffplay instead of a file..
>>
>> hope this helps...
>>
>> ffmpeg -i test_15kHz.mp3 -filter_complex
>> "volume=1,highpass=f=12000,highpass=f=12000,highpass=f=12000,highpass=f=12000[a0];aevalsrc="sin\(12000*2*PI*t\)":c=stereo:s=44100[a1];[a0][a1]amultiply,lowpass=f=10000,lowpass=f=10000,lowpass=f=10000,lowpass=f=10000"
>> -y -f wav - | ffplay -f wav -
>
> I did already try this, but unfortunately it doesn't work on a windows
> system.

What is so hard about trying mpv ?
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Differences between ffmpeg and ffplay

Michael Koch
Am 03.10.2018 um 13:23 schrieb Paul B Mahol:

> On 10/3/18, Michael Koch <[hidden email]> wrote:
>> Am 03.10.2018 um 12:28 schrieb DopeLabs:
>>> im not sure if windows has the ability to 'pipe' like a *nix system does..
>>> but this works to pipe the output of ffmpeg to ffplay instead of a file..
>>>
>>> hope this helps...
>>>
>>> ffmpeg -i test_15kHz.mp3 -filter_complex
>>> "volume=1,highpass=f=12000,highpass=f=12000,highpass=f=12000,highpass=f=12000[a0];aevalsrc="sin\(12000*2*PI*t\)":c=stereo:s=44100[a1];[a0][a1]amultiply,lowpass=f=10000,lowpass=f=10000,lowpass=f=10000,lowpass=f=10000"
>>> -y -f wav - | ffplay -f wav -
>> I did already try this, but unfortunately it doesn't work on a windows
>> system.
> What is so hard about trying mpv ?

Installation of mpv failed, and I don't want to learn the different
syntax. It's faster if I solve the problem with analog signal processing.

Michael
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Differences between ffmpeg and ffplay

Paul B Mahol
On 10/3/18, Michael Koch <[hidden email]> wrote:

> Am 03.10.2018 um 13:23 schrieb Paul B Mahol:
>> On 10/3/18, Michael Koch <[hidden email]> wrote:
>>> Am 03.10.2018 um 12:28 schrieb DopeLabs:
>>>> im not sure if windows has the ability to 'pipe' like a *nix system
>>>> does..
>>>> but this works to pipe the output of ffmpeg to ffplay instead of a
>>>> file..
>>>>
>>>> hope this helps...
>>>>
>>>> ffmpeg -i test_15kHz.mp3 -filter_complex
>>>> "volume=1,highpass=f=12000,highpass=f=12000,highpass=f=12000,highpass=f=12000[a0];aevalsrc="sin\(12000*2*PI*t\)":c=stereo:s=44100[a1];[a0][a1]amultiply,lowpass=f=10000,lowpass=f=10000,lowpass=f=10000,lowpass=f=10000"
>>>> -y -f wav - | ffplay -f wav -
>>> I did already try this, but unfortunately it doesn't work on a windows
>>> system.
>> What is so hard about trying mpv ?
>
> Installation of mpv failed, and I don't want to learn the different
> syntax. It's faster if I solve the problem with analog signal processing.

There is portable version, also one could write mpv scripts for you.
Also syntax is not different it is very similar.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".