Extract Audio from DVDs in Ubuntu

I wanted to extract Marillion’s cover of Toxic today, which lives on the DVD release of Thankyou Whoever You Are / Most Toys.

I found a useful page over at Ubuntu Geek which covered the topic nicely using a tool called transcode, which I’ve used a little of in the past.

I was having some difficulties with this one though, as transcode only worked on a few titles on the DVD. After a bit of testing, I discovered that this wasn’t woking on titles that had no video.

Eventually I settled on this command line to extract the song:

<code>transcode -i /dev/dvd -x null,dvd -T 4,1,1 -a 0 -y null,ogg -o MarillionToxic.ogg</code>

Here’s the breakdown:
transcode – run transcode
-i /dev/dvd – set the input to the DVD drive
-x null,dvd – set the input modules. As I don’t want video, I’ve used null and then dvd for the audio channel
-T 4,1,1 – set the Title 4, Chapter 1, Angle 1, which is the Toxic track on the DVD
-a 0 – set the audio track (the first is 0 on DVDs)
-y null,ogg – sets the output to ogg. Once again, I’ve forced null for the video
-o MarillionToxic.ogg – finally, I’ve set the filename for extracting the audio.

The whole track was extracted from DVD in a matter of seconds. Brilliant.