Sunday, November 18, 2007

Making K3b rip DVDs on Ubuntu 7.10

I've complained repeatedly that K3b supplied via Ubuntu 7.10's repositories can't rip DVDs on Ubuntu 7.10. It worked for me on 7.04 as well as on every version of openSUSE I cared to try it on. I tried everything I could think of to get it to work short of installing Kubuntu, which I will never do. I have an abiding dislike of Kubuntu, stoked in part by its silly insistence that Konqueror is the default web browser, not Firefox.

After repeated attempts to find a solution on forums and via Google, I solved my problem the old fashioned way; I downloaded the source to K3b 1.0.4 and built it myself. And you know what? I can rip DVDs now with K3b on Ubuntu 7.10.

The key to getting K3b to compile is to install, via Synaptic, the packages for Qt3 development (qt3-apps-dev, libqt3-headers, libqt3-mt and libqt3-mt-dev) and KDE development (kde-devel). These provide all the tools, headers, and libraries necessary to build KDE/Qt3 applications.

Other development versions of libraries are needed to build key features and plugins for K3b. To give you an idea of what you need, here's the final configure output from K3b:
K3b - Include libdvdread (Video DVD ripping) support:
K3b - yes

K3b - Resmgr support: no

K3b - Compile HAL support no
K3b - You are missing the HAL >= 0.5 headers and libraries
K3b - or the DBus Qt bindings.

K3b - Audioplayer available (alsa) yes

K3b - FFMpeg decoder plugin (decodes wma and others):
K3b - yes

K3b - FLAC support: yes

K3b - libsndfile audio decoding support: yes

K3b - Mp3 decoding support (libmad): yes

K3b - Musepack support: yes

K3b - Ogg Vorbis support: yes

K3b - Lame Mp3 encoder plugin: yes

K3b - Audio meta data reading with Taglib: yes

K3b - Audio resampling:
K3b - using version bundled with K3b

K3b - Audioplayer available (aRts) yes

K3b - Compile K3bSetup 2: yes

K3b - Tag guessing using MusicBrainz yes
I didn't keep a list of every '-dev' library needed. What I did do was to hunt, via Synaptic, the developer version of every feature listed above. For example, for libdvdread (libdvdread3, which was already installed) I made sure to install libdvdread-dev. After finding and install I'd do a 'make distclean' (just to make sure) and then re-run ./configure. Where-ever a 'yes' appears, I satisfied K3b's configure requirements. The only 'no' I wished I'd satisfied was with HAL/DBus support. I tried a number of packages but never found the right one. For my use it didn't matter, so I didn't waste too much time trying to satisfy the requirement.

Why not use another tool? I tried that, specifically with K9Copy. I installed and tried that tool, and after three consecutive unsuccessful attempts to rip the same movie, I removed it completely and then went off and built K3b. The less said about K9Copy the better, but from my perspective it can be described in one word as 'horrible'. Don't use it unless you're desperate.

I have no idea why the version of K3b (1.0.3) won't work as a DVD ripper while my re-built version (1.0.4) will. I don't believe that it's due to the minor point difference, since the same version supplied via Synaptic (1.0.3) works just fine under openSUSE 10.3. I can only assume that the build system for this application is broken. I did nothing other than install the necessary support packages via Synaptic, run ./configure, make, and make install.

The grizzled veterans will shake their heads in bemusement over my complaining about having to rebuild an application to get a specific feature to work. But that's my point. Why would anybody, especially now, have to go to this much trouble to get a major feature to work on a major application? The answer is they shouldn't, especially when at least one other distribution shows that it works out-of-the-box. And especially on a distribution such as Ubuntu that strives "the best" Linux distribution of them all. The one saving grace to this minor fiasco is the Synaptic system that allowed me to quickly find and install the necessary tools. And to be honest it's a feature from Debian, not from Ubuntu.

It's situations like this that make me wonder again and again if I shouldn't front my own distribution, where unnecessary bits are stripped out and what's left Just Works. But then, that's just what the Linux scene needs; Yet Another Damn Distribution.