Exporting to ogg from Ardour

No replies
froh
froh's picture
User offline. Last seen 26 weeks 2 days ago. Offline
Joined: 2006-10-18
Posts:

I posted this on my blog a long time ago, but even google won't tell you its there.
http://fsb.gotdns.org/~froh/blog

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.

Example:

mkfifo ardour.out

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.

paul
paul's picture
User offline. Last seen 1 day 3 hours ago. Offline
Joined: 2006-03-16
Posts:

that is very, very cool. thanks for posting this.

Reuben
User offline. Last seen 4 years 32 weeks ago. Offline
Joined: 2006-03-30
Posts:

I think that ffmpeg will read from a pipe and encode mp3 using lame as a backend.

You _should_ be able to do this with any jack app by using jackrec and having it record into a pipe.

Dieterbe
User offline. Last seen 3 years 42 weeks ago. Offline
Joined: 2007-03-13
Posts:

Hmm.. the faq, you say?
only the last link works and it doesn't mention anything about ogg/mp3

There is something about it in the manual though:
http://ardour.org/files/manual/supported-external-audio-file-formats.html
It says ogg support is coming up. So if what you say is correct, this page is outdated, or just incorrect?

Mp3 is, obviously, another story. Sampo explains this really well here

However, for both ogg, mp3, and all those other formats unsupported. (because they are proprietary or because of other reasons), textchimp has posted an idea in this thread. I think this would be a great solution (as I also said there)

naptastic
User offline. Last seen 4 years 11 weeks ago. Offline
Joined: 2006-05-12
Posts:

I would like to point out that everyone using SVN to download Ardour2 has access to modify the manual, and could probably get checkin access just by demonstrating desire to do Good Things with it and asking somebody in #ardour.

Maybe I'll do that...

froh
froh's picture
User offline. Last seen 26 weeks 2 days ago. Offline
Joined: 2006-10-18
Posts:

Dieterbe: The blog post i refer to is from 2005, back then ardour.org had a faq that claimed lossless encoding was unsuitable. I use ardour a lot for sketches, and need to email pieces to band members. Sometimes we record long jamsessions that we want to keep to develop ideas- sound quallity is not that critical, but disc space certainly is.
It looks like the developers has understood that people uses ardour for work that don't need cd quality. As ardour uses libsndfile for export, it will have ogg support soon anyway. textchimp's ideas about calling external commands is excellent btw. But if you handle really large files, a named pipe is still useful.

zenbrowncoat
User offline. Last seen 4 years 26 weeks ago. Offline
Joined: 2006-08-29
Posts:

Import into Audacity, then export as ogg or mp3. Very easy, very quick. I do this all the time. Peace, John

thorgal
User offline. Last seen 1 year 21 weeks ago. Offline
Joined: 2007-08-03
Posts:

audacity is maybe a bit superfluous here :
once you exported to WAV from ardour, a simple 'lame -h -b 320 file.wav file.mp3' is enough. You can adjust the rate to something else (e.g. 128, 192, etc). Of course, if you don't want to have the WAV file in the first place (disk space limitations) then the fifo is not a bad idea :) On the other hand, an application like ReZound is also very nice to have around for little final tweaks ;)

t0dd
User offline. Last seen 5 years 44 weeks ago. Offline
Joined: 2008-06-14
Posts:

If there's this whole issue of mp3 being a non-free technology, then how does LAME even exist and why do many commercial applications utilize the free LAME encoder verses the non-free Fraunhofer encoder. I don't get it.

Also, there's the whole "mp3 isn't suitable for serious applicatons." WHAT?!?! Sorry, kids, but I work in serious business... broadcasting. I work on a nationally distributed program that airs on more than 300 stations around the country. Producers in our field all need to have pieces and entire programs converted to either mp2 (toolame works fine for this) and/or mp3. Most broadcasting automation systems utilize this for broadcast and, for storage, is the preferred format.

In fact, I am required to have all program files converted to mp2 and, in some instances, mp3. Last I heard, I work in serious audio with millions of listeners tuning in during broadcast.

So, please, tell me when did what I do be considered not serious? I just laughed when I read this. Wow.

m0d t0dd?

paul
paul's picture
User offline. Last seen 1 day 3 hours ago. Offline
Joined: 2006-03-16
Posts:

Todd,

while I appreciate and respect your position, please keep in mind that the MP3 format was invented to deal with two specific problems: lack of network bandwidth, and storage costs. Both of these problems are slowly fading away, but meanwhile various parts of the audio technology ecosystem have adopted psycho-acoustic compression as an acceptable format because for them it works ... acceptably. The broadcast market doesn't have the same emphasis on audio quality as the recording market, and also has archiving issues that make mp3 and similar formats appealing.

The comment you were referring to is coming from someone who is not rooted in the broadcast world, but instead is coming from a perspective where dealing with original sources that need to be preserved at maximum quality is absolutely critical. In these environments, mp3 and other similar formats are absolutely not serious formats for storage or editing.

peder
User offline. Last seen 49 weeks 4 days ago. Offline
Joined: 2007-05-08
Posts:

Paul.
Is there any reason why my post about lame vs Fraunhofer got removed? First it got tagged as possible spam, awaiting moderation. Then it came up and now it's gone.

Google shows part of it (18 jun 2008 ... As for LAME vs Fraunhofer, the issue isn’t the encoder; it’s the use of the technology. To legally create an mp3 you need a license from ...) but even the cached side hasn't got all of it.

model299
User offline. Last seen 5 years 11 weeks ago. Offline
Joined: 2009-02-06
Posts:

I wonder if there isn't any way to just use FLAC with this idea. However if you want your master recordings distributed MP3 or AAC/MP4 is really the only way. I think it's ok to render as a .wav and then convert you can even use some of the plugins for different gui based media players to do this. I don't see why not. Doesnt really matter, the soundfiles in the project are stored somewhere anyway so storage is always going to be a big issue with this type of workstation. I guess it all depends on what you plan to do with your master. if you want to distribute it electronically thats one thing, if you're just a starting out band member you might want to make a cd.