Ripping audio track from DVD HOWTO

Share your how-tos and guides with other users

Moderators: ChrisThornett, LXF moderators

Ripping audio track from DVD HOWTO

Postby Dutch_Master » Wed Mar 30, 2011 2:54 am

Title says it all, isn't it? Here's a quick HOWTO, distilled from various sources, including my own small experiments, based on a Debian Lenny system (but should work on any derivative too).

First, install the required tools:
Code: Select all
aptitude update && aptitude install lsdvd transcode vorbis-tools

(note: do enable/enter the debian-multimedia repo's (or similar for your distro) in your sources.list!)

Transcode is the tool for the hard work, and it's home is the cli. No GUI I'm aware of, AFAIK! Next, find out about the dvd you want to rip an audio track from:
Code: Select all
lsdvd /dev/dvd

You may need to change the drive according to your system. The result looks something like this:
Code: Select all
Title: 01, Length: 02:04:38.220 Chapters: 23, Cells: 24, Audio streams: 02, Subpictures: 00

Title: 02, Length: 00:00:00.176 Chapters: 01, Cells: 01, Audio streams: 00, Subpictures: 00

Title: 03, Length: 00:14:27.133 Chapters: 03, Cells: 03, Audio streams: 01, Subpictures: 00

Longest track: 01

This tells you the most likely title you need is title 1, with 23 chapters/songs (in this case) to choose from and 2 audio formats. The tricky bit is to find out what chapter number the track has you want to rip. Start counting ;)

The transcode command has the following format:
Code: Select all
transcode -x dvd -i /dev/dvd -T <title>,<chapter>,<angle> -a <audiotrack> -y null,ogg -b 192 -E 44100,16,2 -m '<songtitle>.ogg'

In practice, here's a sample command:
Code: Select all
transcode -x dvd -i /dev/dvd -T 1,18,1 -a 0 -y null,ogg -b 192 -E 44100,16,2 -m 'Every_breath_you_take.ogg'
Don't omit the -x flag, as it tells transcode what discformat to read. The -i flag is for the device, the -T tells transcode to work with title 1, chapter (song) 18 and angle 1, the -a flag specifies the audio track, -y says not to encode video and encode the audio stream in Ogg-Vorbis, the -b specifies bitrate, -E controls sample rate etc, while -m specifies the name of the output file. Hit enter and wait for it to finish. Given transcode lives on the cli, making a small loop to process every track is relatively easy, but you may want to choose an output name of "Track$1" to avoid files just encoded get written over ;)

Now, given the right encoders transcode can also transcode video formats, just replace the "null" in the -y flag by the name of the codec you want to use (h264, MPEG4, WMV if you really must, and more to choose from) but that kinda beats the idea of ripping a dvd of its audio tracks ;) Do note that other audio formats are also supported, including MP3, WAV and FLAC. Adjust commands to suit your taste :)

As stated earlier, this is compiled from various sources, including, but not exclusive, the Ubuntu forum and the exhaustive transcode man-page. The above command works for transcode verion 1.0.7 and probably later too, although I haven't tested that nor any previous versions. Check your version with
Code: Select all
transcode --version
LXF regular
Posts: 2437
Joined: Tue Mar 27, 2007 1:49 am

Postby Rhakios » Wed Mar 30, 2011 5:48 am

So... did you really intend this for the new Hints & Tips section?
Bye, Rhakios
User avatar
Posts: 7634
Joined: Wed Apr 06, 2005 11:18 pm
Location: Midlands, UK

Postby Dutch_Master » Wed Mar 30, 2011 12:08 pm

Would be a good candidate, wouldn't it? ;) (overlooked that one :oops: )
LXF regular
Posts: 2437
Joined: Tue Mar 27, 2007 1:49 am

Return to Hints and tips

Who is online

Users browsing this forum: No registered users and 0 guests