These are mostly notes to myself. These all comply with the UK's new copyright laws. Check your local laws, kiddies!
DVD-Audio (called DVD-A or DVDA) never really took off. It's hard to find the discs and compatible hardware. Nevertheless, I want to listen to these high-resolution audio tracks under Linux. In these examples, I'm using Ubuntu - but any modern system should cope.
In theory, DVD Audio Tools should work. In practice, I found no guide to compiling the software and the pre-built binaries just didn't work. If anyone knows how to get this working, I'd be grateful if you could let me know.
You can either point DVDAE at your DVD drive, or manually extract the AUDIO_TS folder to your hard disc.
Open up any of the .IFO files, you'll get a list of the tracks available. Select the ones you want to extract and hit save.
After a few moments, the tracks will be ripped onto your computer.
Playing .MLP Files
If you're using VLC or similar, you should be able to play the files. If you're using XBMC / Kali / OpenElec, you'll need to add the following to "/storage/.xbmc/userdata/advancedsettings.xml"
<advancedsettings> <audio> <defaultplayer>dvdplayer</defaultplayer> </audio> <musicextensions> <add>.mlp</add> <remove></remove> </musicextensions> </advancedsettings>
Converting .MLP Files
FFmpag / avconv will quite happily convert .mlp files into flac / ogg / anything else you like.
avconv -i track.mlp trac.flac
Is sufficient to convert the file.
There is one small problem. FLAC does not support 32 bit files. While the documentation for avconv suggests that using "-sample_fmt s32" will work, it will either silently drop back down to 16 bit or simply not work.
Quite how much sonic information you will lose by going from 32bit to 16bit is up for debate. Basically, unless you really do have amazing hearing, professionally calibrated studio equipment, and no ambient noise. Even then, most of what you're losing is noise.
On the other hand, disk space is relatively cheap. A typical .MLP file will be reduced by 50% - 60% when converted to FLAC based on my tests.
One thing I did find was that some equipment would get the order of the FLAC channels mixed up, or upconvert the sound to 5.1. Have a play with your equipment and see what works.
DTS WAV Files
Some surround music is available as DTS (yup, just like on DVDs). It's encoded as a straight .WAV - the idea being that you digitally stream the WAV to your equipment, your HiFi detects that is actually a DTS bitstream and plays glorious surround sound. If any part of this goes wrong, you'll hear static. Not nice.
Sometimes, avconv won't automatically detect the DTS encoding
avconv -i dts.wav Input #0, wav, from 'dts.wav': Duration: 00:04:08.70, bitrate: 1411 kb/s Stream #0.0: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
in which case, just force it to see the DTS - you can ignore any errors
avconv -f dts -i dts.wav [dca @ 0x19dc840] Not a valid DCA frame [dts @ 0x19d27c0] max_analyze_duration reached [dts @ 0x19d27c0] Estimating duration from bitrate, this may be inaccurate Input #0, dts, from 'dts.wav': Duration: 00:04:08.70, start: 0.000000, bitrate: 1411 kb/s Stream #0.0: Audio: dca (DTS), 44100 Hz, 5.1, s16, 1411 kb/s
You can then convert to any other format you like.
Most DVD-A discs also contain a slightly lower quality copy which can be played as a normal DVD. Sweet!
I use MakeMKV to extract the regular DVD portion. I've written a brief tutorial about using it on the command line.
Once you have your .mkv you have two choices. Either leave it as it is - you get the benefit of chapter markers at the cost of a higher file size due to the video content. Or rip the audio straight out.
avconv -i whatever.mkv -acodec copy audio.ac3
Generally, a much smaller filesize than the .mlp - have a listen to see if you can notice the loss of fidelity. Annoyingly, converting AC3 to FLAC will increase the file size.
Incidentally, if you want to rip, say, the 2nd audio track - if you've got multiple audio tracks on a disc:
avconv -i whatever.mkv -map 0:2 test.flac
For some reason, neither MakeMKVcon nor avconv can extract PCM audio from DVDs. For this, we have to use mplayer:
mplayer -vc null -vo null -ao pcm:fast -ao pcm:file=audio.wav dvd://1 -dvd-device /full/path/to/VIDEO_TS/
Takes a little while, but gets the job done. Naturally, the .wav can be converted to flac.