Howto rip audio out of already ripped DVD (VIDEO_TS)

Been on a Pink Floyd binge most of the last 2 weeks, mostly Dark Side of the Moon…

Anyway - I have a copy of Roger Wall’s “DSotM” DVD - two disks (series of live concerts circa 2007).

Disk Two is DSotM - and it’s all in a VIDEO_TS folder (I hate this stuff - why not rip to f–king MKV or MP4???)…**

Anyway - found this :
Extracting DVD-Audio on Linux, the modern(ish) way – Terence Eden’s Blog

But it assumes you’ve got a AUDIO_TS folder… I don’t!

I tried (after making it - surprisingly make install just “worked”!):

╭─x@titan ~/Videos/Music/WATERS-Roger-DTotM  
╰─➤  ~/tmp/libdvd-audio/dvda-debug-info -A DVD2/VIDEO_TS 
*** Error: "DVD2/VIDEO_TS" does not appear to be a valid AUDIO_TS path

Note : this is a purely archival offsite “backup copy” of the DVD - I no longer have access ot the physical media…

  1. I’d rather convert it to a pair of MKV files of both disks…
  2. I really only want the audio anyway…

I’d be happy enough just to get a couple of MONSTROUS WAV files (one for each disk)… I’ve used CLI methods a heap of times in the past (mostly through ffmpeg) to locate “silence” in big files to create CUE files to break up big files (WAV or FLAC) into smaller ones for each track…

DAMN! It’s looking like I may have to do this the “manual” clickety-click-click way through VLC - or maybe even install Handbrake… I vastly prefer to solve things like this with CLI tools…

** I suppose I should be greatful it’s not in AVI format - surely the worst VIDEO codec ever created! Amazed Apple tried to sue Microsoft claiming that AVI ripped off their Quicktime codec (was this an admission from them admitting Quicktime was shit too?) : AVI format - conveniently let in ActiveX content into AVI files, thus making them absolutely ideal for distributing malicious payloads!


Edit : Note : I already exhausted all avenues I can think off to buy a live CD or digital download / soundtrack… I “mostly” pay for the music I listen to… mostly… If you make it hard for me to get it in my region locked country - I will bypass you - there’s nothing more anti-capitalistic as region-locking consumers (other than drug prohibition)…

What exactly do you have now?
What exactly would you like to achieve?
(Do you have VTS###.VOB files, and want a .WAV with the audio from it?)

Yes :

╭─x@fenriz ~/tmp/WATERS-Roger-DTotM/DVD2/VIDEO_TS
╰─➤ ls -l
total 3182900
-rw-r–r-- 1 x x 12288 Jul 23 09:55 VIDEO_TS.BUP
-rw-r–r-- 1 x x 12288 Jul 23 09:55 VIDEO_TS.IFO
-rw-r–r-- 1 x x 22761472 Jul 25 22:16 VIDEO_TS.VOB
-rw-r–r-- 1 x x 55296 Jul 23 09:54 VTS_01_0.BUP
-rw-r–r-- 1 x x 55296 Jul 23 09:54 VTS_01_0.IFO
-rw-r–r-- 1 x x 112640 Jul 23 09:54 VTS_01_0.VOB
-rw-r–r-- 1 x x 1073709056 Jul 25 23:02 VTS_01_1.VOB
-rw-r–r-- 1 x x 1073709056 Jul 25 23:05 VTS_01_2.VOB
-rw-r–r-- 1 x x 1073709056 Jul 25 23:05 VTS_01_3.VOB
-rw-r–r-- 1 x x 13766656 Jul 25 19:59 VTS_01_4.VOB
-rw-r–r-- 1 x x 18432 Jul 23 10:05 VTS_02_0.BUP
-rw-r–r-- 1 x x 18432 Jul 23 10

Unlock achievement - would be one, or a series, of WAV files…

Just out of my head, I’d try:
cat VTS_01_1.VOB VTS_01_2.VOB VTS_01_3.VOB VTS_01_4.VOB | ffmpeg -i - out.wav

As I don’t have single DVD at the moment, can’t try if it works…
But should give a single wav, and I hope there’s only one audio channel in the VOB files.

2 Likes

Cheers mate - that worked a treat…

I did this though :

╭─x@fenriz ~/tmp/WATERS-Roger-DTotM/DVD2/VIDEO_TS  
╰─➤  for F in VTS_01*.VOB ; do echo $F ; ffmpeg -i $F $F.wav ; done

Now I need to either break out audacity, or try to interrogate the 4 WAV files for lengths of silence to split the tracks… But I may just be lazy and convert them to FLAC and just play it like that… The track order is the exact same way it was on the original album from 50 years ago… Can’t hardly believe it’s 50 years since it was released, I first heard it in 1975, my dad brought a copy home… I still have that copy on vinyl…


Just realised - there’s no silence between songs as it’s a live gig, but somehow there are content markers when I play it through VLC (e.g. I can see a “thingie” where Us And Them finishes, and Any Colour You Like starts)… I might just have to settle for no track breakup, or handcraft a CUE file manually…

1 Like

That was a fair amount of work - but got there in the end… Created a BIG WAV file… then used Audacity (took a few goes - first few attempts exported shonky low volume downsampled mono audio) to delete the tail end (the encore with mostly songs from The Wall) - then fade it out…

Then used sox to export the Audacity exported WAV to FLAC…


Actually - no strike that - Audacity f–ks up the audio quality… the exported file sounds muddy, compared to the FLAC file of the whole thing that I created from FFMPEG and SOX…

Reckon I’ll just tolerate the songs from The Wall in the encore at the end…

Sound is too good compared to the shite that Audacity outputs on export…

@daniel.m.tripp, Sorry for the question, but have you tried exporting the audio from Audacity in FLAC?

Jorge

I’m pretty sure, DVD has 48kHz sampling rate, whereas Audacity had a 44.1kHz default for a project. Did you check whether the sampling rate in Audacity matches the source, and also output with the same rate to avoid a conversion?

1 Like

I think those are chapter markers! :smiley:
Theoretically it must be possible to split data according to chapter markers, and my search lead to

It’s up to you to put the Lego bricks together :wink:

Yes - and it was hideously muddy and flat - the default option is to flatten all the channels to a mono file - I didn’t choose that - had to go into preferences and change that setting - but still ended up with sub-par quality output.

I know it’s possible - done it heap of times before, using shnsplit and cue files… I think I may have to watch the DVD and note down the times for each “track” or chapter marker… I can use that to create a cue sheet…

Note : I really can’t be bothered tweaking a whole encyclopedia of options in Audacity… I know how to do this with CLI stuff - i.e. the least interference with the output quality…

  1. I have a huge flac file and I’m happy with the quality - I don’t want to risk muxing it or muddying it in Audacity…
  2. I’ll watch the DVD again and note the timing markers for each song
  3. Use that information to put together a cue sheet

I’ve got dozens of sample cue sheets I’ve used in the past to split big flac files (or even mp3 files) :

╭─x@titan ~/MPZ/WAITS-Tom/Discography-FLAC/Studio albums/1973-Closing Time  
╰─➤  cat Tom\ Waits\ -\ Closing\ Time.cue
REM GENRE Singer/Songwriter
REM DATE 1973
REM DISCID B20AC00C
REM COMMENT "ExactAudioCopy v0.99pb4"
PERFORMER "Tom Waits"
TITLE "Closing Time"
FILE "Tom Waits - Closing Time.flac" WAVE
  TRACK 01 AUDIO
    TITLE "Ol' '55"
    PERFORMER "Tom Waits"
    INDEX 00 00:00:00
    INDEX 01 00:00:32
  TRACK 02 AUDIO
    TITLE "I Hope That I Don't Fall in Love with You"
    PERFORMER "Tom Waits"
    INDEX 01 03:57:67
  TRACK 03 AUDIO
    TITLE "Virginia Avenue"
    PERFORMER "Tom Waits"
    INDEX 01 07:52:32
  TRACK 04 AUDIO
    TITLE "Old Shoes (& Picture Postcards)"
    PERFORMER "Tom Waits"
    INDEX 00 11:02:55
    INDEX 01 11:02:57
  TRACK 05 AUDIO
    TITLE "Midnight Lullaby"
    PERFORMER "Tom Waits"
    INDEX 01 14:43:37
  TRACK 06 AUDIO
    TITLE "Martha"
    PERFORMER "Tom Waits"
    INDEX 00 18:08:58
    INDEX 01 18:10:27
  TRACK 07 AUDIO
    TITLE "Rosie"
    PERFORMER "Tom Waits"
    INDEX 00 22:40:40
    INDEX 01 22:41:07
  TRACK 08 AUDIO
    TITLE "Lonely"
    PERFORMER "Tom Waits"
    INDEX 00 26:43:48
    INDEX 01 26:44:32
  TRACK 09 AUDIO
    TITLE "Ice Cream Man"
    PERFORMER "Tom Waits"
    INDEX 00 29:56:25
    INDEX 01 29:57:17
  TRACK 10 AUDIO
    TITLE "Little Trip Heaven (On the Wings of Your Love)"
    PERFORMER "Tom Waits"
    INDEX 01 33:02:65
  TRACK 11 AUDIO
    TITLE "Grapefruit Moon"
    PERFORMER "Tom Waits"
    INDEX 00 36:40:12
    INDEX 01 36:40:72
  TRACK 12 AUDIO
    TITLE "Closing Time"
    PERFORMER "Tom Waits"
    INDEX 00 41:30:24
    INDEX 01 41:31:27

and shell scripts to show me / remind me how to do it :
## shnsplit -f Tom\ Waits\ -\ Closing\ Time.cue -o flac -t "%n %t" Tom\ Waits\ -\ Closing\ Time.flac

I’m almost there - got my CUE file - but now shnsplit is sooking that it can’t split 24 bit FLAC… And I tried to use sox to resample my 24 bit FLAC file to 16 bit - but still complaining…

I’ll get this resolved one way or another :smiley:


Hmmm - “file” command tells me BOTH are 16 bit :

╭─x@titan ~/MPZ/WATERS-Roger/tmp  
╰─➤  file DSotM-16bit.flac
DSotM-16bit.flac: FLAC audio bitstream data, 16 bit, 6 channels, 44.1 kHz, 134547320 samples
╭─x@titan ~/MPZ/WATERS-Roger/tmp  
╰─➤  file DSotM.flac 
DSotM.flac: FLAC audio bitstream data, 16 bit, 6 channels, 48 kHz, 146446063 samples

But different sample rates… I’d rather keep 48 kHz… Dangit - shnsplit has always worked for me in the past - but the error seems to be reasonably common :

╭─x@titan ~/MPZ/WATERS-Roger/tmp  
╰─➤  shnsplit -f DSotM.cue -o flac -t "%n %t" DSotM-16bit.flac  
shnsplit: warning: unsupported format 0xfffe (Unknown) while processing file: [DSotM-16bit.flac]
shnsplit: error: cannot continue due to error(s) shown above

and is attributed to being unable to handle 24 bit (even though “file” tells me it’s 16 bit)…

For me it’s in the bottom-left corner:


If it matches the source, it won’t convert sampling rate, and I bet what you hear “muddy” is a sampling rate conversion artifact.

2 Likes

OFFtopic:

Just fired up Spotify, and checked my daily mix, and on the second track I hear muddy sound.
Namely, “The Kind Hearted Woman” from Muddy Waters.

:grin:
Sorry for the joke, mate! :innocent:

Perfectly acceptable tangent, mate :smiley: :heart:

1 Like

There’s a tool that’s part of ogmtools called dvdxchap, it’s a command-line chapter index extractor. You give it a DVD source (VIDEO_TS directory on a filesystem is fine), and possibly a title number (since it can only extract chapters for one title at a time; slightly annoying), and it spits out something like… well, something like this:

[/path/to/some/VIDEO_TS] $ dvdxchap -t 2 -v .
libdvdread: Encrypted DVD support unavailable.
libdvdread: Couldn't find device name.
(dvdxchap.c) This DVD contains 3 titles.
(dvdxchap.c) Title 2 contains 12 chapters.
CHAPTER01=00:00:00.000
CHAPTER01NAME=Chapter 01
CHAPTER02=00:02:38.880
CHAPTER02NAME=Chapter 02
CHAPTER03=00:06:20.120
CHAPTER03NAME=Chapter 03
CHAPTER04=00:46:25.080
CHAPTER04NAME=Chapter 04
CHAPTER05=00:46:34.400
CHAPTER05NAME=Chapter 05
CHAPTER06=00:52:34.000
CHAPTER06NAME=Chapter 06
CHAPTER07=00:52:56.960
CHAPTER07NAME=Chapter 07
CHAPTER08=00:54:06.880
CHAPTER08NAME=Chapter 08
CHAPTER09=01:27:45.560
CHAPTER09NAME=Chapter 09
CHAPTER10=01:32:59.200
CHAPTER10NAME=Chapter 10
CHAPTER11=01:56:40.720
CHAPTER11NAME=Chapter 11
CHAPTER12=02:00:00.520
CHAPTER12NAME=Chapter 12

Yeah, I could be wrong, but I didn’t THINK it was possible to have 24-bit audio on a DVD. BluRay, sure. But I’d be surprised if that’s possible with a DVD. (Then again, I’ve been surprised before.)

2 Likes

Looks interesting - might check it out - but - I’d already created a cue file to use with shnsplit - but - no matter what I do, or what computer - it always barfs - tried it on flac file, wav file, tried using ffmpeg to convert the first WAV file to 44.1 khz…

╭─x@titan ~/tmp/dsotm  
╰─➤  /usr/local/bin/shntool split -f DSoTM.cue -o flac -t "%n %t" DSotM-44.wav
shntool [split]: warning: unsupported format 0xfffe (Unknown) while processing file: [DSotM-44.wav]
shntool [split]: warning: none of the builtin format modules handle input file: [DSotM-44.wav]
shntool [split]: error: cannot continue due to error(s) shown above

Tried on Ubuntu 23.04 on my Thinkpad, Pop! on my desktop machine, and MacOS 13.4 on my MBP M1…

Always the same thing… I’ve sampled and resampled the VOB files several times to WAV and always hit the same wall… Whether using WAV or FLAC.

╭─x@titan ~/tmp/dsotm  
╰─➤  file DSotM-44.wav                                                                                 1 ↵
DSotM-44.wav: RIFF (little-endian) data, WAVE audio, 6 channels 44100 Hz

Maybe 'cause it’s 6 channels?

Hmmm - I just used ffmeg now - to transcode the FLAC file to 2 channels… and now it works… Maybe I should try 4 channels?

Note : doesn’t work on 4 channels…

So - what I should have done after messing with this for the last 4 days - was set my output file to 2 channels (-ac 2) argument to ffmpeg!

I might look at that thing dvdxchap, as my cue file is pretty crap… didn’t split where I expected it…

Managed to use dvdxchap - got the chapter times… most of them correspond with what I manually documented from playing in VLC…

But they don’t seem to correspond correctly with the converted WAV or FLAC output I ripped from the VOB files using ffmpeg…

I did managed to create a 2 channel WAV or FLAC file, split it using times I got from dvdxchap - but - those times didn’t transpond correctly to what’s in the FLAC or WAV file.

Then I noticed - the 2 channel WAV or FLAC files are shonky low volume, I used sox to convert WAV to FLAC and also to transcode from 6 channels to 2… Loses a lot of definition… and the options for setting gain in sox seem nearly as obscure as regex!

I really can’t be arsed with this any longer - I’ll just tolerate playing one huge 48 khz 24 bit 6 channel FLAC file of Dark Side of The Moon (with stuff at the end I don’t necessarily want included - i.e. the encore is songs from The Wall) - it plays just fine in Sayonara on Linux, and “Music Player Full” on android… and it plays fine in Colibri (developed by one of your countrymen @kovacslt) on MacOS too…

SUCCESS (partial anyway) :

used “sox” and trim argument…

sox DSotM.flac DSoTM-1.flac trim 0 43:30

(43:30 is approx where the applause ends, before the encore) :

then separate file for the encore :

sox DSotM.flac DSoTM-2.flac trim 43:30

That’s a better solution for my money, than splitting them with shntools / cuetools!

I’m perfectly happy just to have two large files…

YAY VICTORY!

**shntools VS Dan Tripp: **
0:1

YOU LOSE SHNTOOLS!
Not that anyone’s keeping score (my arse, I’m keeping score alright, I’ll remember this next time shntools impedes my listening pleasure!)

Thanks sox - I think it must be pushing 40 years old now, I think I first used it about 25-30 years ago…

That was a fair amount of work, but you can’t (not when I looked anyway) buy this live recording in audio format… So I had to roll my own!


Note : that’s the best art I can find for this, but the DVD was actually from 2007, and Nick Mason didn’t perform - and I’ve already embedded it as metadata in the FLAC file (and sox kindly copied that from the source into the two new files).


To celebrate - my arvo listening is the original album, purchased on vinyl in 1975 for the princely sum of $3.50 :

Yes. Format 0xfffe is “extensible” wave format, which “means ‘either 24 bit, or > 2 channels’”.

…I’m not clear on whether shntool actually supports > 2 channel WAV audio. I can’t get its command-line help to tell me any arguments for the wav decoder that would allow you to specify a channel count.

So, it’s probably good that you switched horses there.

This was a great thread. Here’s some additional details for anyone who lands here looking to automate the sox-based splitting a bit using traditional cue method.

Since shntool and shnsplit – indeed – do not seem to support anything above 2-channel 16-bit audio, I expect that other people ripping DVDs will often find shntool falls short of their needs and agree another solution is required. In my case, I didn’t want to use sox trim directly for doing whole albums, as it can get unwieldy in the duration calculations and I’m already used to CUE files.

So I wrote a small script, hcuesplitter, to help (myself and) anyone else that is comfortable with command line / terminal programs get the job done quicker. First pass software, so expect bugs and no guarantees, but I hope it’s helpful!

2 Likes