The HandBrake package is now using the system intalled ffmpeg libraries instead of providing its own copy of libav static libraries. As usual, any feedback for issues you might encounter is welcome.
For new installs, head to the repository page.
The HandBrake package is now using the system intalled ffmpeg libraries instead of providing its own copy of libav static libraries. As usual, any feedback for issues you might encounter is welcome.
For new installs, head to the repository page.
There are multiple ways that one can try to make BluRay decryption and playback in Linux. Of course, after some googling and fiddling around, you can see that is quite simple even if not the different instructions are quite confused as they span across multiple iterations of software development.
First of all a brief introduction. It is all explained here in great detail on the BluRay Wikipedia page, this is just an extract.
There are two different types of encryption:
And one type of “enhanced” java embedded menu (even small apps, like internet connected browsers, etc.) that can run on the BluRay player:
If any of these is implemented in a disk you own, the thing you need to do is simply insert a disk and run the bd_info
command (from the libbluray-utils
package) against your BD/DVD device.
This, of course, does work if you have the proper decryption keys or software installed on your system. That is, by default, nothing. 🙂
So, to enable decryption of the discs, you can proceed in two different ways, one using only open source software (not really, as you need anyway keys and a JVM dump of a BluRay Player) or going through commercial software (free at the moment while in beta).
Unfortunately none of my BluRays worked with open source tools on my system. I was not even able to get the required keys with the aacskeys
program; so the proprietary software is my current choice.
In both cases, first of all enable the RPMFusion and the HandBrake/MakeMKV repository. Most of the keys required can be fetched from labDV, where you can also contribute back yours.
For the following examples I’m taking VideoLan as the main player, as it has good support (and a nice interface) to fiddle around with the various settings and is already available in RPMFusion.
First of all install libaacs
and libbdplus
from RPMFusion:
dnf install libaacs libbdplus
Then put the required AACS keys in a place, so that your AACS client can find them. For example:
mkdir -p ~/.config/aacs
wget -c http://www.labdv.com/aacs/KEYDB.cfg -O ~/.config/aacs/KEYDB.cfg
Now, VLC, using libbluray, should dynamically load the library if it finds it on the system and then decrypt the AACS protected content if the key for the specific disc is available.
Similar to AACS, put the required BD+ JVM dump in the appropriate folder, so that your BD+ client can find them. For example:
mkdir -p ~/.config/bdplus/
wget -c http://www.labdv.com/aacs/libbdplus/bdplus-vm0.bz2 -O ~/bdplus-vm0.bz2
tar -xvjf ~/bdplus-vm0.bz2 -C ~/.config/
Again, now libbluray should dynamically load the library if it finds it on the system and then decrypt the BD+Â protected content using the VM dump in your personal folder.
Do not forget to update the AACS keys and the VM dump every once in a while!
This is required if you have multiple user for the system and you want to avoid each user into maintaining its own set of keys and dumps.
After installing everything in your personal folder, you will end up with a structure like the following:
$ find .config/bdplus .config/aacs | sort
.config/aacs
.config/aacs/KEYDB.cfg
.config/bdplus
.config/bdplus/vm0
.config/bdplus/vm0/aes_keys.bin
.config/bdplus/vm0/device_discovery_1.bin
.config/bdplus/vm0/device_discovery_2.bin
.config/bdplus/vm0/device_discovery_3.bin
.config/bdplus/vm0/device_discovery_4.bin
.config/bdplus/vm0/device_discovery_5.bin
.config/bdplus/vm0/ecdsa_keys.txt
.config/bdplus/vm0/mem_area_02.bin
.config/bdplus/vm0/mem_area_03.bin
.config/bdplus/vm0/mem_area_04.bin
.config/bdplus/vm0/mem_area_05.bin
.config/bdplus/vm0/mem_area_06.bin
.config/bdplus/vm0/mem_area_07.bin
.config/bdplus/vm0/mem_free.bin
.config/bdplus/vm0/memory.map
.config/bdplus/vm0/mem_player_executable.bin
.config/bdplus/vm0/mem_player_name.bin
.config/bdplus/vm0/mem_player_version.bin
To move up everything to a common location, just performs the following commands:
sudo mv ~/.config/{aacs,bdplus} /etc/xdg
sudo chown -R root:root /etc/xdg/{aacs,bdplus}
That’s it!
This is done through MakeMKV, available from the HandBrake/MakeMKV repository, with the registration key available publicly from their forum. The software is fast, works really well, and although not open source is the only way to properly get access to your disks.
Support for external decoders has been added in libbluray
some time ago, and allows you to specify different libraries than libaacs/libbdplus
for decrypting content.
To proceed, remove the libaacs/libbdplus
libraries if you have them installed, and install MakeMKV:
dnf remove libaacs libbdplus
dnf install libbdplus
As explained in the repository page, the MakeMKV package sets up environment variables that override the default libraries using for decryption and just uses MakeMKV’s libmmbd
to launch a hidden MakeMKV instance for decryption in the background. To load the environment, logoff and login again, so it is picked up by any program starting.
After logging in, check that the environment is loaded with the following command:
$ env | egrep "LIBAACS_PATH|LIBBDPLUS_PATH"
LIBBDPLUS_PATH=/usr/lib64/libmmbd.so.0
LIBAACS_PATH=/usr/lib64/libmmbd.so.0
Then start VLC, select to open a BluRay disc, with or without the menus. Both will smoothly work as long as it is not a BD-J, as you can see in the pictures below. Menu is navigable, reactive to selections and clickable.
Now also the command bd_info
works fine, using the same mechanism.
BD-J support is still in its infancy, at the moment of writing, with the latest libbluray
0.8.1 I am able to get part of the menus working. Most of the time I just got a video loop where the menu should be but not the actual menu. This is much better than having just VideoLan crashing, though. 🙂
Support for this is enabled by installing the libbluray-bdj
package. The package puts an OpenJDK compiled Java Archive inside the classpath of the Java VM, so no further configuration is required. To install the package, just do:
dnf install libbluray-bdj
After this, in VideoLan you can just select “Open Disc”, “Blu-Ray” as the source and deselect “No disc menus”. As I said, support is not perfect, in the screnshot below I was able to see the menus but not click on them and in the background I was having a lot of errors.
I’m tracking the upstream project, so if the library can be rebuilt without breaking compatibility with the additional Fedora packages, I will add it to the repository along with MakeMKV. Before version 0.8.1 I was not even able to open a BD-J enabled BluRay disc with VideoLan.
All my BD-J enabled discs have a Playstation 3 firmware update on the disc. Don’t know why, but probably because Sony owns the BluRay format so they can do as they please. Meh!
As always, feedback is welcome.
Another batch of changes has reached the repositories in the last weeks. The updates have touched everything:
/dev/fb0
making the Plymouth transition even better on UEFI systems.As always, any issue just let me know. I’m in the process of moving and starting a new job; so please bear some patience if I don’t reply to you immediately.
Just came back from holiday and work travel; just in time for another batch of changes for the repositories:
x265
by default and uses even less bundled libraries. It also uses the system libappindicator
for notifications.Most of the repositories now support both Fedora 21 and 22, including HandBrake & friends.
Also, I’m building CUDA 6.5 packages now that it has been released. Testers welcome as usual.
Another batch of changes for the repositories. The HandBrake repository has seen some updates:
Please test it, I found it much more stable than the previous version. If it works, I might build it also for current Fedora releases.
Regarding the other updates:
As always, any issue just let me know.
I’ve udpated the HandBrake, MakeMKV and libdvdcss repository with my latest builds.
The Fedora builds still contain version 0.9.9 of HandBrake but I’ve extended the use of system libraries in place of the external ones with some notable differences:
Regarding CentOS/RHEL 6 builds, I’ve switched back to HandBrake version 0.9.8, which still contains a viable GTK interface for RHEL’s bundled GTK 2.20 libraries.
The build also uses system libraries for everything except faac, libbluray, libdca, mp4v2-trunk and ffmpeg. This means the previously contained libbluray package in the repository is no longer needed. Since I don’t want to bump the Epoch on HandBrake (I’m one of those that does yum upgrades between CentOS/RHEL releases) you need to sync your installed packages. Assuming you have the repository and version 0.9.9 already installed, perform this command:
yum distro-sync
And HandBrake-cli
, libbluray
and libdvdnav
should sync with the versions currenlty pushed into the repositories.
I’ve updated the repository page with the new information, the builds are currently being uploaded.
In addition to the normal HandBrake, MakeMKV and libdvdcss repository, I’m preparing the next set of HandBrake packages, whether they be the SVN version or different builds of the released version 0.9.9.
Considering that from version 0.9.9 HandBrake supports using system libraries in place of the external ones, I’ve built the Fedora 20 packages for x86_64
with a few additions:
Since I’m not sure about the stability of the program with its bundled libraries removed in favour of system ones and the forcing of Fedora’s GCC compiler options, I’m not pushing this updated packages in the repositories for a while; but instead I’m asking users to test it and provide some feedback.
$ rpm -q --requires HandBrake-gui | egrep -i "gst|x264|mkv|mpeg|mkv|a52|lame|blu"
liba52.so.0()(64bit)
libbluray.so.1()(64bit)
libgstaudio-1.0.so.0()(64bit)
libgstbase-1.0.so.0()(64bit)
libgstpbutils-1.0.so.0()(64bit)
libgstreamer-1.0.so.0()(64bit)
libgstvideo-1.0.so.0()(64bit)
libmkv.so.0()(64bit)
libmp3lame.so.0()(64bit)
libmpeg2.so.0()(64bit)
libx264.so.138()(64bit)
The package gets also 400kb smaller than the one with the bundled libraries. All the other libraries still bundled (faac, fdk-aac, libav, libdvdnav, libdvdread, mp4v2) cannot be removed due to patching and/or using different versions.
If you happen to have a Fedora 20 x86_64
system and would like to help, please install the HandBrake repository and then install the updated HandBrake packages:
yum install https://negativo17.org/repos/HandBrake/fedora-20/x86_64/HandBrake-gui-0.9.9-9.fc20.x86_64.rpm
If you also want the command line version:
yum install https://negativo17.org/repos/HandBrake/fedora-20/x86_64/HandBrake-cli-0.9.9-9.fc20.x86_64.rpm
And then let me know, by post comments or by mail.
Recent Comments