Log in

View Full Version : Piping FFMPEG into OGGENC2 - expert help needed


redblue
31st May 2007, 15:11
hi,

I'm stuck trying to use a pipe to communicate between ffmpeg and oggenc2 in WindowsXP.
I spent a couple of hours reading the help of both programs and searching online, but no success.

Oggenc2 (http://www.rarewares.org/ogg.html) can accept pipes from other programs:
When I convert mp3 to Ogg using the pipe and lame, the command looks like this:

lame.exe --decode input.mp3 - | oggenc2.exe - -q 2 --output=output.ogg
This works great.

For sources in other formats I would like to use ffmpeg.
This example uses a 48kHz stereo transport stream

ffmpeg.exe -i input.ts -acodec pcm_s16le -f wav - | oggenc2 - --output =output.ogg

This results in a unsuable Ogg file with a playing time of one second. The source plays 2:30 minutes.

When I use ffmpeg to export a wav-file from the same example to the hard disc, oggenc2 can encode it.


My question to any ffmpeg guru reading this:
Did I use the right parameters to set up the pipe?

(Note: I'm aware that ffmpeg can encode into Ogg natively, but this only works with stereo sources)

buzzqw
31st May 2007, 15:20
i think that ffmpeg output headerless wav...

try this ffmpeg.exe -i _aaa.ts -acodec pcm_s16le -f wav - | oggenc2 -q 3 --raw - -output.ogg

BHH

redblue
31st May 2007, 17:37
try this ffmpeg.exe -i _aaa.ts -acodec pcm_s16le -f wav - | oggenc2 -q 3 --raw - -output.ogg

Thanks - this seems to work.

jruggle
1st June 2007, 04:15
Thanks - this seems to work.

For me, FFmpeg works fine with your original commandline. However, if the raw audio way works for you, the more correct way to do that would be to use "-f s16le" instead of "-f wav".