Thursday, January 14, 2010

Playing and Ripping DVD-Audio With Your PC

DVD-Audio, or DVD-A, was one of the audio formats that was suppose to replace CDs. The other was SACD. Both of these formats are a big improvement in audio quality. Not that redbook CD is a bad format. It actually is quite good when done right. DVD-A supports higher resolution and more channels than CD, which as you know only gives you 2 channels for stereo playback. DVD-A can have up to 6 channels for surround sound. The DVD-A spec supports a bit depth of up to 24-bits and a sampling rate of up to 192 KHz for 2 channels and 96 KHz for more than 2 up to 6 channels. As you also probably know, DVD-Video, or DVD-V, also supports up to 6 channels of audio. The big difference between DVD-A and DVD-V for audio is the multichannel audio in a DVD-V is compressed using lossy compression methods like Dolby Digital (AC3) or DTS. The multichannel audio in a DVD-A uses a lossless compression method called Meridian Lossless Packing. DVD-A can also use uncompressed LPCM, but it can only handle a total bit rate of 9.6 Megabits/second. So high bit rate, high sampling rate multichannel files need to be compressed. Anyhow, MLP's lossless compression sounds exactly like the uncompressed LPCM, so there's no disadvantage to it. The MLPs will sound better than the same music compressed with Dolby Digital or DTS, so therefore it is a better choice for audiophile recordings.

I think DVD-A and SACD failed to become the next big mass market format for several reasons. The fact that they were competing formats didn't help and probably created some confusion. New hardware requirements probably kept some people from jumping in before knowing what format to buy, especially since they didn't want to make a mistake and buy equipment that may become obsolete (like Beta VCRs or HD-DVD players more recently). Another factor that may have impeded the growth in popularity for DVD-A might be the copy protection that prevented people from copying the music to their computers. At the time the DVD-A spec was completed in 1999, MP3s were becoming very popular and file sharing with Napster was increasing very rapidly. I think the last thing the record labels wanted was another format that was easy to copy. Consumers on the other hand wanted to copy freely. I'm not sure if this was a big deal because the size of a high resolution multichannel file is huge and wasn't very practical for filesharing.

The fact that there's not much music (or at least really popular) music on DVD-A doesn't help either. The big record labels weren't really releasing a lot of stuff on DVD-A. However there is some stuff from a few of the labels like Universal Music, EMI, and Warner Bros. Records, along with a few smaller audiophile labels like AIX Records and DTS Entertainment. Some of the DVD-A releases are older standard definition recordings that have been upsampled and remixed into 5.1 surround sound. I would assume a lot of the newer released music is not upsampled. Originally DVD-As were pretty expensive, but now you can find them for nearly the same price as CDs.

To many people surround sound is just a weird gimmick. Originally, it seemed the audio engineers didn't really know how to deal with it. Some mixed the audio so the listener was in the center of a room of performers and others tried to create a more traditional experience with the music coming from the front speakers and ambient sounds from the rear. This was suppose to sound more like a live performance. As far as I'm concerned, both of them work fine when mixed by an engineer that knows what he/she is doing. I guess it just depends on what effect the musicians want us to hear. I think surround sound gives a more accurate sound stage than can be achieved with just 2 loudspeakers. So I don't think it's a gimmick. I'm sure there's the possibility of someone mixing a surround recording that may just be annoying, but that was the case with some early stereo recordings. If you are really interested in the advantages of multichannel surround, you should check out ambisonics.net.

Enough of the background info... I have a couple DVD-A discs. Actually, I bought CDs that also included a DVD with the overall bundle. The DVD-Video disc portion included some in-studio videos and the DVD-Audio portion included the album mastered in high resolution 5.1 surround. Up until recently I haven't been able to play the DVD-A portion. First, I don't own a DVD-A player. Second, I don't own a Creative Labs soundcard, which was the only product that was bundled with a player that could play DVD-A discs. Now I can play the DVD-A discs on my computer without the Creative Labs soundcard using our prototype technology. However, the method I use will probably work with a lot of hardware. So here's how I did it:

The software application I used is foobar2000. You can download the current version here, which is version 1.0 as of 1/9/2010. Like a lot of open source projects, foobar2000 has been a fractional number release or in beta for a long time. Foobar2000 is an excellent audio player and fairly popular with people that want the best sound quality from their PC. However, it's not the prettiest or most user-friendly application and doesn't have some of the advanced capabilities of a few commercial players like J.River's Media Center. JRMC can't do many things that you can do with foobar2000. That's why I have both. When you install foobar2000, by default it will locate its files in your 'Program Files' folder. I run Win7 64-bit, so foobar2000 is located in my 'Program Files (x86)' folder.

Foobar2000 by itself won't play the DVD-A, for this you need the DVD-Audio Decoder and Watermark Detector input plugin for foobar2000. Download foo_input_dvda-0.3.4.zip (or a newer version if it is available when you read this) and unzip to your system. Inside the zip file (and now the unzipped folder) you should find a file named 'foo_input_dvda.dll'. Copy or move this file to the foobar2000 components folder. This is a folder located inside the '\Program Files\foobar2000\' folder called 'components'.

Before you run foobar2000 and try playing a DVD-A, make sure you aren't running the CSS protection from DVD-Videos, like AnyDVD or AnyDVD HD. These programs ignore DVD-Audio CPPM protection, but somehow confuse the drive into behaving like protection is missing. I'm not sure exactly why this is, but just understand that you'll need to disable programs like AnyDVD before this will work. Also realize that if you like to copy DVD disc images to your computer or server using AnyDVD, it won't work with DVD-A discs. They'll copy okay, but AnyDVD doesn't remove the CPPM protection and the resulting ISO disc image won't play. You need a program like DVDFab, which can handle DVD-A. For this example we aren't going to copy the ISO disc image, so DVDFab isn't needed. Just remember that you still need to disable AnyDVD.

Go ahead and start foobar2000. I don't remember exactly what happens the first time you run it, but at this time just accept the defaults. For the user interface settings, I think I settled on 'Album List + Properties (tabbed)' for the main layout, with colors set to 'Forum' and the default playlist layout.

Next, insert your DVD-A into your DVD drive and wait a few moments for your system to read the disc. Then in foobar2000, use the 'File->Open' command to select your DVD-A file. You'll need to navigate to the disc's 'AUDIO_TS' folder. It should look something like this:


As you can see there's a bunch of files with the extension AOB and one with IFO. It's hard to tell what tracks are included in each AOB, so I just chose the IFO file and it brings up everything.

In the example above, each track on the DVD-A is listed. Some are six channel and some are 2 channel. The track title shows the number of channels, the bit depth and sample rate. In this case 'Lf-Rf-Ls-Rs 24/96000 + C-LFE 24/96000' means it includes the left-front channel, the right-front channel, the left-surround channel, the right-surround channel at 24-bit and 96 KHZ plus the center and LFE (low frequency effects or subwoofer) channel.

When foobar2000 opens a file, it will immediately start playing the first track. Which it did in my case. Now you are playing the DVD's MLP files with your computer without any downsampling or conversions. As you can see, it doesn't use a database lookup service like freedb to provide the metadata tags for artist name, album, track name, etc. So you will have to enter this information manually. You can go ahead and edit all the metadata or track info to display the correct tags and the program will save the data and display it the next time you open and play your DVD-A. A good source for album info is allmusic.com. They include lots of info you can't find in the CD or DVD's jewel case. After you've edited the track info, it's automatically saved in a dvda_metabase subfolder in *.xml files. This folder is located in 'C:\Users\your-user-name\Application Data\foobar2000' (for Vista\Windows 7) or 'C:\Documents and Settings\your-user-name\Application Data\foobar2000' (for Windows XP) and the author of the plugin would like you to share it. This way other people with the same DVD-A won't have to manually input track info. All you have to do is send the new version of your .xml file (you can probably identify it by the time stamp) and send it to maxim.anisiutkin@gmail.com. In case somebody has already entered the data for your DVD-A and you'd like to take advantage of this shared info, you can download the latest dvda_metabase_XXXX.XX.XX.zip file from http://dvdadecoder.sourceforge.net site. Just unzip the .xml files and move them into your dvda_metabase folder.

Now that you can play your high resolution, multichannel tracks from your DVD-A with your PC, you might be interested in some adjustments you can make to take full advantage of your audio system. Many surround sound systems may have a combination of satellite speakers, full-range speakers and subwoofers. My surround system is made up of 4 Era D5 satellites, 1 ERA D5 LCR and an Era Sub10 subwoofer. The D5s have a pretty good frequency range for bookshelf sized speakers, but they still need a little help below 60 Hz. My big 3-way towers reproduce the bass much better. With bass management software you can redirect audio below a specified frequency to the subwoofer channel. This will substitute the bass missing from the satellites and redirect the bass to the sub. Since low frequencies are non-directional, it should sound just as good as if you had full range speakers. This also depends on the quality of your sub. In my case, the Era Sub10 subwoofer is very good. Some audio drivers may include some bass management features. Microsoft introduced this capability with Vista, but your device has to support their in-box class drivers which take advantage of the SysFX DSP features. If you don't use in-box class drivers and your audio drivers don't include any bass management capabilities, you may want to download the Channel Mixer plugin for foobar2000. The author of the Channel Mixer plugin also created the Matrix Mixer, which might eventually provide more flexibility.

Since I have a big media server, which I use to store all my ripped music and videos, I prefer to do the same with the tracks from my DVD-As. I don't think it is possible to save the tracks as individual MLP files. So I'd like to rip the MLP tracks into individual multichannel FLAC (free lossless audio codec) files. Since FLAC is also lossless, these will be virtually identical to the MLP and almost every player supports FLAC. Converting to FLAC is very easy with the DVD-Audio Decoder plugin and a standard converter component that ships with foobar2000. The converter component is used to convert (or transcode) from one audio format to another. Even though foobar2000 natively supports FLAC, you will need the FLAC command line tool for this to work with the foobar2000 converter. I just downloaded the latest 'exe' that was available and ran the installation routine. All you really need are the core tools, but it won't hurt to include the FLAC Frontend and FLAC Tester. I did not include the source code for my installation. By default, it will create a subfolder in your 'Program Files' folder and install all the files you need. Now you should be ready to rip the DVD-A MLP tracks into FLAC files. Here's what you do:

In foobar2000, select all the tracks you want to convert to FLAC. In my case, I'm only converting the multichannel tracks. As you can see, I already edited the track info for my album.

Move your mouse over any of the highlighted tracks and right click. From the menu pick Convert. This will activate the Converter Setup:

In the setup dialog set the output format to FLAC. You can adjust the FLAC level by clicking on the '...' button. The larger the level, the tighter the lossless compression resulting in a smaller file. This also takes longer to generate because of the additional calculations. I just used the default level 5. For now I'm just going to rip these tracks to a folder on my Desktop. I'll move them to my media server later. In the 'Output files' section I selected 'Convert each track to an individual file' and created a naming format of '%track%-%title%'. The preview box on the right shows how each file will be named. I'm going to accept the defaults for everything else and pick 'OK' to start ripping.

The first time you do this, the converter will ask for the location of FLAC command line encoder. Navigate to where you just installed the FLAC stuff (in my case it is 'C:\Program Files (x86)\FLAC') and select the flac.exe file and pick 'Open'.


Now it should start converting the MLP tracks into FLAC files.

That's it!

20 comments:

  1. You can also use DVD Audio Extractor to rip DVD-Audio discs. Originally, it only worked with DVD-Video discs, but as of v5.0.1 they added support for DVD-Audio. See later post on ripping DVD-Videos for more info on this program. Or, check out:

    http://www.castudio.org/dvdaudioextractor/

    ReplyDelete
  2. Here my post about ripping DVD-Videos:

    http://amplioaudio.blogspot.com/2010/02/extracting-audio-from-dvd-video.html

    ReplyDelete
  3. If you want to learn more about surround sound or you'd just like to share your enthusiasm with like minded people, check out this Google Group:

    http://groups.google.com/group/SurroundSound?hl=en

    ReplyDelete
  4. Dear Gregg,

    First of all, thanks for a nice article. However, you forgot to mention how you actually play those uncompressed, multichannel flacs. As far as I know, unless you convert the stream to 6 analog outputs with a sound card — and you said you don't have one — you cannot output 6 pcm channels. A possible way would be to output the entire multichannel stream as bits via toslink. But this does not work as toslink cannot carry more than 2 pcm channels. Therefore, I have no idea how you can play lpcm, multichannel audio via a receiver. The only other possibility would be to transcode the flac file into TrueHD or DTS-MA or something, and feed that stream to the receiver for decoding. But, again, I don't think those encoders are readily available. So, I'm surprised you say you can listen to 5.1 uncompressed music from your laptop.
    What is your opinion?

    Many regards,
    Aris.

    ReplyDelete
  5. I don't think I ever said I don't have a sound card. My prototype is basically an external multichannel soundcard. It also happens to include amps for each channel. The software I use to play music, etc., decodes whatever audio file format, lossless FLAC, etc., to PCM and streams it to my DACs. The player software sees my hardware as an 8 channel audio device and if I'm playing a surround recording, it sends each channel to the matching DAC channel. My DAC converts each channel to an analog signal and the analog signal is passed to the amp module for that channel. The amp modules have binding posts which connect to the loudspeakers.

    ReplyDelete
  6. Dear Gregg,
    First of all, thanks for the prompt reply. I am sorry I didn't understand that although you don't have a Creative Labs multichannel card, you actually do have some other type of multichannel sound card, so that makes sense now. I only have a toslink and an Apogee 2-channel external DAC. So, in my case your procedure wouldn't work. However, I have finally managed to find software that converts the MLPs to 6-ch LPCM and puts the tracks in a AVHCD container. The program is called multiAVHCD and, with it, I can now burn 5.1 LPCM on a BD-R disc and play the music on my Blu-ray player. So, all was good in the end. Now, I just need to find someone with a BD-R burner!

    ReplyDelete
  7. The SACD and DVD-Audio not becoming too much of a mass product can be contributed to their competition as well as copy protection and fear of bought products becoming obsolete as you said.

    But isn't one of the factors that it simply does not appeal to the everyday user as much as to an audiophile?

    An average person looking for a sound system does not go "oh it has 8bits more than a CD lol, gonna buy that"

    Great read, interesting article.

    http://www.dvd-audio.net/

    ReplyDelete
  8. Anonymous-

    I agree, the DVD-Audio and SACD formats appeal much more to audiophiles and lack of interest from everyday users may have been an important reason for their failure with the average person. However, it's kind of like the question, "which came first, the chicken or the egg?" Wouldn't there be more interest if the labels produced more content in these formats? If there had been more interest, the hardware manufacturers might have produced more universal players and the prices would have come down faster. Then the average person, who would have owned one of these cheaper players and given the choice between CD and DVD-A or SACD, might choose the DVD-A or SACD.

    It'll be interesting to see what happens with Blu-ray. For those people who purchased a big flat screen HDTV and a new Blu-ray player, they will most likely appreciate the improved video quality from the Blu-ray when compared to their DVDs. They might also decide to upgrade their audio equipment (if they haven't already) to try and get similar high quality sound improvements. So they might end up purchasing more Blu-ray music that will take full advantage of their system. There's already a lot of concerts on Blu-ray and a few small labels are beginning to release some high resolution music on Blu-ray as well.

    ReplyDelete
  9. Hey there....I've got a bunch of DVD-As and SACDs and want to find out how to rip these (via Mac) to files that I can play through a Peachtree Nova (via USB). Any ideas how I can get the tracks off the discs to my Mac, what software to use, and what kind of files to save them as? Thanks!

    ReplyDelete
  10. I'm not a Mac user (at least not yet), so i can't tell you what programs to try. However, you can try asking at this Google Group:

    http://groups.google.com/group/SurroundSound

    ReplyDelete
  11. As for ripping SACD, here are a few message threads talking about some success. Not sure if it will apply to Mac users.

    http://www.ps3sacd.com/forums/viewtopic.php?t=341

    http://www.computeraudiophile.com/content/SACD-ripping-using-your-PS3-Linux-yes

    When I get a chance I am going to try to learn about this as well.

    ReplyDelete
  12. i agree that DVD-Audio, or DVD-A, was one of the audio formats that was suppose to replace CDs. But I have no idea how you can play lpcm, multichannel audio via a receiver. Please, give me more detail if you can. Thanks a lot.
    DVDFab 8

    ReplyDelete
  13. Anonymous-

    If your receiver has analog inputs for 5.1 or 7.1 multichannel audio, you could use your receiver as just a preamp/amp and bypass the DAC functionality. The S/PDIF interface to your receiver doesn't support the high resolution, multichannel format of MLP (DVD-A) or LPCM. It is limited to 5.1 16-bit 48KHz, so you have to use the analog connections.

    There are 2 options:
    1) buy an external multichannel DAC and connect the analog outputs to your receiver's analog inputs. There are many pro-audio DACs that will work. Most use a FireWire or USB2 interface (in either case, they probably use proprietary drivers for Windows that may not support all of your applications for playing music and/or movies). These pro-audio DACs have good to great performance, but can be pretty expensive. Before investing in any of these products be sure to confirm that they support multichannel audio playback on a PC (or that Windows will recognize their product as a multichannel device. If you are on a Mac and the DAC has USB2 support, you may be good to go (but then again, none of the apps I talk about in this post work on a Mac). Our first prototype used an Echo Audio Audiofire 8 and they have good stable multichannel drivers. It has a FireWire interface, so it will only work if your PC also supports FireWire.

    2) use your PC's built in DAC or a soundcard and connect the analog outputs to the analog inputs of your receiver. If you are using your motherboard's onboard sound, this will probably be a compromise because these DACs are probably not as good as your receiver's DACs. If your are using a soundcard, such as the ASUS Xonar, you might be pleased with sound quality because the DACs on the Xonar are probably better than the DACs on a lot of consumer A/V receivers. There's a lot more to the sound quality than just the DAC specs, but you probably know that...

    ReplyDelete
  14. Thank you for the great article.

    Is it not possible to output a 5.1 or 7.1 digital stream from the PC to an AV Receiver via HDMI? I am hoping to play a dvd-a in my PC's DVD drive. Or to rip the tracks from a dvd-a, save them to a folder and play that on my PC with the resultant digital stream sent to my AV receiver via HDMI.

    I look forward to your advice.

    Thanks again,

    Frank

    ReplyDelete
  15. Thank you for the great article.

    Is it not possible to output a 5.1 or 7.1 digital stream from the PC to an AV Receiver via HDMI? I am hoping to play a dvd-a in my PC's DVD drive. Or to rip the tracks from a dvd-a, save them to a folder and play that on my PC with the resultant digital stream sent to my AV receiver via HDMI.

    I look forward to your advice.

    Thanks again,

    Frank

    ReplyDelete
    Replies
    1. Frank - I'm afraid I'm not going to be of much help here. I've never tried connecting an AV Receiver to my PC via an HDMI cable, so I don't know how exactly it works. However, with the right drivers I don't know why it wouldn't. HDMI has the bandwidth to support up to 7.1 channel 24-bit / 96 KHz (or maybe 192 KHz) audio files. It probably depends on the audio drivers installed on your PC and the software you use to play these files. If your PC doesn't see your audio device as a multichannel device, then it might be tricky. Good luck.

      BTW, for some strange reason I didn't receive the notice for your post until today. Sorry it's taken so long to respond.

      Delete
    2. Thank you Gregg. I do use HDMI from my PC to my AV receiver at 5.1 and 7.1. And it works fine. I run DVDA audio to the receiver in that manner after ripping the tracks to my HD. Not sure why I thought it might not work. I use Foobar2000 to play the ripped tracks. Also do DTS-MA in the same manner.

      Thanks again Gregg.

      Frank

      Delete
  16. I have several FLAC downloads from HD Tracks that are Warners Bro's lables. They apprently have a watermark that prevents them from being played in my Esoterric Universal player fom the derived DVD-A I burned. Can this watermark be removed somehow before I convert the FLAC to DVD-A?

    ReplyDelete
    Replies
    1. I don't know how to remove watermarks. I don't burn my ripped DVD-A to a disc. I rip them to FLACs and then play them from my computer with J.River Media Center or foobar2000. Both of these programs can play a watermarked file.

      Delete
  17. Watermark can not be remove they are inside the file like audio is in dvd video file. Most receiver pick up the signal went the are copy and shut down the audio because the signal of the watermark do not match anymore with the copy. There are some receiver that do not have Watermark protection in them and will play copy.

    ReplyDelete

Powered By Blogger