views:

16

answers:

0

To get the the crux of it, why does the first command work, but the second command does not. They produce slightly differently sized files with different contents:

ffmpeg -i test.wav -f ogg -acodec libvorbis test.a.ogg

ffmpeg -i test.wav -f ogg -acodec libvorbis - > test.b.ogg

test.a.ogg will play properly and has no problems. test.b.ogg starts in the middle of the source audio and has stops and gaps in the audio. It also does not report the length of the track.

I want to transcode source files on the fly into ogg for a program I am writing and I am trying to pipe the stdout from ffmpeg into my program. Putting the results into an intermediary file will kill performance since the transcoding is supposed to happen on demand.