Getting Audex to rip into Ogg Vorbis

Audex is a really nice (KDE) application to rip Audio CDs. It can lookup the CD information (so most of the time you don't have to type all the tracktitles yourself), it also tries to fetch the correct cover (and succeeds most of the time) and has very flexible configuration settings. Sadly, the version in the Ubuntu (currently 0.72b1) repositories has a few problems when you want to encode your songs in Ogg Vorbis. Here is an overview of the problems I had and how I hacked my way around them (without recompiling Audex), so I can use Audex to rip my CDs to Ogg Vorbis.

The most important problem is that Audex simply doesn't detect the Ogg Vorbis encoder. As documented in this Debian bug report Audex passes an incorrect parameter to oggenc to detect the version. While it should pass -V (uppercase V) it passes -v (lowercase v). To 'fix' (read: hack) this I took the following steps:

  • First check that your have the Ogg Vorbis encoder (oggenc) installed. In Ubuntu you can install it from the repositories by installing the 'vorbis-tools' package:
    1
    
    sudo apt-get install vorbis-tools
  • Now you should have the Vorbis encoder in /usr/bin/oggenc. But Audex won't detect it because it will call it with an incorrect paramter. So to fix this I first renamed oggenc to 'oggenc_real':
    1
    
    sudo mv /usr/bin/oggenc /usr/bin/oggenc_real
  • Then I created a small bash script which will replace 'oggenc' and call the real 'oggenc' with the correct parameter. To do this fire up your favorite editor, such as vi:
    1
    
    sudo vi /usr/bin/oggenc
  • Add the following content and save the file as /usr/bin/oggenc (to replace the real oggenc):
    1
    2
    
    #!/bin/bash
    /usr/bin/oggenc_real -V
  • Make the file executable:
    1
    
    sudo chmod +x /usr/bin/oggenc
  • Now you can start Audex and it will detect the Ogg Vorbis encoder. Now you can try to open the configuration window in Audex (Settings > Configure Audex), click the Profiles tab, choose 'Add' and configure a profile for the Ogg Vorbis encoder and click save. However, when I tried this, Audex crashed. When I started the application again, my configured Ogg Vorbis profile was gone again. So I decided to simply modify the default 'WAVE (Raw Uncompressed)' profile to rip to Ogg Vorbis instead of to wav (I only rip to Vorbis anyway). When I saved that, Audex crashed again, but at least when I started the application again, my changes to the default profile had survived the crash, so I finally had a profile for Ogg Vorbis.
  • After you have configured the profile to rip to Ogg Vorbis (make sure you have setup everything you want!), exit Audex. Now delete the fake oggenc script, and rename the oggenc_real back to it's real name, oggenc:
    1
    2
    
    sudo rm /usr/bin/oggenc
    sudo mv /usr/bin/oggenc_real /usr/bin/oggenc
  • Now you should be able to successfully rip your audio CDs to Ogg Vorbis files!

Comments

Guilo's picture

Thanks it helped me. But this used to work in previous versions of Audex...

jeroen's picture

While playing with a fresh install of Xubuntu, I downloaded the .deb file from this site: http://kde.maniatek.com/audex/download and it works without any problems. Just download the Kubuntu 10.10 version and install it on Ubuntu or Xubuntu 11.04 :)

Anonymous's picture

Another solution, which is possibly easier for some, is to manually patch the Audex executable using a hex editor such as Okteta. You'll have to run it as root of course:

sudo okteta /usr/bin/audex

My audex version/package is: audex-0.72-0.8.beta1.fc14.i686

In this build, the byte to patch is at 0x9f894

You can also search for it (like I did). Search for the text string "oggenc". The erroneous switch ("-v") appears just before "oggenc" in my build with an ASCII 0 between them. Just change the "v" to a "V" and save it (make sure the editor is in overwrite mode though -- you don't want to INSERT a byte in a binary executable!! :)

When the next Audex update comes down the pike your patched version will be overwritten. Hopefully the bug will be fixed by then. If not, you'll have to patch it again. But you won't have to mess with any wrapper scripts.

~ray

Glen Stewart's picture

Just visit https://launchpad.net/ubuntu/+source/audex/0.74~b1-1/+build/2845647 and download the .deb from there. Then do a dpkg -i audex_0.74~b1-1_amd64.deb (for example).

Then reload your encoders and go.

Add new comment