2014/09/15

Blu-Ray Comes to Linux, Finally!

For the Linux fans out there, today is a great day! Up until now, blu-ray playback support in Linux has been very complicated and quite an aggravating experience. First you would have to hope you had the right BD-ROM drive and that there was a hacked firmware for you to flash it with. Then you had to hope the correct AACS keys were out on the interwebs for the blu-ray disc you wanted to watch. Once you had the right drive and the right keys, you had to dump the entire blu-ray disc to your hard drive and play it from there.

Well the guys over at the MakeMKV project just made this process a whole lot simpler! It is now actually feasible to play blu-ray movies in Linux. This is still a far shot from proper native support for blu-ray playback, but it is a nice workaround that is easy enough for any home user to get working. The way it works, basically, is that the newly released MakeMKV 1.4.10 now offers the ability to stream files or discs across your home theater network and any media player capable of playing a network stream can pick this up. So without going to much further, let’s get started on this how to guide.


*** Install MakeMKV 1.4.10 in Linux ***

  1. Make sure you have all the required libraries and tools installed first. You can get them all with this one line code:

  2. sudo apt-get install build-essential libc6-dev libssl-dev libgl1-mesa-dev libqt4-dev

  3. Then you will need to download two tarballs with the binaries and the source code.
  4. Unpack both archives to separate directories and then open a terminal or console
  5. cd into the source directory and run the following two commands:

  6. make -f makefile.linux sudo make -f makefile.linux install

  7. When that finishes successfully, cd into the binaries directory and run the same two commands:

  8. make -f makefile.linux sudo make -f makefile.linux install

  9. You can then run the MakeMKV application with the command: makemkv (it is installed to /usr/bin/makemkv in case it doesn't find it in your path)

*** Open Disc and Stream With MakeMKV ***

  1. Run the application /usr/bin/makemkv
  2. Go to File, Open Disc > Select your Blu-Ray drive
  3. Once MakeMKV finishes opening the blu-ray disc, it will list the titles and file information
  4. Go to File menu and choose "Stream"
  5. MakeMKV will  look like "Buffer State" and "File Position" are stuck, but look in the dialog box at the beginning for something similar to: "Operation sucessfully completed. Streaming server started, web server address is..."

MakeMKV Blu-Ray Disc Opened

MakeMKV Blu-Ray Disc Opened

MakeMKV Streaming Blu-Ray in Linux

MakeMKV Streaming Blu-Ray in Linux


*** Connect to Network Stream and Watch Blu-Ray Disc ***

  1. Open VLC and go to Media, Open Network Stream
  2. Protocol should HTTP, in the address box put http://localhost:51000/stream/title0.ts  The port option should be greyed out.
  3. Click Play and enjoy your blu-ray movies within Linux

VLC Network Stream Dialog Box

VLC Network Stream Dialog Box

Some other things to note are that you can access additional titles on the blu-ray disc by changing the “title0.ts” to a different number corresponding with the correct title you want to play. If you have a Linux-based HTPC in your home theater, but you don’t have a blu-ray drive or any optical drive in it, you can use VLC or another media player to connect up to this stream across the network as well. You would just replace the “localhost” part with the actual IP address of the Linux machine running MakeMKV and streaming the blu-ray disc. This also works for enabling playback in OS X, too.

Keep in mind that this is still considered an experimental feature by the MakeMKV developers, but so far it is working very nicely for me. They do list some known issues as well with this functionality such as:


  • Seamless branches are not supported, but most blu-ray discs do not use them anyway
  • They haven't perfected buffering yet, so you may have a few buffering issues during blu-ray playback
  • If you close MakeMKV in the middle of streaming, makemkvcon may hang or crash. They recommend checking after closing the program and assert that simply killing it is safe if it is still running.

This seems to be a very nice breakthrough in blu-ray playback support for Linux. I am still looking forward to a dedicated library for native media player integration such as with libdvdcss and DVD’s though. What do you think about these new improvements for Linux and media support? Let me know if you have any other tricks for playing your blu-ray discs in Linux or OS X!

Update: MakeMKV has released version 1.4.11 with a few bug fixes. You can find the changelog below.


Changelog:

  • Corrected compatibility issue with HD audio streams
  • Corrected incorrect processing of blu-ray discs with seamless branching (introduced in 1.4.10)
  • Miscellaneous stability improvements



Comments

  1. Wayne says:

    Is it possible to just automatically rip the bluray and store it to a network drive for playback later?

  2. Chris says:

    So who actually decrypts the Blu-Ray disk here? If MakeMKV doesn’t have the keys then that would mean that it’s not doing it, which in turn means that VLC would have to be instead. But if VLC supports Blu-Ray already then why does it need MakeMKV to “finally” come to Linux?

    I am confused…

  3. vidkun says:

    Wayne: Yes you can. Once you open the disc, simply click the “Make MKV” button and it will copy it right over. Keep in mind though, that it only moves the same data into an MKV container. So it will be the same codec as it was on disc, whether that be VC-1 and so forth. You will need to make sure you have proper support for whichever codecs you rip, or you can always encode them to x.264 or something else with your favorite tool.

    Chris: MakeMKV handles the decryption of the blu-ray with either AACS or BD+ protections through the use of an SVQ file. SVQ files, basically, contain the ‘keys’ needed for the BD+ code to execute properly. The MakeMKV team provides updated SVQ files for download from their site. Once you place the file in the directory specified by the user in the preferences, it auto detects it and imports the keys. For discs that do not have a valid key in the SVQ, they request that you produce a BD+ dump and mail it to them so that they can produce the proper SVQ for it. You can find more info on how MakeMKV handles blu-ray protections at their site here: http://www.makemkv.com/svq/

    Interestingly enough, I have done this with 3 separate blu-ray discs before I found out about downloading and point it to the SVQ file. So not all discs will require it, but if you run into snags that would be the first place to check.

  4. Sum Yung Gai says:

    Which distro is this for–Debian Lenny, Ubuntu Hardy–fill us in, bro!

    –SYG

  5. vidkun says:

    SYG: The first line of code to get the dependencies (the sudo apt-get) is for Debian based (this includes Ubuntu) distros. The listed packages in that command may differ for your distribution. However, the binaries and source for MakeMKV should compile on any distro that has the required build dependencies.

  6. sTivo says:

    This program works very well and helped make my decision to buy a bluray player and lots of bluray titles – the movie studios should pay them for bringing bluray to Linux – it has helped the failing movie business (joke!!). I now have over 1.3TB of makeMKV blurays. You can use Handbrake to squash them down to 720P if you need to as some movies hit 25GB.

  7. To build MakeMKV on Mandriva Linux (and probably on Fedora too) you have to change one entry in the file ‘makefile.linux’ in ‘makemkv_v1.4.10_beta_oss’:

    -L/usr/lib/qt4

    needs to be changed to:

    -L/usr/lib/qt4/lib

    After that it will build flawlessly on Mandriva too.

  8. London Linux says:

    Useful stuff, but aggravating does not mean annoying, it means making worse. Hence: aggravating and mitigating circumstances in court.

  9. vidkun says:

    London: Thanks for the grammatical correction. If a grammatical error is the only thing wrong with the post, then I must be off to a good start!

    Tux99: Thanks for the pointer. I will pass that on to the MakeMKV team as well to make sure they know about it.

    sTivo: No need to downgrade to 720p! You can just re-encode into a different codec such as x264 and get a much smaller size with the same lovely 1080p goodness.

  10. Friend of Freedom says:

    Sounds like a breakthrough. What it now takes is a library similar to libdvdcss to make blu-ray available to all applications.

    • vidkun says:

      Exactly! It would be great to have library support via something similar to libdvdcss! I don’t think we are too that point just yet though. There is a team over on the doom9 forums that are currently working on such a library. I don’t think they are much further than AACS support unfortunately. There is also an ‘experimental’ patch for mplayer-svn that is floating around. I am working to get my hands on that to test as well.

  11. Chris says:

    I wonder if this work on Fedora? IIRC, Blu-Ray’s encryption algorithm has patent problems, which means that Fedora’s SSL library probably doesn’t support it. (I.e. RedHat will have stripped its support from OpenSSL.)

  12. Chris says:

    I see that the “bin” package is not Open Source software, and that it has an EULA. Can you describe what that binary both is and does, please? I can’t see how the Blu-Ray people can have sanctioned makemkv because it completely ignores all the “protected path” nonsense which mandates HDCP on the display etc. So what is makemkv doing that this bit needs to be Closed Source?

    • vidkun says:

      Chris, I am not a part of the MakeMKV team and don’t have any familiarity or knowledge of the inner workings of their binaries. I will try to get back to you with an answer though.

  13. Awesome! I’m gonna try it as soon as I get home!

  14. Bill says:

    meh-binary blobs are bad news. yeah-it’s nice that we can rip blu-ray to disc, but this is like dvd encryption… it just sucks and obviously doesn’t work – it’s just a speed bump to ripping and sharing.

  15. qwerty says:

    It’s possible implement as a fuse daemon?

  16. maybe not as effectively.. machida’s TDD > silvas

  17. vidkun says:

    I was able to get a response to some of the questions that have been raised here. Here they are straight from the MakeMKV team:

    1) What will the pricing scheme look like when MakeMKV is no longer beta?
    A) This is not determined yet. likely one-time fee.

    2) Will MakeMKV work properly for blu-ray playback within Fedora?
    A) Yes it will. MakeMKV will compile and run even if ECDSA is not present in OpenSSL.

    3) Can we get some information regarding the binaries? What are they or what do they do?
    A) There is a single binary – makemkvcon, the core of the application and console version. Speaking of which you may use “makemkvcon stream disc:0″ without GUI. The reason for it to be closed source – MakeMKV is a shareware application (presently freeware) and it contains keys and algorithms for AACS and BD+ decryption. We try to put as much code under open source as possible. The MKV multiplexer is entirely open-source, so you know that MKV files are not watermarked. We wrote from scratch and released under LGPL the libdriveio library – a library that communicates to disc drives and knows about “hacked” firmware, special vendor commands and buggy drives. GUI is also open-source. Yet MakeMKV is shareware so it is not entirely open-source.

  18. Jumbo says:

    It works perfectly. Thanks! ;)

  19. Very good writing. I am glad you posting that. I ask you accept my for my less good English writing, I am from Germany and it is kind of new to me.

  20. VH-BIL says:

    Thank you so much for this! It seems like we are getting closer to full bluray support in Linux. Until then, this is an awesome solution!

  21. Ryan says:

    Not bad! Finally, Linux conquers blu-ray!!!!

  22. I am definitely bookmarking this page and sharing it with my friends.

  23. You mention re-encoding the MKV files into x264 for smaller file sizes. What applications do you recommend to do that with?

    • vidkun says:

      In Linux, h264enc is rather powerful, but not the easiest to pick up. Handbrake is fairly easy, runs natively in Linux, and supports x264 encoding. Personally though, I like ripbot264 in windows. It is very easy, simple and straightforward, and it has worked wonders for me so far.

  24. LN52B630 says:

    Sweet Post. Where would we be without tv..

  25. choyak says:

    Well…..THis really works, BUT the picture goes ‘dweek dweek dweek’ I am speculating that my PC is just not up to it. It has 2GB of ram and the CPU is pentium-d. Is there a way to speed this up, like only displaying half of the frames???

  26. Elisha Isa says:

    Outstanding writing. I am glad you for posting that. Please accept my apology for my weak English writing, I am from Pakistan and English is sort of new to me.

  27. Malorie Lesslie says:

    Hi – just a quick note to say kudos for this article. Very great.

  28. Dennis Tassin says:

    Love this post! Thanks for this. I’ll be sure to come back again. P.S: I’ve bookmark your site as well.

  29. Really great news. Thanks. I tried it in Karmic. It worked fine with “Planet Earth” blu-ray, but with the newest Star Trek blu-ray there were two problems: 1) playback was choppy 2) English audio would not play because it was using “truehd” format, whatever that is, and VLC gave an error with that. I wish I knew if the choppy playback was due to the immaturity of the beta or inadequacy of the ATI/AMD Linux drivers. I also wonder what the deal is with “truehd” audio format that won’t work in VLC.

    • vidkun says:

      TrueHD is Dolby’s HD audio codec. Are you sure you are using a version of VLC greater than 1.0.0 release? Have you tried it with mplayer? Also if it is choppy, this could be due to whatever video codec it is using. For example, VC-1 and H.264 codecs are very CPU intensive to decode. You could try using mplayer or vlc with vdpau as the output. This would offload most of that work to the GPU instead.

  30. vidkun says:

    MakeMKV 1.4.12 has been released, so if you had any stability issues or other minor issues with some of your BD’s you might give it a shot.

  31. scippy says:

    about choppy playback with VLC try inrease higher latency in tool/preferences/input & codecs/Caching levels.
    but MPC is the faster mediaplayer of those 2

  32. colin says:

    FYI

    I’m not interested in “streaming” anything.
    I just want to put the disk in my PC and play it onscreen.

    Windows-Vista installation: Click install.exe
    When you get that simple let me know. Otherwise I’m done banging my head against this time wasting brick wall.

    • vidkun says:

      No one said you HAD to use Linux. If Vista works better for your needs, by all means use it. If you WANT to use Linux to play them, then this is how you can with the current state of blu-ray playback.

  33. Ole Andreas says:

    Thanks! This must be the first time I’ve been able to play blu ray on linux. Unfortunately, the video is unbearably choppy, even with the high latency trick. Gah, bloody DRM smithered plastic cake.

  34. Mark says:

    Would be nice to have instructions for SuSE 11.2. I am embarrassed to say I failed at every step (locating some of the tools/libraries (either using the ‘sudo’ command or by searching using online from Yast); the ‘make’ steps).

  35. vidkun says:

    I don’t use SuSE, or any other RPM based distros for that matter, so I can’t give you too much instruction on building for them. I do know that they tend to have different package names though. For example, the ones listed above would be: glibc-devel, libopenssl-devel, mesa-devel (maybe?), qt4-devel.

    Google is your friend.

  36. Mark Heseltine says:

    Hi Vidkun,

    Thanks for the reply. Thanks. I will try again with more diligence when I am back in 2 weeks. I take you hint very seriously and will a bit more thorough in the attempt. I had just (finally) installed ATI’s new Catalyst 10.3 driver (a pain) which took a lot to figure out, so I should be able to be as successful with Blu Ray.

    I will let you know what I discover and the steps. Fingers crossed.

    Mark

  37. WhoKnows says:

    Instead of streaming directly from the BD drive, Can MakeMKV transcode it to the MKV container (saving about 40% of space as it claims for Blu-Ray) and then stream from that container on HD?

  38. eris23 says:
  39. PoolScholar says:

    Hello. I am fairly new to Linux, although learning quickly. I cannot get this to work. Followed everything exactly, and everything seems to be fine right up until I get into VLC and push Play. It errors with: “Your input can’t be opened:
    VLC is unable to open the MRL ‘http://localhost:51000/stream/title0.ts’.” Any help would be greatly appreciated.

  40. vidkun says:

    eris23: Thanks for the updated links.

    PoolScholar: Your best bet would be to post your error on the MakeMKV forums. They will be able to help you better than I could.

  41. Martin says:

    Awesome program!
    The only issue I’m having is buffering problems when streaming to VLC. The buffer measure is always on top…so the sound does not stop but the frames they really do, a lot.

    I installed it in the latest release of Ubuntu 10.04 64 bits. I’ve 1GB ram, my Dell pc is a dual intel 2.66 GHz

    Please tell me what I need to add in order to have a good stream. More memory ?
    Also using the built-in video card. A nvidia geforce will perform better ?
    Thanks in advance.

  42. thomas says:

    I jumped through some hoops to get MakeMKV to compile (install new OpenSSL, link to correct Qt4). Now it runs, but does not see my iHOS104 Lite-On BD-ROM drive at all. It finds my two DVD-RW drives, which are on IDE, but not the BD-ROM which is on SATA. I can play DVDs in that drive with linux and MPlayer, however. It’s called /dev/sr0 with major 11 and minor 0, if that helps to answer my question. The question? Oh, yeah:
    What do I have to do to get it to recognize my drive?

  43. Lexxa says:

    Why do you update the links and not notify anyone?

    Links are like this as of right now
    http://www.makemkv.com/download/makemkv_v1.5.8_bin.tar.gz

    http://www.makemkv.com/download/makemkv_v1.5.8_oss.tar.gz

  44. trip says:

    1) What will the pricing scheme look like when MakeMKV is no longer beta?
    A) This is not determined yet. likely one-time fee.

    These idiots actually plan on selling an app containing stolen encryption codes? They will go to prison so fast. Why not just release the code that way we can all use it. If we can rip and transcode it I see no reason why we can’t just play it if the same code was put in a media player like mplayer. Tell them it’s better to be the ones who gave bluray to linux than being inn prison next time you talk to them.

Trackbacks

  1. [...] This post was mentioned on Twitter by home4film, Vidkun Torvald. Vidkun Torvald said: Finally, Blu-ray playback within Linux! http://bit.ly/8Bq7f7 [...]

  2. [...] Blu-Ray Comes to Linux, Finally! For the Linux fans out there, today is a great day! Up until now, blu-ray playback support in Linux has been very complicated and quite an aggravating experience. First you would have to hope you had the right BD-ROM drive and that there was a hacked firmware for you to flash it with. Then you had to hope the correct AACS keys were out on the interwebs for the blu-ray disc you wanted to watch. Once you had the right drive and the right keys, you had to dump the entire blu-ray disc to your hard drive and play it from there. [...]

  3. Social comments and analytics for this post…

    This post was mentioned on Twitter by Stian216: RT @TheMediaViking: Finally, Blu-ray playback within Linux! http://bit.ly/8Bq7f7

  4. [...] Read on… GD Star Ratingloading… [...]

  5. [...] the rest here and here Possibly related posts: (automatically generated)How To Get Full Multimedia Support in [...]

  6. [...] Estoy seguro de que muchos de vosotros todavía no habéis abandonado el DVD en favor del Bluray, principalmente debido a su elevado coste. En el caso de los linuxeros la cosa es todavía más complicada: visionar un Bluray en GNU/Linux requiere como mínimo de un curso avanzado de magia negra. [...]

  7. [...] Hasta ahora, los propietarios ‘linuxeros’ de un lector Blue-Ray tenían la posibilidad de leer los discos pero la tarea no era sencilla. Vía reddit, podemos leer el anuncio de una breve guía que nos ilustra sobre los pasos a seguir para leer sin problemas los discos y tan sólo unos minutos de “trabajo”. No existe todavía soporte nativo para este tipo de discos pero ya es posible ver películas en este formato en nuestros sistemas GNU/Linux. Esto se ha conseguido gracias al proyecto MakeMKV. Tan sólo necesitaremos instalar MakeMKV 1.4.10 y el reproductor multimedia VLC. Acceso al tutorial: themediaviking.com. [...]

  8. Blu-Ray en GNU/Linux más fácil | Full-Linux.com says:

    [...] Hasta ahora, los propietarios ‘linuxeros’ de un lector Blu-Ray tenían la posibilidad de leer los discos pero la tarea no era sencilla. Vía reddit, podemos leer el anuncio de una breve guía que nos ilustra sobre los pasos a seguir para leer sin problemas los discos y tan sólo unos minutos de “trabajo”. No existe todavía soporte nativo para este tipo de discos pero ya es posible ver películas en este formato en nuestros sistemas GNU/Linux. Esto se ha conseguido gracias al proyecto MakeMKV. Tan sólo necesitaremos instalar MakeMKV 1.4.10 y el reproductor multimedia VLC. Acceso al tutorial: themediaviking.com. [...]

  9. [...] hecho, parece que la cosa ha mejorado: en el blog The Media Viking explican un procedimiento para hacer que las películas en formato Blu-ray Disc se puedan [...]

  10. [...] Algo semelhante aconteceu com o DVD. Se os usuários do GNU/Linux conseguiram rodá-lo é porque foi quebrado o seu sistema de proteção, mas não é algo tão simples, sua inclusão nas distribuições suscita questões judiciais e muitos optam por não fazê-lo. Só resta aos usuários do Linux aguardarem o dia em que poderão simplesmente clicar no botão Play para usufruir de um disco Blu-ray sem maiores complicações. Enquanto esse dia não chega, quem estiverem interessado, pode conferir um tutorial que ensina como rodar Blu-ray no Linux clicando aqui. [...]

  11. [...] gli utenti Linux la riproduzione di BluRay può risultare davvero troppo complicata, a questo link trovate le procedure in [...]

  12. [...] Tan sólo necesitaremos instalar MakeMKV 1.4.10 y el reproductor multimedia VLC y seguir el tutorial [...]

  13. [...] hecho, parece que la cosa ha mejorado: en el blog The Media Viking explican un procedimiento para hacer que las películas en formato Blu-ray Disc se puedan [...]

  14. [...] (64bit) on my HP Pavilion Elite m9252p (quad core) Modifications: – Added a Sony BDUX10S SATA Blu-ray Disc-ROM Drive (Internal) – Added an HP W2408H 24" Widescreen HDMI LCD Monitor – Added HP HD7500S [...]

  15. [...] esto les traducci esta guía de The Media Viking para poder ver peliculas Blue-ray en [...]

  16. [...] poco en este artículo explicaban el proceso para leer / escribir un Blu-ray en GNU / [...]

  17. Anonymous says:

    [...] [...]

  18. [...] Blueray on linux Blueray install help [...]

  19. Reproduce discos Blu-Ray en Linux con MakeMKV | La guarida del friki says:

    [...] | The Media Viking Enlace | [...]

  20. [...] movies has stopped me from installing a Linux distribution on my HTPC. However, according to a blog post from The Media Viking, this is now possible. It is still a bit cumbersome, but it seems better than [...]

  21. [...] will be integrated, but right now it's all nasty hackery. The best current guide I've seen is here (January 2010; for Ubuntu). This basically converts the Blu-Ray disc into a network stream that any [...]

  22. [...] Si se sentían mal por no poder ver sus películas en Blu-Ray por las restricciones de soporte, no se preocupen que se desvelo una forma (no muy facil, pero algo es algo) de poder disfrutar de las…. [...]

  23. [...] possible to playback blu-ray from within Linux directly at the moment. But there are workarounds: Blu-Ray Playback in Linux | The Media Viking I'm considering sticking a copy of Windows 7 with PowerDVD to do blu-ray playback for now. For [...]

  24. Reproduce discos Blu-Ray en Linux con MakeMKV says:

    [...] | The Media Viking Enlace | MakeMKV Este artículo ha sido leido 220 veces AKPC_IDS += "691,";Popularity: 1% [?] [...]

  25. [...] I do not have a blu-ray drive on my computer, so I have not tried this, but have a look here: http://themediaviking.com/software/bluray-linux/ [...]

  26. Blu-Ray HD says:

    [...] of … https://help.ubuntu.com/community/Re…BluRayAndHDDVD http://themediaviking.com/software/bluray-linux/ You should realise that the people who make the blu-ray disks do not want you to play them on [...]

  27. [...] of Blu-ray. Most of the methods of playing Blu-ray as of this post usually require some type of workaround to decrypt and stream the movie. However, if you’re like me, and like to backup your movies so you can use it on a media [...]

Proudly hacked together by Vidkun - The Media Viking