About Ogg, Theora, Vorbis and FLAC

The newest version of Ubuntu, Feisty Fawn, prompts you to install proprietary codecs when trying to play e.g. an MP3 file. It displays the following message:

The use of some of this software may be restricted in some countries. You must verify that one of the following is true:

  1. These restrictions do not apply in your country of legal residence
  2. You have permission to use this software (for example, a patent license)
  3. You are using this software for research purposes only

The reason Ubuntu, and Xubuntu, cannot ship these “codecs” (software that allows you to play media in a certain format) is that several companies claim to own patents over these codecs and have been enforcing these patents. You can read more about these issues concerning MP3 at the Wikipedia page on MP3.

Of course there are alternatives to these formats which, if your preferred media player supports it, I highly recommend you to use. However, to be able to use them, you need to know how to, so in this post, I’ll try to highlight the popular alternatives. Note that I am far from an expert in this area, I’ve just done a little research.

There are two ways to save an audio file: lossy and lossless. Lossy means that, when saving an audio file, everything that the human ear cannot hear will not be saved, resulting in a considerably lower file size. Of course, the quality is reduced a little, and the removed sounds cannot be restored unless you have a backup, but the loss is not noticeable unless you are trying very hard. This is also the reason that it is unwise to convert your files from one lossy format to another, as the quality will be greatly reduced. As you might have guessed, lossless audio formats save the file without any loss. As a result, the file size is much larger than for lossy audio formats, though it can be reduced a little by some lossless formats.
WAV is, as yungchin tells us, a container format that most often stores pulse-code modulation, a way of digitally storing a close representation of an analog signal such as sound, together forming the most common lossless audio format. As far as I know WAV is not restricted by licensing issues in that it can come default on Xubuntu, but it is not open, as in free to edit. The most popular open alternative is Free Lossless Audio Codec (FLAC). Another advantage of FLAC over WAV is that FLAC, even though it loses no data, still manages to compress the audio file resulting in a little smaller file sizes.

The most common lossy audio format, which I’m sure you’ve heard of, and which I mentioned earlier, is MPEG-1 Audio Layer 3. If you haven’t heard of it, then you probably know it by the name MP3. This one not only isn’t open, but also cannot be supported by default in Xubuntu. The most popular alternative is Vorbis, which is half the size but of better quality, like Microsoft’s Windows Media Audio (WMA). Vorbis is mostly used in combination with another format, within a container format called (thanks Bas) Ogg, and then referred to as Ogg Vorbis. To add to the confusion, it sometimes (mostly) is also referred to as simply Ogg. And it gets worse: Theora, an open video format alternative to MPEG-4 Part 14 (or MP4) which is also used in conjunction with Ogg, is also sometimes referred to as simply Ogg, and both use the .ogg extension!
So, when someone mentions Ogg, it is likely to be Ogg Vorbis when he refers to an audio file, and Ogg Theora when it’s a video file.

The Free Software Foundation recently started the Play Ogg campaign, which promotes the use of Ogg instead of MP3. As you can see on their, they mention “Ogg” all the time whereas they mean “Ogg Vorbis”.

If you want to dig yet a little deeper, you might also want to check out Wikipedia’s article on Speex, another format used with often contained in Ogg… In fact, even FLAC can be contained in Ogg, but this is not that common.

Now, on to converting your audio files to these open formats. The software you can use for this is SoundConverter, which you can install by opening Add/Remove… in the Applications menu under System. Make sure you have selected to Show: either “All Open Source applications” or “All available applications”.

When you start SoundConverter from “Multimedia” under the “Applications” menu, you will be greeted with the following screen:
SoundConverter

Before converting, you should check the Preferences under the Edit menu, where you can set the format to convert to, the quality of the newly produced file, and where to save it:
SoundConverter

After you have set your preferences, you can start adding files that you want to convert to the format you just selected. You can add whole folders at once, or add files one by one:
SoundConverter

When you are done adding files, click “Convert” to start the conversion process:
SoundConverter

That’s it, you now have your sound files in a shiny other format!

PS. As I said, I’m not an expert, so if anyone has anything to add (preferably backed by sources) please do so in the comments on this post.

About these ads

15 Responses to “About Ogg, Theora, Vorbis and FLAC”


  1. 1 Bas 20 May 2007 at 4:54 pm

    Ogg is actually the container format, whereas Vorbis and Theora are codecs. Media files are characterised by their container format (which is usually reflected in the extension, hence the .ogg extension for both video and audio files). Another example is the AVI container format, which is compatible with many video codecs, such as MPEG-2.

    Anyway, nice guide! Too bad my MP3-player does not support Vorbis. :(

  2. 2 Vincent 20 May 2007 at 5:06 pm

    Thanks Bas, I’ve added it to the post. I’m not all too sure what a container format is, but I guess it doesn’t matter that much. My iPod doesn’t support Ogg too, and unfortunately it’s still too new for iPodLinux or Rockbox. I hope it’ll get supported soon.

  3. 3 Greg K Nicholson 10 September 2007 at 11:24 pm

    Though it’d be nice to be able to easily convert existing MP3-format audio to Ogg Vorbis, it’s usually a bad idea to convert from one lossy format to another.

    Lossy formats discard some of the original data, and each format discards a different bit, so the end result will probably be of worse quality.

    The Vorbis people explain this properly in their FAQ: http://www.vorbis.com/faq/#transcode

  4. 4 Vincent 11 September 2007 at 2:44 pm

    Greg, you are absolutely right, and I stressed it some more in the post itself. Thanks!

  5. 5 Antoine 1 October 2007 at 2:58 pm

    Nice guide thanx alot. but i wanted to ask,does totem by default be able to play ogg theora videos? and is there an open source mpeg to ogg theora converter?

  6. 6 Vincent 1 October 2007 at 3:07 pm

    Antoine, to your first question: yes, to your second question: I don’t know, but if there is, it probably isn’t difficult to find.

  7. 7 yungchin 2 February 2008 at 12:49 am

    Hi Vincent,

    I like your blog, it’s very well written – that is, readable for me :)

    About wav: I believe it is a container format just like the ogg format – you can find both listed here: http://en.wikipedia.org/wiki/Container_format_%28digital%29
    (in fact, some very old places on the web used to put mp3 data inside wav files; very confusing).

    Anyway, I thought you might like this link to the Hydrogenaudio Knowledgebase, which has all the details on audio formats:
    http://wiki.hydrogenaudio.org/index.php?title=Main_Page

    Greetings!
    PS – are you Dutch? Just curious :)

  8. 8 Vincent 2 February 2008 at 12:07 pm

    yungchin – thanks :)

    You are absolutely right regarding WAV, and I’ll update the information in a sec. That knowledgebase looks very comprehensive indeed!

    And yes, I’m Dutch – and proud of it ;)

    Best,

    Vincent

  9. 9 yungchin 4 February 2008 at 2:57 am

    Heh, you’re fast :)

    And guess what: ik ook! – and just as proud…

    Greetings!

  10. 10 Emanuel Lewis 17 August 2008 at 7:42 pm

    OGG Theora format Sucks its not a Standard by far. I just downloaded a trailer for a “Cross Platform Game” The Video crashed everytime by VLC on the PC.

    Its Stupid and a waste of time to code stuff that will NEVER EVER have a chance of being a Standard. mp4 and mp2 has close the door and the rest have been left knocking till their fist bleed.

  11. 11 Tonya Henson 26 May 2010 at 10:12 am

    You can also go too http://www.oggconvert.com/ to convert OGG files to MP3, AAC, FLAC, OGG, WMA, M4A, WAV online. I hope its big help.

  12. 12 Shulato 19 March 2011 at 3:39 am

    you could try also http://www.mp3toflacconverter.com it could convert various formats


  1. 1 Breaking through restrictions « Xubuntu Blog Trackback on 10 September 2007 at 2:19 pm
  2. 2 TuxFeed › Access to the proprietary world Trackback on 10 September 2007 at 3:55 pm
  3. 3 TuxFeed » Access to the proprietary world Trackback on 14 February 2008 at 9:07 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




a

RSS More Xubuntu


Follow

Get every new post delivered to your Inbox.

Join 42 other followers

%d bloggers like this: