38

So I recently bought a blu-ray drive since I started accumulating a bunch of movies and shows on the format, and I was wondering if linux/ubuntu can actually play them? If not it's fine I can just reboot into windows but I have vlc player, restricted extras and the stuff required to play dvds, and my ubuntu partition plays dvds just fine. I'm in Australia (region 4) if that changes anything

2
  • 2
    So wait, you have the blu-rays at home, and your laptop with ubuntu on it? I'm not understanding why you're asking this question instead of just trying it... Dec 26, 2014 at 11:33
  • 1
    I bought a blu-ray drive for my desktop and it hasn't arrived yet
    – wolfguy
    Dec 26, 2014 at 11:39

5 Answers 5

53

Open-source Blu-ray playback is a cat and mouse game, which involves constantly waiting for hackers to discover up-to-date keys to play more recent titles. But there is another option, involving partially proprietary closed-source software, which is (for the moment) free to use on Linux.

MakeMKV is an application that decodes Blu-ray disks and saves them to DRM-free files – they either have their own official decryption key or they have found one by hacking some OEM device and are keeping it unpublished to avoid it being revoked, and hence it can always decode the latest titles. It will eventually become a paid app, but is free to use whilst in beta (requires entering a new temporary activation code every 30 days, found here: http://www.makemkv.com/forum2/viewtopic.php?f=5&t=1053). It's been in beta for several years already, so here's hoping they do a GMail.

The marvellous thing about MakeMKV however is that it can "emulate" libaacs and libdplus – meaning any calls from apps that link to those libraries expecting the default open source decoder will instead get passed through MakeMKV's closed-source decoder – hence any video playback software which uses those libraries will automatically use MakeMKV's decoder and be able to play the latest titles.


To install and set up MakeMKV:

Step 1: Install it
(I built from source so haven't actually tried these packages myself)

sudo add-apt-repository ppa:heyarje/makemkv-beta
sudo apt-get update
sudo apt-get install makemkv-bin makemkv-oss

Step 2: Uninstall the open-source libaacs

sudo apt-get remove libaacs0

Step 3: Symlink MakeMKV's libmmbd to emulate libaacs and libdplus
(/usr/lib might not be the correct directory for you – do a search for "libmmbd.so")

cd /usr/lib
sudo ln -s libmmbd.so.0 libaacs.so.0
sudo ln -s libmmbd.so.0 libbdplus.so.0

And just like that, VLC (You may have to mount it before reading from device - /dev/sr0 for example) and other players configured to use libbluray will be able to play any blu-ray disk, without any "no valid AACS key found" errors.

Note: it might require a reboot (sudo shutdown -r now) to get VLC to work with libmmbd.so.0.

8
  • 1
    Epic! I been digging around for three hours looking for a solution. Tossed xubuntu 14.04 into a vm, started trying things. This posted followed to the letter fixed the problem instantly! Thank you so much for taking the time to make such a detailed response.
    – Dave
    Mar 29, 2015 at 20:10
  • You're a genius! It works!
    – Tek
    Jun 10, 2015 at 5:33
  • 1
    does not work with "Ghost in the shell" blu-ray. VLC reports "Blu-ray error: Blu-ray Disc is corrupted." instead of missing AACS
    – mrt181
    Jan 12, 2017 at 22:44
  • 1
    Worked with Ubuntu 18.04. libmmdb.so was located in /usr/lib/x86_64-linux-gnu/
    – dgreene
    Nov 14, 2018 at 22:35
  • 1
    JESUS GOD DAMN CHRIST! it worked!!! I can't upvote because I don't have level enough but I can comment and say a HUGE THANKS to R160K and Philipe Gachoude :) now I will try to find a way to do this on windows, most of my blu-ray discs already works, but some doesn't
    – viflaiban
    Oct 15, 2020 at 4:32
20

Blu Ray support is installed with this command:

sudo apt-get install vlc libaacs0 libbluray-bdj libbluray1

These 2 command create a hidden directory and download an aacs keys file for VLC:

mkdir -p ~/.config/aacs/
cd ~/.config/aacs/ && wget http://vlc-bluray.whoknowsmy.name/files/KEYDB.cfg

and VLC will play Blu-Rays.

Source


See http://www.videolan.org/developers/libbdplus.html on support for BD+. libbdplus adds BD+ (it does not add encryption keys though). So that would become:

sudo apt-get install vlc libaacs0 libbluray-bdj libbluray1 libbdplus
10
  • Hmm didn't work for me. I pressed "open disc" and play but it gave me an error :c
    – wolfguy
    Dec 30, 2014 at 21:22
  • What error? It might be related to an encrypted disk that still needs a key.
    – Rinzwind
    Dec 30, 2014 at 21:24
  • No valid processing key found in AACS config file.
    – wolfguy
    Dec 31, 2014 at 2:54
  • I put in another disc and it came up with "Blu-ray error: AACS Host certificate revoked. Your input can't be opened: VLC is unable to open the MRL 'bluray:///dev/sr0'. Check the log for details." I made sure to select blu-ray when I pressed open disc..
    – wolfguy
    Dec 31, 2014 at 2:59
  • 2
    @wolfguy means the disk is not yet decrypted and we have no valid aacs key (yet). Try another (slightly older) BD.
    – Rinzwind
    Jan 3, 2015 at 17:29
5

Yes, but there are caveats.

Films on Blu-ray ROMs are encrypted according to a standard known as AACS, which dictates multiple layers of encryption using multiple keys, including one physically printed on the disk, a volume id, which prevents one from burning working copies. (A very good explanation is given on Wikipedia here.) Each approved OEM Blu-ray player or drive is given a key, and each film has its own title key needed to decrypt and play the film. Each film's title key is encrypted using all currently valid OEM keys so any of them can decrypt it (in a process which also requires the physical volume id, which must be read by the drive).

There are no (as far as I'm aware) third-party applications in the Linux universe with official Blu-ray capability (i.e. having their own approved decryption keys). Therefore VLC et al. rely on a continuously updated database of leaked keys - both "title keys" that can be used to decrypt a specific film, or OEM keys which allow for decrypting the title key on any disk which in turn can be used to decrypt the film. The powers that be in Blu-ray land however take umbrage with this and revoke compromised OEM keys by not using them to encrypt title keys: meaning players or applications which use those keys will no longer be able to decrypt any Blu-ray released after revocation (though they can still play older ones). So those wanting to watch Blu-ray films on VLC or any other Linux software need to wait for some benevolent hacker to find and then publish a key that was still valid at the time the film was released. Blu-ray on Linux is essentially a cat and mouse game.

Note also that as the optical drive is actively involved in the decryption process, it too (as far as I'm aware) will have a key and so even your physical drive can become useless for newer films if its key is compromised, leaked and then revoked.

I hope this explains some of the errors people have been reporting.

3
  • 2
    So does this mean that people who bought legitimate players might have their ability to play legitimately bought blu-ray discs revoked because the player's key has been leaked? I'd be pretty angry if I bought a player and then it couldn't play newer discs.
    – localhost
    Jul 12, 2017 at 0:21
  • 3
    @localhost Yep, that pretty much sums it up. The ridiculous levels of DRM are part of the reason blu-ray never took off in the same way as DVD or streaming.
    – R160K
    Jul 13, 2017 at 2:51
  • 1
    I'm pretty angry, I bought a player and then it couldn't play discs. Apr 24, 2020 at 5:09
0

I have a Sony VAIO VGN-FW373J with built in blu-ray player and all I had to do to play blu-ray movies with my Ubuntu 14.04 was to install vlc, open it, chose the media / blu-ray and voila... works like a charm

0

After the last terminal command in the first answer I had to download KEYBD.cfg and manually copy it in ~/.config/aacs as per http://vlc-bluray.whoknowsmy.name/ I have a MacBook Pro with triple boot Mac OS X El Capitan, Windows 8.1 Pro and Ubuntu 15.04, a Fujitsu Laptop with Windows 8.1 and Mint 17.1 (in both laptops I used the same external blu ray player), and a Desktop PC with Windows 10 and internal LG bluray writer. In all of these OS's I made this configuration, all play blurays with VLC but in both Linux distros the playback is laggy and pixelated.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .