• 2014-04-29 tested on 14.04 trusty, but some current Blu-Rays do not play at all
  • 2015-12-26 updated for better source of KEYDB.cfg

How to play Blu-Ray on Ubuntu

  1. How to play Blu-Ray on Ubuntu
    1. VLC
      1. Install current VLC
      2. Fetch AACS keys
      3. Start mplayer2
      4. Start VLC
      5. What to do if it does not play
    2. dumphd
      1. aacskeys to show keys you must add to ~/.dumphd/KEYDB.cfg
        1. remember to move HostKeyCertificate.txt away

Following assumes following setting in /etc/fstab
/dev/sr0    /mnt/sr0    auto    user,ro    0    0
If you need another drive than /dev/sr0, change accordingly.


Install current VLC

# make sure you did not miss anything old
apt-get update
apt-get upgrade

# Install the libraries
apt-get install libaacs0 libbluray1 libbluray-bdj

# Upgrade videolan
# Note: If you do not trust Videolan, better stay offline.  There might be some hidden evil out there.
# Like OpenSSL.  Wasn't Heartbleed evil enough?  The future will bring a lot more of this, I am sure!
add-apt-repository ppa:videolan/stable-daily
apt-get update
apt-get upgrade

Fetch AACS keys

Now from time to time, fetch new keys:

mkdir ~/.config/aacs
curl http://www.labdv.com/aacs/KEYDB.cfg > ~/.config/aacs/KEYDB.cfg

Start mplayer2

sudo umount /mnt/sr0 || sudo umount -l /mnt/sr0
sleep 2
sudo mount /mnt/sr0
sleep 15
mplayer "bluray://TITLE//mnt/sr0"
where TITLE is a title number, can be left away ("bluray:////mnt/sr0") for first.

Start VLC

The trick to play seems to be to start VLC like follows:
umount /mnt/sr0 || umount -l /mnt/sr0
sleep 2
sudo mount /mnt/sr0
sleep 15
vlc bluray:///dev/cdrom
And with a title (number):
vlc bluray:///dev/cdrom#TITLE
Note that the title number differ from those of mplayer - I have really no idea why.

  • At my side the disk must be mounted. If it is unmounted, it will not play for sure. I need to mount it again before getting success.
  • Sometimes it takes ages to start playing.
  • Sometimes it does not play at all.
  • Sometimes you have to open the disk manually, like this: "Media", "Open Disk", "Blu-Ray", "No disc menus" ticked, Disc device "/dev/cdrom", "Play"
  • Sometimes the drive needs an eject/load-cycle or even more treatment, like inserting another disk for a while
  • Some Disks cannot be played yet, because of missing keys. (This should mean, that you cannot play it on a PS/3 either, because VLC uses the PS/3 key.)
To sum it up: I try to play it 10 times in different ways until I manage to play it once. But sometimes it plays. And I have to use many different access methods for this. What stays the same is:

  • I must mount /dev/sr0 somewhere
  • I then must access the Blu-Ray as /dev/cdrom
  • I must not use menus
  • Disks behave different
Why it sometimes plays and why sometimes not, I really have no idea.

What to do if it does not play

I really have really no idea, sorry. Even that I tried hard, I did not even find a guide how to diagnose or trace down problems.

Somtimes I see things like:

libbluray/bdnav/index_parse.c:162: indx_parse(): error opening /dev/cdrom/BDMV/index.bdmv
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening /dev/cdrom/BDMV/BACKUP/index.bdmv
[0x7f36b80089d8] main input error: open of `bluray:///dev/cdrom' failed

  • Some BluRays do not play because of missing key. If this happens, there is no way to play them until the key is discovered in KEYDB.


apt-get install dumphd

Top take a copy of a Blu-Ray you can do:

umount /mnt/sr0 || umount -l /mnt/sr0
sleep 2
mount /mnt/sr0

mkdir /full/destination/dir
dumphd /mnt/sr0 /full/destination/dir

If this only takes seconds, you must add the key to the following file:

"dumphd" does not work with AACS keys currently and needs a file named
which must list all the decoded keys.

This files is modelled after forum.doom9.org/showthread.php?p=1525922#post1525922

aacskeys to show keys you must add to ~/.dumphd/KEYDB.cfg

You can get the needed keys using the "aacskeys" package. Unfortunately this package is not available on Ubuntu. However it is part of Debian-Multimedia:

Sorry, no precise recipe here, only telling the important bits:

  • After unpacking compile the source
  • Binary then is at bin/linux/aacskeys (even on 64 bit)
  • Ignore the other files in bin/
  • You must invoke it as bin/linux/aacskeys, so the current working directory must be switched to the root-source-directory.
  • The file HostKeyCertificate.txt must be removed before you run this tool

remember to move HostKeyCertificate.txt away

Then following shows you two keys:

umount /mnt/sr0 || umount -l /mnt/sr0
sleep 2
mount /mnt/sr0

bin/linux/aacskeys /mnt/sr0

  • If this hits an error, HostKeyCertificate.txt probably is still at it's place
  • The first key (KEY1, the shorter one) goes to the right sight,
  • the second key (KEY2, the longer one) to the left.
  • The format of the new lines in
    look like:
    KEY2 = | D | 0000-00-00 | V | KEY1
You have to restart dumphd to make it read in the file again. Afterwards, if done properly, it can copy the contents.


  • dumphd has a GUI. If you have multiple desktops, it places itself out of the view. So you have to locate the GUI on the desktops. Seems to be a bug.
  • Dumps can become very big
  • In the dump look for the biggest file and play that, this is the main movie
  • I have no idea how to create a proper BlueRay out of this or how to play it as DVD again.