22

I remember reading a long time ago how you can rip the audio (music) from a DVD and convert it to a usable/readable format.

I can't find that article any more. Can anybody help me?

1

8 Answers 8

9
  1. Inspect DVD with following command

    pg@pipoTower: ~$ tcprobe -i /dev/sr0
    

    look for line where chapters is like following:

    [dvd_reader.c] DVD title 1/1: 17 chapter(s), 1 angle(s), title set 1
    
  2. Rip all titles to mp3 where for example {1..17} is the number of chapters of your dvd

    for i in {1..17};do 
      transcode -x null,dvd -y null,tcaud -i /dev/sr0 -T 1,$i,1 -a 0 -E 44100,16,2 --lame_preset medium -m ~/tmp/yourDestinationMp3File_chapter${i}.mp3;
    done
    

    For details of command:

    • -T title,chapter,angle (described by your tcprobe command in point 1.)
    • -a audioTrackNumber
    • -i inputDevice
    • --lampe_preset can be: medium, standard, extreme refer to man transcode for further details
3
  • What would the transcode command look like when the DVD title line is DVD title 1/11: 3 chapter(s), 1 angle(s), title set 1? Thank you.
    – MountainX
    Apr 19, 2015 at 5:23
  • @MountainX try to replace the 17 by your chapters number which in your case is 11, so it'll be for i in {1..11};do transcode -x null,dvd -y null,tcaud -i /dev/sr0 -T 1,$i,1 -a 0 -E 44100,16,2 --lame_preset medium -m ~/tmp/yourDestinationMp3File_chapter${i}.mp3; done Apr 21, 2015 at 10:10
  • Great, works for me. I would only change: for i in {1..17} to for i in {01..17} to have names easier to sort.
    – matandked
    Jul 23, 2016 at 10:55
6

Here's what you're looking for: Handbrake.

It's a fairly useful tool for what you're trying to do. To install, add the ppa ppa:stebbins/handbrake-releases to your software sources (here's how to do that) and install handbrake from the Software Center.

3
  • 1
    It don't seem to have x64 version. If I try to install x32 -- I'm suggested to remove tons of x64 libs.
    – Adobe
    Feb 16, 2013 at 6:29
  • 2
    Sorry, but see the Handbrake FAQ: Handbrake can't extract only audio. Oct 6, 2013 at 15:49
  • @MartinSchröder yes, and no. If you get this, then you can export it using VLC or something.
    – jrg
    Oct 6, 2013 at 20:26
2

For a proper Ubuntu approach I'd suggest to have a look into ffmpeg (command line). Example:

ffmpeg -i infile.wmv -vn -acodec copy outfile.wma

Or, if you want an MP3 file:

ffmpeg -i infile.avi -vn -ar 44100 -ac 2 -ab 192 -f mp3 outfile.mp3

Also there is another PPA software called Gnac; it's a GNOME software that uses the Gstreamer media framework and has a GUI.

Launchpad PPA: https://launchpad.net/~gnac-team/+archive/ppa

sudo add-apt-repository ppa:gnac-team/ppa
sudo apt-get update
sudo apt-get install gnac
1
  • Use K3B to rip audios from DVD. Search on ubuntu software center, there you will find many apps regarding ripping audio/video data from dvds. Feb 16, 2013 at 6:51
2

Building on this answer and this post, I came with a similar solution for extracting uncompressed WAV files. Use tcprobe -i /dev/sr0 or lsdvd to determine the DVD title with the chapters of interest, then (assuming 17 chapters in title 1):

for i in {1..17};do 
  transcode -i /dev/sr0 -x dvd -T 1,$i,1 -a 0 -y wav -m /tmp/track${i}.wav
done

In my case this results in WAV files containing lpcm 16bit 48kHz 2Ch, same as the tracks on the DVD. You can check the resulting files using mediainfo.

1

Use VLC's "open media" menu option to open the DVD, set the title to the one you want (you may have to explore the DVD by actually starting to view it, to get the title number).

Then instead of telling VLC to play it, tell it to stream it to a file.

Works great - you may have to use audacity to trim the results, as VLC will go back to the menu after playing the title you selected... so you'll get the menu track on infinite repeat at the end of your file :)

1

Since transcode is not available as a package anymore in recent Ubuntu releases, some older answers don't work anymore. Here's an alternative solution using mplayer and ffmpeg:

First, make sure to install mplayer and ffmpeg:

sudo apt install mplayer ffmpeg

Then, dump the DVD's content using mplayer:

mplayer dvd:// -dumpstream -dumpfile output.vob

Now, rip convert it to an audio file using ffmpeg (which will also omit the video content):

ffmpeg -i output.vob -vn -f mp3 output.mp3

If your DVD has multiple chapters and you want to keep this structure, start by checking the chapters using mplayer:

mplayer -identify dvd://

Then, dump each chapter (in this example, chapter 1 - 5):

for i in {1..5}; do 
   mplayer dvd:// -chapter $i-$i -dumpstream -dumpfile $i.vob; 
done

Now, convert all of them again

for i in *.vob; do 
   ffmpeg -i $i -vn -f mp3 ${i/vob/mp3}; 
done
0
sudo apt-get install abcde
abcde

Wait half an hour. Current directory contains one .ogg track per file.

Similar question: What are some CD Ripping Programs you can use on Ubuntu?

3
  • abcde doesn't seem to work with DVDs. Fails with [WARNING] something went wrong while querying the CD... Maybe a DATA CD?.
    – landroni
    Jun 15, 2017 at 15:03
  • @landroni thanks for the report. What version, and what DVD did you use if you can tell? I think it worked for me when I tested it, but I don't have any DVDs at hand anymore. Jun 15, 2017 at 16:44
  • It was version 2.5.5. The DVD is a common DVD with a concert on it, with 23 chapters. And it failed here to initialize at all.
    – landroni
    Jun 15, 2017 at 16:50
0

Although the problem has been resolved, I still want to share another great Linux DVD ripping freeware I love – AcidRIP. AcidRIP is small and efficient, and allows me to transcode my DVDs just one button click.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .