views:

231

answers:

1

I am trying to encode ogg files at -q 6/192k. ffmpeg doesnt seem to be listenting to my command

ffmpeg -i blah -acodec vorbis -ab 192k -y out.ogg

So i would like to use the recommended ogg encoder. It says the input must be wav or similar. I would like to pipe a wav from ffmpeg to ogg. However not only am i unsure if oggenc2 will accept input from stdin, i have no idea how to pipe one process to another inside of .net using the Process class.

+1  A: 

Firstly, AFAIK

Oggenc2

Command line encoder - allows direct input of '.flac', '.ape', '.wv', '.pac', '.ofr' and '.shn' files - ICL7.1 compile

Suppose you don't need

to pipe one process to another inside of .net using the Process class

because there is a more easier way to do this. Try the following construction:

ffmpeg -i audio.mp3 -f flac - | oggenc2.exe - -o audio.ogg

This command converts an input mp3 file (I didn't find other audio files on my PC) to flac and sends it to stdout, which goes to stdin of oggenc2 by using pipe(|).

The only thing you have to do is to write a .NET wrapper to run ffmpeg.

Alex
I use Process in system.diagnostics. Why do i need a wrapper? I'll write another question about piping and i think i'll use the command above. i'll be back soon (after an answer to that question) to accept i think this will work!
acidzombie24
Under the "wrapper" I meant System.Diagnostics.Process class :)
Alex