This month's article is in a different format from usual; normal service will resume next month. I recently scraped together some cash to buy a Blu-ray drive, and like every other user, I found there was no immediate way to play the disc other than reboot into an OS I won't mention. Therefore, this month, I cover Blu-ray-specific projects, highlighting individual parts of what later will become a whole in basic playback of Blu-ray discs—I hope.
According to the libbluray Web site: “libbluray is an open-source library designed for Blu-ray discs playback for media players, like VLC or MPlayer. This research project is developed by an international team of developers from Doom9.”
The Web site lists the project's features as follows:
Portability: currently supported platforms are GNU/Linux, Windows and Mac OS X. Dependencies are very limited.
Freedom: libbluray is released under a Free Software license, ensuring it will stay free.
Features: the library integrates navigation, playlist parsing, menus and BD-J.
Legal: libbluray is DRM-circumvention-free, and thus, safe to integrate in your software.
Fun: libbluray is a fun-to-hack-on project in its starting phase.
To install libbluray, you need to grab a binary from somewhere (like the Ubuntu Personal Package Archive, for instance), or you need to grab the source. To get the source, you need to have git installed. Once you have git, enter the following command:
$ git clone git://git.videolan.org/libbluray.git
Once that downloads, change into the new directory and compile like so:
$ cd libbluray $ ./bootstrap $ ./configure $ make
If your distro uses sudo:
$ sudo make install
If your distro uses root:
$ su # make install
The main note here is that “Most commercial Blu-ray are protected by AACS or BD+ technologies, and this library is not enough to play back those discs”. This is simply a library, and you'll need a player like MPlayer or VLC compiled against it. This is the first of several libraries I'm going to cover, so let's move on to the next.
To quote the libaacs Web site:
libaacs is a research project to implement the Advanced Access Content System specification. This research project provides, through an open-source library, a way to understand how the AACS works. This research project is mainly developed by an international team of developers from Doom9. NB: this project doesn't offer any key or certificate that could be used to decode encrypted copyrighted material.
According to the project page, libaacs features the following:
Portability: currently supported platforms are GNU/Linux, Windows, Mac OS X. The main dependency is libgcrypt for all cryptographic functions.
Freedom: libaacs is released under a Free Software license, ensuring it will stay free.
Legal: libaacs does not include any key or certificate and respects copyright.
Fun: libaacs is a fun-to-hack-on project in its starting phase.
The installation follows the same procedure as that for libbluray. If you're grabbing the source, enter:
$ git clone git://git.videolan.org/libaacs.git
Change into the new directory with the following command:
$ cd libaacs
Then, repeat the next few lines from my libbluray installation instructions.
Perhaps the missing link in basic Blu-ray playback, I translated this from a French Web site: “libbdplus is a library for decrypting protected BD + Blu-ray discs. Currently in development, the project will certainly be hosted by the VideoLAN team if legal clarification is achieved.”
However, finding this library seems to be a mystery in itself, which I'm guessing may be kept under wraps for legal reasons. On the first page of Googling, I came across this e-mail from the MPlayer archives: “Can you send me a link to the hidden libbdplus git? Or the source snapshot? Thanks.”
Indeed, I've seen references on other mailing lists referring to this trio of libraries being the key to basic playback. Although I couldn't confirm it with my one-and-only Blu-ray disc (and meager download limit), it seems that unencrypted discs can be played back with the first library, and these last two are needed for encrypted discs.
While I must stress from the outset that I couldn't get this to rip my only disc, it looks to be invaluable nonetheless. Also developed by the Doom9 folks, like libbluray and libaacs, DumpHD is a sleek GUI program for decrypting HD-DVD and Blu-ray discs and dumping the files onto your hard disk. According to the documentation: “DumpHD is a HD-DVD/Blu-ray decrypter based on the idea of BackupHDDVD by muslix64. The goal of this program is to make a perfect backup without any traces of AACS.”
Also according to the documentation, here are its key features so far:
Dual-Core supported decryption of EVO/M2TS files (for hard-disk-to-hard-disk speed records).
Support for every pack type of an EVO (including in-place decryption of ADV_PCKs, excluding Sequence Key Sections).
Decryption of every ARF protection type.
Multiple files (currently CLI only) or complete disc mode.
Usage of a key database to get the decryption keys or direct retrieval of the keys off the source disc.
Supports HD-DVDs for Standard/Advanced Content (but not both on the same disc), Blu-ray ROM BDMV.
Experimental Blu-ray recordable support (with multiple CPS Units, BDMV, BDAV with Aux Directories and Thumbnails).
Automatic BD+ removal using the BDVM Debugger or manually by supplying a correct Conversion Table (currently CLI only).
Streaming output of EVO/M2TS files to stdout.
Very much console output for free.
Although I don't have space to cover the installation properly, I did find this program in the Ubuntu repository, and as this is a trickier program, I hope it'll be in your distro archive too. Using DumpHD at least is easy. The only real input required from the user is to browse for the disc's path (/media/INCEPTION, in my case), as well as to browse for a destination. From here, you need to check only whether you want audio, video or both, and then click Dump.
Part of my problem appeared to be something to do with external libraries and helper applications, and their installation and pathing. So far, the documentation available is strewn haphazardly across README files, forums, man pages and so on, all as separate elements that are hard to track down. The same applies for the actual program files themselves, which is not fun. If anyone wants to help these guys with packaging, hosting, documentation (anything to make this a cohesive package), I swear I will cover this program again but in proper detail.
If you've reached this point of the article filled with despair and just want to watch a film with your new drive, there is one last resort: MakeMKV.
Before I continue, this is shareware—that horrid software model from the 1980s and 1990s. Nevertheless, installation is quite easy, and its GUI integration is simply excellent (it managed to include clever program choices when I right-clicked on the titlebar).
Still, you get only a trial period for Blu-ray functionality, at which point you have to pay for the program. Okay, you're thinking, that doesn't sound too bad. How much is it? It costs 50 euros. Last time I looked, that's about eleventy-billion in US dollars.
I might pay 50 euros for a commercial software player, maybe, but for a ripper, no, sorry. Anyway, I have 30 days of trial usage, and I'm desperate just to watch a film with my new drive, so let's push on.
Head to the Web site's Download page, where at the top, it has a link to a forum for Linux users. There you'll find all the information with excellent instructions for installation, with links to two tarballs you'll need. The installation went perfectly for me, and all I had to do was download and extract the tarballs, open a terminal in each folder, and copy and paste some commands.
The GUI is intuitive and largely self-explanatory, but I urge you to make sure the output folder is on a partition with enough free space to accommodate these massive files. Ripping something that's 30Gb makes something that's almost 30Gb as well. I guess this is to make the quality as 1:1 as possible, but I couldn't find anything to lower the bitrate for storage (half the point of ripping). Maybe I missed something in the GUI, but I don't think so.
When you get to the ripping stage, you need to choose which title(s) to rip, and be sure you choose the right ones on the first go. After a big wait, your MKV should be ready to watch. I hope you chose the right title!
Still, this isn't watching Blu-ray. It's ripping it. And, it takes some time too. “Can we watch the film at your place, honey?” “Certainly. I'll just rip it first and guess at which titles are the film and the special features, and hope I get it right on the first go.” Less than cool.
Just after writing that section, I found a guide on how to stream from MakeMKV to VideoLAN. This saves on ripping time, but it also has jittery performance, and when I tried it with MPlayer, it was very glitchy. For those wanting to try their luck with this alternative, the guide is available at themediaviking.com/software/bluray-linux.
And, that's about as much coverage as I'm willing to give a shareware program.
Linux and Blu-ray may be in a bit of a sorry state for now, but (encrypted) DVD also had many of the same problems in its first few years. When I first tried DVDs under Linux (longer ago than I care to remember), projects like xine were in their infancies. Only unencrypted DVDs (of which there weren't many around) could be played, and playback methods were primitive. No menus or navigation, no chapters and individual .vob files were played one at a time. The Next Chapter button in xine would skip to the next .vob file (if memory serves correctly).
Now we take Linux DVD playback for granted—at least for those of us in countries where libdvdcss isn't a problem. And, unless I'm using something OSS like VideoLAN, playing DVDs under Windows nowadays is actually more of a hassle than when I'm in my native Linux. So what about Blu-ray?
Currently, the projects for decrypting and playing Blu-ray discs are spread around the Net, disparate and unconnected. The streaming method mentioned at the end of the last section of this article shows it is at least possible to play encrypted discs, albeit in a bastardized form. Hopefully, we as a community can focus our efforts in whatever form we can—hosting, coding, documentation and so on—and reach the same point of maturity as projects like libdvdcss.
If I've made any mistakes along the way, I implore you to write in and correct me! I'd rather provide some kind of help with this issue than contribute misinformation.