[LAD] Mplayer (ffmpeg) decode to stdout
Robin Gareus
robin at gareus.org
Wed Feb 1 16:02:24 UTC 2012
On 02/01/2012 04:29 AM, Alfs Kurmis wrote:
>
> Tnx Robin
> ffmpeg also works excellent as decoer.
> With ffmpeg -i /some/file -f u16le -ar 44100 | myprog ...
> i gotta horrable sound. Probably U mean -f s16le !
Well, yes.
It does actually not make a difference if you also specify the
audio-codec (-acodec pcm_s16le). The format is the same for both.
[..]
> It seems that ffmpeg during da decoding set terminal in canonical mode.
There's some (undocumented) feature: pass '-d' as first argument to
ffmpeg. That makes ffmpeg shut up and not touch termios; it still works
with writing data to stdout:
ffmpeg -d -i /some/file -f s16le -c 2 -ar 44100 pipe: | ...
kill -TERM `pidof ffmpeg`
HTH,
robin
More information about the Linux-audio-dev
mailing list