April 7, 2014

Bluplayer – Easy Bluray playback with MakeMKV and VLC

Filed under: Technical — Tags: , , , , — James Bunton @ 9:00 am

About a year ago when I first bought my Bluray drive for Linux I had a simple requirement. I wanted to be able to put a disc in, then with some graphical tool select a track and have it start playing. It turns out nothing on Linux can do this.

So I wrote a simple Python/Qt app which uses MakeMKV to decrypt and VLC to play it.

Why Bluray?

  • I like to own the things I buy. MakeMKV lets me decrypt the Bluray discs so I can do whatever I want with them.
  • For some reason nobody sells downloadable videos.
  • Streaming HD content is still nowhere near 1080p.
  • My ADSL connection is only 4Mbit, so streaming 720p doesn’t even work for me.
  • Compared to DVD Bluray is not just higher bitrate, it’s also at the native framerate. So 24fps movies are not sped up to 25fps like on all Australian DVDs. Similarly US TV shows are not mangled.

What do I need?

Clone the bluplayer repo

$ git clone https://delx.net.au/git/bluplayer

Compile and install MakeMKV

You can visit the Linux forum page to download it and follow the instructions there to compile and install.

Alternatively I’ve written a script, build-makemkv.sh in the bluplayer repository which you can use. Visit makemkv.com/download to find the current latest version. Then run:

# aptitude install \
      build-essential pkg-config libc6-dev libssl-dev \
      libexpat1-dev libavcodec-dev libgl1-mesa-dev libqt4-dev
$ bluplayer/build-makemkv.sh 1.8.9

Now you will have ~/bin/makemkvcon installed.

Run it!

Dependencies:

  • python2
  • python2-qt4
  • python2-lxml
  • vlc

You can set a few environment variables, these all have sensible defaults.

  • MAKEMKVCON_PATH — absolute path to makemkvcon from the MakeMKV installation.
  • PLAYER_PATH — absolute path to VLC.
  • PLAYER_OPTS — defaults to --fullscreen. Override with a whitespace separated list of options to pass to your player software. The video URL will always come last.

Modify the example BluPlayer.desktop and install it so you can launch the app from the GUI. Or launch it from the command line.

$ bluplayer/bluplayer.py

How it works

  • Runs makemkvcon in streaming mode.
  • Connects to the MakeMKV HTTP server to obtain a list of titles.
  • Preselects the longest title, that’s probably the one you want right?
  • Launches VLC with the path to the MakeMKV HTTP server.
  • killall makemkvcon upon exit just to be sure.

Leave a Reply

Your email address will not be published. Required fields are marked *