0

Is there a way to rip audio DVD into 24bit AIFF or ALAC files on Ubuntu?

2

This works for mp3 files by my understanding but could be useful:

Pop in your DVD of choice and inspect the disc using dvdrip, Mplayer, VLC or something else of your liking.

  1. Scan the disc TOC for title, chapter, and audio track numbers using the utilities from the transcode package; note the dvd device can be a real dvd device or the directory where you copied the VOB files:

    Issue Following command:

    $ tcprobe -i /dev/dvdrw1
    

    This should be the output (or something like it)

    [tcprobe] DVD image/device
    (dvd_reader.c) mpeg2 ntsc 16:9 only letterboxed U0 720x480 video
    (dvd_reader.c) lpcm en 16bit 48kHz 2Ch 
    (dvd_reader.c) ac3 en drc 48kHz 6Ch 
    (dvd_reader.c) subtitle 00= 
    (dvd_reader.c) DVD title 1/2: 16 chapter(s), 1 angle(s), title set 1
    (dvd_reader.c) title playback time: 01:54:21.07  6862 sec
    (dvd_reader.c) [Chapter 01] 00:00:00.000 , block from 0 to 293870
    (dvd_reader.c) [Chapter 02] 00:09:04.367 , block from 293871 to 532255
    [...]
    (dvd_reader.c) [Chapter 15] 01:43:07.832 , block from 3340117 to 3703349
    (dvd_reader.c) [Chapter 16] 01:54:20.832 , block from 3703350 to 3703357
    [tcprobe] summary for /dev/dvdrw1, (*) = not default, 0 = not detected
    import frame size: -g 720x480 [720x576] (*)
    aspect ratio: 16:9 (*)
    frame rate: -f 23.976 [25.000] frc=1 (*)
    audio track: -a 0 [0] -e 48000,16,2 [48000,16,2] -n 0x10001 [0x2000] (*)
    audio track: -a 1 [0] -e 48000,16,2 [48000,16,2] -n 0x2000 [0x2000] 
    [tcprobe] V: 164524 frames, 6862 sec @ 23.976 fps
    [tcprobe] A: 107.22 MB @ 128 kbps
    [...]
    

    Note, the important info above is:

    1. Which title has all the chapters and how many
    2. Which audio tracks are which format

    Typical music DVDs seem to have at least one LPCM stereo track and one AC3 surround track, and you'll generally want the PCM stereo track (although transcode will automatically convert the surround track if you want). You just have to specify which title, chapter(s), and audio track you want.

  2. Scan the desired audio track for the recommended scale parameter; if you go above this value you run the risk of clipping the signal, but if you don't scale at all it might not sound very loud compared to other mp3s:

    $ tccat -T 1,1,1 -i /dev/dvdrw1 -t dvd -a 0 -L -d 2 | tcextract -t vob -x pcm | tcscan -x pcm -d 1
    

    The above command grabs the first title,chapter,angle with the -T parameter, from the dvd drive (with the -i parameter, which could also be a directory with VOB files). The -a parameter asks for track 0 (the linear PCM stereo track) while the -L parameter loops through all the chapters, and -d increases the verbosity of the output. This gets piped to the tcextract command which looks for a pcm stream (note this parameter would be ac3 for the surround track 1). This in turn gets piped to tcscan, which scans the pcm data and will spit out the proper normalize value for the given audio track (or the whole disc). Without looping through all the chapters, the output from scanning just the first chapter looks like this:

    $ tccat -T 1,1,1 -i /dev/dvdrw1 -t dvd -a 0 -d 2 | tcextract -t vob -x pcm | tcscan -x pcm -d 1 T=3 1 1 1 1
    (dvd_reader.c) DVD title 1: 16 chapter(s), 1 angle(s)
    (dvd_reader.c) DVD playback time: 01:54:21.07
    [tccat] (pid=12865) processing chapter (1/16)
    (iodump.c) PAL DVD image/device
    [tcscan] audio frames=13620.67, estimated clip length=544.83 seconds
    [tcscan] (min/max) amplitude=(-0.996/0.996), suggested volume rescale=1.004
    [tcscan] V: 13620 frames, 544 sec @ 25.000 fps
    [tcscan] A: 8.50 MB @ 128 kbps
    [tcscan] CD:  650 MB | V:  641.5 MB @ 9892.1 kbps
    [tcscan] CD:  700 MB | V:  691.5 MB @ 10663.1 kbps
    [tcscan] CD: 1300 MB | V: 1291.5 MB @ 19915.2 kbps
    [tcscan] CD: 1400 MB | V: 1391.5 MB @ 21457.3 kbps
    

    The rescale value in this case may seem rather low at only 1.004, but each disc is different, so it's worth doing this step in the vast majority of cases. Make sure to scan all the chapters, and we'll use the suggested volume rescale value in the actual transcode command below.

  3. Now we can actually do the ripping, transcoding, and audio encoding all in one command, at least for mp3 output:

    $ transcode -i /dev/dvdrw1 -x null,auto --no_split -T 1,-1 -s 1.004 -a 0 -y null,raw -m zappa_plays_zappa.mp3
    

Source with extra tips and tricks.

  • One thing first some audio DVDs also have DTS tracks but no LPCM, You may want to use that track over AC3. Now, may be I got it wrong, but by volume rescaling you are changing the loudness of the audio signal? Wouldn't adding replaygain metadata be preferable (when encoding to lossless)? – LiveWireBT Feb 18 '14 at 16:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.