Entertainment Linux

How to Play Blu-ray and DVD Movies on Linux

Moe Long 14-11-2016

Linux distributions have loads of benefits. Most are free, they’re generally lightweight, and boast lots of customization. However, there’s usually a bit of required tweaking to get Linux running. Unfortunately, certain out of the box features aren’t native in Linux. Notably, DVD decryption isn’t standard. In fact, watching DVDs on Linux, may technically be considered illegal.


While there’s a lot Linux can do by default, there are some limitations Why Your Music & Video Files Don't Play on Linux, and How to Fix It You've switched to Linux, but your video or audio files file won't play! Simply, your Linux version didn't come with the necessary codecs, so let's find out how to install them. Read More out of the box. Luckily, there are all in one solutions to installing restricted extras Ubuntu Restricted Extras: The First Thing You Should Install On Ubuntu [Linux] Install Java, Flash, every codec you'll ever need and much more, all at once. It's heavily proprietary, but Ubuntu Restricted Extras is probably the first package you should install in Ubuntu. Are you a new... Read More , but DVD playback requires more work. Want to play them on Linux? Here are your options.

A Bit of Background

If you’ve ever purchased a digital copy of a movie from the likes of iTunes, Amazon, or Google Play, you’ve likely encountered digital rights management, or DRM. This sort of copy protection is intended to prevent piracy. What you might not know is that most commercially produced DVDs and Blu-rays also come with their own form of encryption: Content Scramble System, or CSS (not to be confused with the other CSS How Do Browsers Display Web Pages, and Why Don't They Ever Look the Same? Read More ). DVD and Blu-ray players contain CSS licensing support and copy protection such as region coding.

So to play a CSS-encrypted disc on Linux, you need to crack the CSS.

DVDs: The Paid Option

When you buy a computer, often it arrives with pre-installed software including a media player like CyberLink PowerDVD. If you’re running Ubuntu or a derivative, there’s the officially licensed Fluendo DVD Player, but it is offered as a separate download. It’s a convenient package which installs via the software center, no command line required. Fluendo offers complete DVD playback, including Dolby Digital 5.1 output, stereo downmixing, Dolby Digital pass-through, menu support, and more.

However, Fluendo may be simple, but there’s a price: $15.


The Free Method for DVDs

Luckily, you can get those DVDs working on Linux gratis with some slight tinkering. Free media players including VLC How to Create a Linux VLC Streaming Media Server for Your Home Enjoying music or movies via Netflix or YouTube is great, but what about when the Internet is down? With a VLC media server, you'll never have to go without entertainment again! Read More can handle DVD playback in Linux, but require the installation of the libdvdcss library. Essentially, libdvdcss breaks DVD CSS encryption.

Open a terminal (Ctrl + Alt + T) and enter the following commands if using Ubuntu 12.04 through 15.04:

sudo apt-get install libdvdread4

Linux DVD

This installs the required files, but now we need to enable these. For that, enter the following command:

sudo /usr/share/doc/libdvdread4/install-css.sh

DVD Linux

Now we’ve installed and enabled the proper command.

If running Ubuntu 15.10 and higher, simply run this command:

sudo apt-get install libdvd-pkg

Linux DVD


All should be set, and you should be able to play any DVD using your preferred media player. I tested using both VLC and the default Videos application in Ubuntu.

Space Jam DVD VLC

Playing Blu-ray Discs on Linux

Watching Blu-rays What You Need To Know About Watching Blu-Ray On Linux If you've been using Linux back since DVDs first came out, you might remember just how long it took before DVDs were somewhat supported. Heck, even now, if you want to play an encrypted DVD,... Read More is a bit different. Probably the easiest method is simply installing VLC. By default, VLC includes the packages libbluray1 and libaacs0, both required for reading Blu-Ray discs. then just navigate to Media > Open Disc and select the button beside Blu-ray.

For increased functionality, there’s also a means of installing a script that should work for most Debian-based distros:

wget paste.debian.net/download/5249

Once that installs, enter:

bash 5249

Then you’ll be prompted to add the repository for the latest iteration of VLC. This is completely optional, but you now should be able to play Blu-Rays. Unfortunately, Blu-Ray playback on Linux is pretty hit or miss. Some titles work fine while others simply don’t. There’s yet another solution but this requires MakeMKV Rip Your DVDs & Blu-Rays With Absolute Ease With MakeMKV [Cross-Platform] If you ripped all your DVDs and Blu-Rays, you could create an amazing media center. Of course the main obstacle to ripping is the disk's copy protection. Enter our hero: MakeMKV. Read More .

With MakeMKV installed, run the app


Navigate to File > Open Disc and select your Blu-Ray drive. MakeMKV will open the disc and list the various video files. Head to the file menu and click “Stream.”


Did You Try Turning It Off and On Again?

When installing software, sometimes a reboot is necessary. Yes, it may be the most clichéd IT support answer, but turning your machine off and back on again may be the answer. If using an older release (Ubuntu 12.04 to 15.04), after installing and enabling packages you may need to restart.


Experiencing lockups or getting messages that you are unable to play a DVD? It’s likely that you’ll need to set a region code. Even after the above install, I still had to set a region code. Here’s how to launch regionset:

sudo regionset /dev/X (e.g. /dev/sr0)

Regionset Linux

Still can’t play a DVD? Disabling DVD menus may alleviate any issues. Many players, including VLC, offer this functionality. To turn off DVD menus, navigate to Media > Open disc and check the box next to No disc menus. If you’re like me and really enjoy watching DVD extras and hearing director commentary (yes, I’m that guy), this isn’t ideal but it’s a solid workaround.

VLC No Menus

Herky Jerky

If you’re suffering from jerky playback, there’s a fix for that too. Provided that you tried playing a DVD without properly setting up CSS decryption, the wrong CSS key may be used. So an easy solution is to just delete the ~/.dvdcss/ folder. There’s also a lengthier solution that requires enabling Direct Memory Access (DMA) transfer.

First, enter the mount command:

mount | egrep 'udf|iso9660'

This should tell you where your DVD player is. To enable DMA, use the hdparm comand and the hdparm.conf configuration file. Check your hdparm settings with the following command:

sudo hdparm /dev/hdc

If this returns a message like…

using_dma  = 1 (on)

…then DMA is already on. However, while DMA is enabled, you can specify for DMA to be run at boot. To do so, edit the /etc/hdparm.conf script. Run this command:

gksudo gedit /etc/hdparm.conf

And add these lines to the hdparm.conf:

/dev/hdc { dma = on }

But if DMA is not enabled, you can enable it by running:

sudo hdparm -d1 /dev/hdc

Tales From the Decryption

Still having problems? Persistent decryption problems may be fixed with the following command (my DVD drive is found at sr0, but this can vary so replace the location of your DVD drive if necessary).

chmod 660 /dev/sr0; chgrp cdrom /dev/sr0

DVD Linux Decryption Error

By following these steps, you should be able to play most, if not all, of your DVDs and Blu-Rays. What programs are you using, and what’s on your watch list?

Related topics: Blu-ray, Linux.

Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.

Whatsapp Pinterest

Leave a Reply

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

  1. zubozrout
    November 19, 2016 at 9:10 am

    Yup, this is what DRM is good for. It has been broken a loong time ago so doesn't protect anything but it brings you other problems like these compatibility issues. Fortunately I did never buy a Blu-ray disc and the video dvd's I have worked fine out of the box on Linux.

  2. John O'connor
    November 17, 2016 at 9:43 am

    what laptop in the headline picture?