Blog - Unity Behind Diversity

Searching for beauty in the dissonance

Encoding to Ogg Vorbis using a GStreamer pipeline – vorbisenc plugin quality property

I’ve been eager to transition my music library from the proprietary patent-ridden MP3 format to Ogg Vorbis, and since my iPod died a few months back, I’ve decided to make the move. I’ve read up on Ogg Vorbis and learned that it’s best to re-rip my CDs, since converting from one compressed audio format to another is a bad idea.

In Ubuntu 8.04, I tried using Rhythmbox and Sound Juicer to rip my CDs. They both use the same settings, making use of a GStreamer pipeline, and I encountered a problem with the quality setting. The Vorbis format uses a quality setting of -1 to 10, instead of measuring quality by bitrate. I wanted to use a Vorbis quality setting of 6. I went to Edit -> Preferences and clicked “Edit” under the “Format” heading. I selected “CD Quality, Lossy” (Ogg Vorbis) and the GStreamer pipeline read:
audio/x-raw-float,rate=44100,channels=2 ! vorbisenc name=enc quality=0.5 ! oggmux

0.5 seemed ridiculously low, so I changed it to 6. Which didn’t work. I googled around, sifted through man pages, baffled at what this quality setting should be set at… didn’t it use the standard Vorbis quality scale? It did, but in a stupid way.

Eventually, I went in search of the Gstreamer documentation, and found this description of the quality property for the vorbisenc plugin:

Specify quality instead of specifying a particular bitrate.

Allowed values: [-0.1,1]

Default value: 0.3

Who decided to make the scale one tenth of the actual standard? *sigh* Ah well, now I know how to use it and it’s working wonderfully! Here’s my new pipeline:
audio/x-raw-float,rate=44100,channels=2 ! vorbisenc name=enc quality=0.6 ! oggmux

Creative Commons Attribution-ShareAlike 4.0 International Permalink | RSS (comments) | Post a comment

4 Responses to “Encoding to Ogg Vorbis using a GStreamer pipeline – vorbisenc plugin quality property”

  1. […] subway rides of play time or a few minutes of transfer time to my computer. Second, I decided to re-rip my CD library into Ogg Vorbis — a free, lossy audio codec. The iPod doesn’t support Ogg […]

  2. Dragon says:

    That helped. Thanks 🙂

  3. Brian says:

    Thanks for this post. It was much easier to find with Google than digging through the GStreamer docs for this quality setting. Seems pretty dumb to me…

  4. ændrük says:

    Very helpful for demystifying SoundConverter’s Ogg Vorbis quality settings.

Leave a Reply