Sunday Oct 21, 2007

How to burn high resolution DVD-Audio DVDs on Solaris and Linux (And it's legal!)

This weekend I've burned my first DVD-Audio DVD with high resolution music at 96 kHz/24 Bit.

It all started with this email I got from Linn Records, advertising the release of their Super Audio Surround Collection Vol 3 Sampler (Yes, targeted advertising works, but only if customers choose to receive it), which is offered in studio master quality FLAC format files, as a download. Gerald and I applauded Linn Records a few months ago for offering high quality music as lossless quality downloads, so I decided to try out their high resolution studio master quality offerings.

The music comes as 96kHz/24 Bit FLAC encoded files. These can be played back quite easily on a computer with a high resolution capable sound card, but computers don't really look good in living rooms, despite all the home theater PC and other efforts. The better alternative is to burn your own DVD-Audio and then use a DVD-A capable DVD player connected to your HiFi-amplifier to play back the music.

There's a common misconception that "DVD-Audio" means "DVD-Video" without the picture which is wrong. DVD-Video is one standard, aimed at reproducing movies, that uses PCM, AC-3, DTS or MP2 (mostly lossy) for encoding audio, while DVD-Audio sacrifices moving pictures (allowing only still ones for illustration) so it can use the extra bandwidth for high resolution audio, encoded as lossless PCM or lossless MLP bitstreams. Also, note that it is not common for regular DVD-players to accept DVD-Audio discs, they must state that they can handle the format, otherwise you're out of luck. Some if not most DVD-Audio Discs are hybrid in that they offer the content stored in DVD-Audio format additionally as DVD-Video streams with one of the lossy DVD-Video audio codecs so they can be played on both DVD-Video and DVD-Audio players.


Now, after having downloaded a bunch of high-res FLAC audio files, how can you create a DVD-Audio disc? Here's a small open source program called dvda-author that does just that: Give it a bunch of FLAC or WAV files and a directory, and it'll create the correct DVD-A UDF file structure for you. It compiles very easily on Solaris so I was able to use my Solaris fileserver in the basement where I downloaded the songs to. Then you give the dvda-author output directory along with a special sort file (supplied by dvda-author) to mkisofs (which is included in Solaris in the /usr/sfw directory) and it'll create a DVD ISO image that you can burn onto any regular DVD raw media. It's all described nicely on the dvda-author How-To page. Linn Records also supplies a PNG image to download along with the music that you can print and use as your DVD-Audio cover.

And how about iPods and other MP3-Players? Most open source media players such as the VideoLan Client (VLC) can transcode from high resolution FLAC format to MP3 or AAC so that's easily done, too. For Mac users, there's a comfortable utility called XLD that does the transcoding for you.

Here's common misconception #2: Many people think AAC is proprietary to Apple, mostly because Apple is heavily advertising its use as their standard for music encoding. This is wrong. AAC is actually an open standard, it is part of the ISO/IEC MPEG-4 specification and it is therefore the legitimate successor to MP3. AAC delivers better audio quality at lower bitrates and even the inventors of MP3, the Fraunhofer IIS institute treat AAC as the legitimitate successor, just check their current projects page under the letter "A". Apple developed the "Fairplay" DRM extension to Quicktime (which is the official MPEG-4/AAC encapsulation format) to be able to sell their iTunes Music Store as a download portal to the music industry. Fairplay is proprietary to Apple, but has nothing to do with AAC per se.

As much as I love Apple's way of using open standards wherever possible, I don't think it's a good thing that their marketing department creates the illusion of these technologies being Apple's own. This is actually an example of how AAC suffers in the public perception because people think it's proprietary where the opposite is true.

How is the actual music, you ask? Good. The album is a nice mixture of jazz and classical music, both in smooth and in more lively forms, great for a nice dinner and produced with a very high quality. Being a sampler, this album gives you a good overview of current Linn Records productions, so you can choose your favourite artists and then dig deeper into the music you liked most.

There's one drawback still: The high-res files available on the Linn Records download store are currently stereo only, while the physical SACD releases come with 5.1 surround sound. It would be nice if they could introduce 5.1 FLAC downloads in the future. That would make downloading high resolution audio content perfect, and this silly SACD/DVD-Audio/Dolby-TrueHD/DTS-HD Master Audio war would finally be over.

P.S.: A big hello to the folks at who were so kind to link to my previous high resolution audio entry!


Monday Aug 13, 2007

So, where's the future of HD Audio?

Gerald Beuchelt gives a nice overview of the two HD Audio formats SACD and DVD-Audio in his blog "Web Services Contraptions".

IMHO, the audio industry has two big problems with HD Audio:

  1. Too few consumers/retailers/publishers care about HD Audio turning it into a small niche,
  2. this niche is scattered across many different formats.

Let's look at the first point for a second: Since the introduction of the CD, the consumer has been conditioned into thinking that 16 Bit/44.1 kHz is "good enough" to present audio to the human ear in a quality that is indistinguishable from the real thing. At the time (the 80s) it made sense from a marketing perspective as a successful industry effort to introduce a major new medium. But the truth is that neither 16 Bit dynamic resolution nor 44.1 kHz frequency range is really enough:

  • According to this table (though this other table is more fun), A symphonic orchestra reaches a sound level of 110 dBA, a rock concert 120 dBA (which is the threshold of pain). Yes, a good classical piece of music at high volume can be a lot of fun, I recommend Edvard Grieg's "In the Hall of the Mountain King" for your first steps into classical pogo-music, but I digress.
    The CD's 16 Bit of resolution allow the representation of signals with up to 96 dB of dynamic range, so emulating a symphonic orchestra is out of the question. Ok, your comfortable volume may be less than 96 dB, but if you want to listen to a highly dynamic piece of music (a piece of music that both contains very low-volume and very high volume pieces) and enjoy a good SNR, then the CD is pushed to its limits. Most professional audio equipment therefore agrees to use 24 Bit encoding.
  • 44.1 kHz of sampling frequency allows the accurate representation of sounds up to 22.050 kHz which is indeed beyond the human auditory range, but this is not enough: The more a high-pitch tone approaches the sampling frequency, the less possibilities there are to encode it's phase. Phase differences between the two stereo channels are very important: Your ears and your brain use them to derive the exact location of the sound. The CD resolution of 44.1 kHz only allows for the accurate representation of phase difference in the range of .05 milliseconds, which is less than what your ears can actually measure. In other words: If you listen to your classical favourite CD, but can's quite make out where on the stage a flute is playing, it may be that you need more than 44.1 kHz sampling rate.
    Another problem with 44.1 kHz sampling rates is that they do not allow to represent overtones higher than 22.050 kHz. This affects the fine nuances that distinguish high quality instruments from regular ones. That Stradivari might sound like a cheap replica if you're listening to it from a regular CD.
  • In addition, CDs only allow to store 2 channels (stereo) of audio. Anybody who has enjoyed a live concert, either rock or in a music hall, can experience that real life has more than two front channels.

The bottom line: Your ears and your hearing system in the brain is a remarkably accurate measuring system for audio signals and the CD does not do it justice. Check out this great article on "Music and the Human Ear" for some more amazing insights.

So, issue #1 is that the average consumer thinks CDs are good enough, CDs are it and why should they invest money in something that claims to sound better? Especially when people today are using MP3 to massacre their sound save valuable storage space. They don't know what they're missing!

Issue #2 is non-technical, non-biological, but purely business-related: High definition audio formats have been at war with each other since a long time. Here is a selection of what's available today:

  • Vinyl: Yes, they are still alive and there's a big community of people who will swear that their vinyl records sound much better than CDs when played on proper equipment. Some factors here are related to the limitations of CDs vs. analog recordings, some are purely psychological, but altogether, the Vinyl market is still there (just search for "vinyl" on Amazon) and it apparently is worth doing business with.
  • SACD: SACDs go beyond traditional digital PCM encoding by using a form of encoding called DSD, which essentially means using a very, very high sampling frequency (2.8 MHz) and recording a single bit that tells you if the wave has been going down in amplitude or up since the last sampling. Hybrid SACDs are backwards-compatible to CDs and they can store music both in stereo and in surround sound.
  • DVD-A: DVD-Audio is a format that competes directly with SACD. It goes beyond the 16-Bit/44.1 kHz specification of the CD and offers up to 24 Bit/192 kHz of pure audio pleasure. Both stereo and surround sound are available but there's no backward-compatibility with CDs. DVD-Audio discs may have an additional channel with Dolby Digital encoded music that makes them backward-compatible with regular DVDs, at the expense of audio quality.

All three of the above enjoy a small niche market where any particular music piece may or may not be available in one or more of the above formats. But the future is even more flawed:

  • Media choice: The war between Blu-Ray and HD-DVD has only just begun. Both media types offer HD-Audio using a variety of codecs (see below), but there is no agreement on which one has to be present on each disc. Consumers therefore are confused on what kind of player to buy and most will probably wait and see who wins.
  • Codec choice: Assuming there was no Blu-Ray vs. HD-DVD war, the next level of confusion is what HD-Audio codec to choose from: Dolby and DTS are fighting for the better HD codec adoption, while other alternatives include Sony's DSD (see SACD) which is rumored to be expanded and Meridian Lossless Packing (MLP), the codec behind DVD-Audio.
  • Audio Connection Hell: We haven't talked yet about how to connect your media player to your multi-channel amplifier/receiver. With good reason: This article is already becoming longer than I intended it to be. Suffice to say: Connecting a high resolution media player with an amplifier is a non-trivial task. You either have to use standard analog connections (which is difficult to do properly and kinda makes the whole point of digital high-quality music moot) or you may or may not be able to use a digital connection (depending on the proprietaryness of the codec, or the HDMI version, or whether your media player is from the same manufacturer than your receiver). The reason here has mostly to do with copy protection: If high resolution audio travels over a digital cable losslessly, the media industry wants to make it 100% sure it does so in an encrypted form to prevent copying.

So, issue two can be summarized as: The market for high resolution audio is already a small niche, and thanks to media wars, codec wars and connection/copy-protection wars, it split up into many confusing and even smaller sub-markets that make the hen-and-egg problem of introducing a new standard an unneccessarily hard factor, if not impossible.

Bottom line: So you've learned that the grass beyond 16-Bit/44.1 kHz can be greener, but the fence to overcome is unneccesarily high and thorny.

Gerald and I both love music in high resolution formats. Hell, we're even willing to spend more money on equipment and media because we know we'll get better quality, while our ears still can hear it. We may be part of a small niche, but I would argue that high-end niches are good and offer a nice business opportunity to both equipment vendors and content companies. So why, oh why is the industry making it so hard to hear your favourite music at a better than average sound quality?

Gerald's latest post is about Linn records, a company that offers high resolution, high-quality audio recordings on DVD-A, SACD, Vinyl and, tadah! as an electronic download. Kudos to them for being truly open and war-independent and forward-thinking in how they try to serve their customers. This evening I'll go to their website and download some music from them only for the sake of supporting this effort.

Happy listening! 



Tune in and find out useful stuff about Sun Solaris, CPU and System Technology, Web 2.0 - and have a little fun, too!


« July 2016