Exporting to ogg from Ardour
I posted this on my blog a long time ago, but even google won't tell you its there.
From time to time people ask if it's possible to export directly to mp3 or ogg. The Ardour faq says that its meant for serious work, and that mp3 is not a suitable format.
However, sometimes it can be desireable to export to a lossy format, hd space restrictions being one good reason.
This can be achieved by creating a named pipe, export a raw audio stream from ardour into the pipe, and connect an encoder to the other end.
Set Ardour to export as raw 48000 16bit to the FIFO. Connect oggenc to the other end, and tell it what format the stream is in.
oggenc -r -B 16 -R 48000 -C 2 ardour.out
I also tested with lame, but lame fails to read from a named pipe, saying:
"mp3 buffer is not big enough..."
With these options lame encodes, but only produces wonderfull white noise.
lame -v -r -s 48 --bitwidth 16 ardour.out
If someone can make lame work, post a reply.