Category: How to... — UbuntuLinuxHelp @ 2:13 pm —

I was asked earlier if there is a way to capture or save the audio on DVD’s to MP3 (I prefer ogg, which also works using this method). While I have no idea of the legality (with regards to saving audio tracks off a DVD), you should therefore check the laws in your area before using this method. After much Googling I also, you will need a transcoder (lsdvd) to do this.

If you already have lsdvd installed on your system, you can skip the first step.

To install lsdvd, run the following command from a terminal:

sudo apt-get install lsdvd transcode

After installing you will be using lsdvd to find the audio tracks (usually they are longer in length). Use this command

lsdvd

You will see text output to your terminal that will look similar (in structure) to this:

Title: 01, Length: 02:17:23 Chapters: 24, Cells: 25, Audio streams: 02, Subpictures: 01
Title: 02, Length: 00:19:12 Chapters: 02, Cells: 02, Audio streams: 01, Subpictures: 00
Title: 03, Length: 00:13:43 Chapters: 02, Cells: 02, Audio streams: 01, Subpictures: 00
Title: 04, Length: 00:00:13 Chapters: 02, Cells: 02, Audio streams: 01, Subpictures: 00
Longest track: 1

So, we’ve established that the audio is in track 01. To extract all the audio to an MP3 file, we would type this command (in the terminal):

transcode -i /dev/dvd -x dvd -T 1,-1 -a 0 -y raw -m complete_audio.mp3

To do this in ogg, just enter:
transcode -i /dev/dvd -x dvd -T 1,-1 -a 0 -y ogg -m complete_audio.ogg

or for wave is:

transcode -i /dev/dvd -x dvd -T 1,-1 -a 0 -y wav -m complete_audio.wav

If for example, you are interested in the audio of only one chapter (and you know it’s chapter 3), then you can save the audio just from chapter 3 by typing:

transcode -i /dev/dvd -x dvd -T 1,3,1 -a 0 -y raw -m audio_chapter_3.mp3

What do all the switches mean?
Using this example “transcode -i /dev/dvd -x dvd -T 1,3,1 -a 0 -y raw -m audio_chapter_3.mp3″:

On my system the DVD physical player is: /dev/dvd therefore “-i” specifies the input device (which is the DVD player). That is why we type “-i /dev/dvd”.
-x specifies the type of input (which is a DVD). That is why we type “-x dvd”.
-T 1,3,1 refers to the title “T”, the chapter “3″ and camera angle “1″.
-a is the audio track “0″
-y is the output format “raw” (mp3).
-m is the output file “audio_chapter_3.mp3″

While I personally am by no means an expert, I’ve found this works well. Also, helpful is the “The definitive DVD backup resource” found at Doom9 here: www.doom9.org

1 person has left a comment

#1

I should clarify that this works for wav format (in addition to mp3 and ogg).

ogg is still the most superior - but that is just my opinion.

Roger wrote on August 10, 2007 - 2:16 pm
You can leave a response, or trackback from your own site.

Write Your Comment

Comment Guidelines: Basic XHTML is allowed (a href, strong, em, code). All line breaks and paragraphs will be generated automatically.

You should have a name, right? 
Your email address, I promised I won't tell it to anyone. 
If you have a web site or blog, you can type the URL right here. 
This is where you type your comments. 
Remember my information for the next time I visit.