To play CD’s, DVD’s, mediastreams, downloaded movies or anything like it, it is said to use VLC, de VideoLAN media player. Because ‘it will play virtually anything you throw at it’. And it is also very much cross-platform. That is all true, but on a Linux system it may need some tweaking before things work well.

For legal reasons some proprietary codecs are not installed by default on many distros and most copyrighted media have some kind of encryption as a way of DRM (Digital Rights Management) protection. One may think of it as one likes. But of course, there are workarounds. Let us see.

Codecs &c

On installing a fresh Linux distro one will probably be asked whether or not ‘third party software’ should be installed. Just check the box and the codecs for playing MP3 files and some more will be installed. If you would download VLC from its own website, based in France, these codecs will be included automatically, but in the USA this raises legal issues, so distros do not install these by default.

If for some reason the codecs have not been installed (or activated), it is simple to add these. In Ubuntu, Linux Mint or the likes search your software manager (try Synaptic!) for packages with restricted-extras and restricted-addons in their names. Install these and you are done. Mind: the kubuntu- ones are for KDE desktops, the ubuntu- for GNOME, Mate or Cinnamon, the lubuntu- for LXDE and the xubuntu- for Xfce.

Besides you may need to check if ‘gstreamer’ backends are sufficiently installed. For my KDE environment I had to add the phonon-backend-gstreamer package. This will enable applications, drivers and protocols to properly handle the media codecs.

For openSUSE systems multimedia libraries and tools are packaged, which can be found here. Fedora, the distro most strict on the use of proprietary software, gives a full explanation on the subject. However, VLC is not mentioned on that page, perhaps because the French are considered too legally lenient?

Playing DVD’s

To decrypt video DVD’s the libdvdcss library is required. Installing this has been made easy on Ubuntu(-like) systems. Just install the libdvd-pkg package and this will download, install and configure the necessary libraries. If you are on another distro, search its documentation, or google for ‘libdvdcss install [distro name]’ – or try Qwant, the new European search engine that promises to really respect your privacy.

Blu-ray disks

Blu-ray disks will cause more hassle, since they use stronger protection. Older discs used AACS encryption, which can often be bypassed, but newer, or newest, ones encrypt with BD+, which is much harder to crack.

There are two methods to make blu-ray discs play on your Linux computer. Provided you actually have a blu-ray disc drive installed, that is.

First, on top of VLC, install the packages needed to bypass AACS: libaacs0, libbluray1 and libbluray-bdj. When I did so the package libasm4-java was included as a dependency. Then configure libaacs0 from terminal:

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

Now try to play a blu-ray disc with VLC and see what happens. If you get an error message about failing decryption or missing keys or certificates, you are out of luck. Move on to the second trick.

That is: making the blu-ray disc emerge as a ‘stream’, which can be played with VLC.

Install MakeMKV. Open a terminal and do:

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

If you are not on some Ubuntu distro, download the tarball and unpack, compile and install manually following the MakeMKV website’s instructions.

Note: MakeMKV is still called a ‘beta’ version, but it has been running fine as such for over a decade.

To play a blu-ray disc as a ‘stream’ (do not worry: it all happens right on your own computer):

  • start the blu-ray disc
  • open MakeMKV and click the ‘stream’ icon
  • copy the URL, eg. ‘http://localhost:51000/stream/title0.ts’
  • open VLC, go to Media > Open Network Stream… and paste the URL
  • play it!

Thanks to How-To Geek!

Note: using MakeMKV and HandBrake you can also rip blu-ray discs and turn that into a neat video file. To get a recent version of HandBrake (Ubuntu repositories contain older ones) use a PPA repository.

Instructions for ripping and compressing blu-ray discs can be found here.

 

Multimedia on Linux
Getagd op: