How to Rip DVD audio to mp3 or ogg
Posted by admin on April 27th, 2007
First thing you need to do is make sure you have lsdvd and transcode installed:
sudo apt-get install lsdvd transcode
A DVD in your DVD drive will probably be identified as /dev/dvd. Have a look at its table of contents with the lsdvd command
lsdvd
to find the track information, and the longest track
Output looks like as follows
libdvdread: Using libdvdcss version 1.2.5 for DVD access
Title: 01, Length: 02:32:44 Chapters: 26, Cells: 27, Audio streams: 02, Subpictures: 01
Title: 02, Length: 00:17:36 Chapters: 02, Cells: 02, Audio streams: 01, Subpictures: 00
Title: 03, Length: 00:00:11 Chapters: 02, Cells: 02, Audio streams: 01, Subpictures: 00
Longest track: 1
To capture the audio from the tenth chapter of the first title, saving it in ogg format, the command line is simply
transcode -i /dev/dvd -x dvd -T 1,10,1 -a 0 -y ogg -m track10.ogg
The arguments identify the input as /dev/dvd (-i), the type of input as DVD (-x), the title, chapter, and angle to encode, in this case being title 1, chapter 10, and camera angle 1 (-T), the audio track is track 0 (-a), the output format is ogg (-y, and the output filename is track10.ogg (-m).
generates mp3 output of chapter 20 from title 1
transcode -i /dev/dvd -x dvd -T 1,20,1 -a 0 -y raw -m track20.mp3
To extract the whole audio track of a title (all chapters) as ogg audio
transcode -i /dev/dvd -x dvd -T 1,-1 -a 0 -y ogg -m audiotrack.ogg
If you prefer WAV files, the following will do it
transcode -i /dev/dvd -x dvd -T 1,20 -a 0 -y wav -m track20.wav
Tags: General, Rip DVD audio to mp3, Rip DVD audio to ogg
Related Articles:
- Ubuntu 7.04 (Feisty Fawn) Beta Review
- Bandwidth Monitoring Tools For Linux
- Ubuntu Media Players OverView
- How to play Wmv9 files on AMD64 Ubuntu
- Galternatives - Graphical setup tool for Alternatives Configuration in Ubuntu
- Winamp Presets for your XMMS Music Player
- Ubuntu Edgy Eft complete sources.list (repository list file)
- Fix for mplayer in Firefox under Ubuntu is not working
- Install Exaile media player and Enjoy Your Music
- Installing Popular Applications On Your Ubuntu Desktop With Automatix2
- Playing encrypted DVDs in Ubuntu
April 27th, 2007 at 4:18 pm
Thank you very much !
I love these tricks especially when it is about multimedia.
Your website is in my RSS aggregator since a ‘long time’, and i can’t wait for new tips/tricks
Thank you again
Bye from France
Manuel
April 28th, 2007 at 8:52 pm
Thank you, but one small correction…
The switch for the output file is wrong. “-m” is for specifying an output stream. “-o” is for specifying an output file name. It also should not just be a name with extension, you should also specify a full output path. So instead of “-m track20.ogg”, as it appears in the example, it should be “-o /home/[username]/music/track20.ogg”, (or whatever is right for your setup). Using the command given will do nothing more than write the file to a stream that is not saved anywhere.
Otherwise it works great…
May 17th, 2007 at 1:23 pm
I was excited to read your how-to as I had just given up on rip::dvd. It wouldn’t work for me after the first try, will likely get back to it, but I wanted to try your cli route.
It looked promising but I got the following 3 error lines:
[transcode] warning : (encoder.c) video codec not supported by export module
[transcode] warning : failed to init export modules
[transcode] critical: plug-in initialization failed
I would appreciate any thoughts you might have for me. It was the same error using Russ’s edited command. Thanks!!
May 27th, 2007 at 3:03 pm
Well, there is one more thing. If you want to rip DVD to Ogg, you should use this one:
transcode -i /dev/dvd -x dvd -T 1,-1 -a 0 -y null,ogg -q 192 -m audiotrack.ogg
Without -y null, you will get an error and few warnings. -q argument depends on what bitrate you would like to have in your ripped audio file (:
May 27th, 2007 at 3:08 pm
Uhm, not -q but -b (:
June 9th, 2007 at 2:08 pm
Hello all,
Well…hmmm…doesn’t seem to work so swiftly for me. What am I doing wrong?
Thanks for any light shed,
Doug
doug@nimbus:~$ transcode -i /dev/dvd -x dvd -T 1,2,1 -a 0 -y ogg -q 192 -o /home/doug/Desktop/Farewell_I_Tour/The_Long_Run.ogg
transcode v1.0.2 (C) 2001-2003 Thomas Oestreich, 2003-2004 T. Bitterberg
[tcprobe] DVD image/device
(dvd_reader.c) DVD title 1/2: 21 chapter(s), 1 angle(s), title set 1
(dvd_reader.c) title playback time: 01:39:09.01 5950 sec
(dvd_reader.c) [Chapter 01] 00:00:00.000 , block from 0 to 49628
(dvd_reader.c) [Chapter 02] 00:01:34.080 , block from 49629 to 203804
(dvd_reader.c) [Chapter 03] 00:06:25.080 , block from 203805 to 362080
(dvd_reader.c) [Chapter 04] 00:11:28.080 , block from 362081 to 551149
(dvd_reader.c) [Chapter 05] 00:17:40.080 , block from 551150 to 689463
(dvd_reader.c) [Chapter 06] 00:22:04.680 , block from 689464 to 847078
(dvd_reader.c) [Chapter 07] 00:27:04.080 , block from 847079 to 1002248
(dvd_reader.c) [Chapter 08] 00:31:58.440 , block from 1002249 to 1140958
(dvd_reader.c) [Chapter 09] 00:36:18.840 , block from 1140959 to 1343112
(dvd_reader.c) [Chapter 10] 00:42:46.800 , block from 1343113 to 1507825
(dvd_reader.c) [Chapter 11] 00:47:52.680 , block from 1507826 to 1653207
(dvd_reader.c) [Chapter 12] 00:52:25.080 , block from 1653208 to 1801239
(dvd_reader.c) [Chapter 13] 00:57:36.720 , block from 1801240 to 1819579
(dvd_reader.c) [Chapter 14] 01:01:06.240 , block from 1819580 to 1928433
(dvd_reader.c) [Chapter 15] 01:05:44.160 , block from 1928434 to 2072420
(dvd_reader.c) [Chapter 16] 01:10:43.920 , block from 2072421 to 2227307
(dvd_reader.c) [Chapter 17] 01:15:15.000 , block from 2227308 to 2365080
(dvd_reader.c) [Chapter 18] 01:19:13.320 , block from 2365081 to 2489305
(dvd_reader.c) [Chapter 19] 01:26:36.000 , block from 2489306 to 2722745
(dvd_reader.c) [Chapter 20] 01:30:33.480 , block from 2722746 to 2852249
(dvd_reader.c) [Chapter 21] 01:37:02.520 , block from 2852250 to 3058384
[transcode] (probe) suggested AV correction -D 0 (0 ms) | AV 0 ms | 0 ms
[transcode] auto-probing source /dev/dvd (ok)
[transcode] V: import format | unknown (V=dvd|A=(null))
/dev/dvd:1: parser error : Document is empty
^
/dev/dvd:1: parser error : Start tag expected, ‘