This post shows students and new users step to play DVD or watch videos on Ubuntu Linux.
Out of the box, Ubuntu won’t play your encrypted or protected DVDs – since most DVDs are protected anyways. In order to play DVDs, you need to have the right codecs installed.
A codec is a piece of software that allows applications to read a video or audio format. If Ubuntu Linux doesn’t find the right codecs, it won’t play the DVD or play the encoded videos.
Certain videos and DVDs are protected. Protected content prevents you from copying or playing them unless you have extra software to handle the copy protection.
Ubuntu doesn’t have it installed by default.
Some DVDs also a region code, which tells you in which region of the world they are allowed to be played. If Ubuntu is setup in a different region than the DVD, it may also not play.
One package that will most likely be needed is libdvd. Below we’ll show you how to install it along with other necessary packages to get Ubuntu to play DVDs and other videos.
How to get Ubuntu Linux to play DVD and movie videos
As mentioned above, Ubuntu won’t play your encrypted or protected DVDs – since most DVDs are protected anyways. In order to play DVDs, you need to have the right codecs installed.
Below is how to get Ubuntu Linux to play DVDs and other movie videos.
First install libdvd-pkg in Ubuntu. This package is included in the multiverse repository so you’ll need to enable it.
Run the commands below to enable the repository and install libdvd-pkg.
sudo add-apt-repository multiverse sudo apt install libdvd-pkg
When prompted, choose Ok.
┌───────────────────────────────────────────────┤ Configuring libdvd-pkg ├───────────────────────────────────────────────┐ │This package automates the process of launching downloads of the source files for libdvdcss2 from videolan.org, compiling them, and installing the binary packages (libdvdcss2 libdvdcss-dev). Please run "sudo dpkg-reconfigure libdvd-pkg" to launch this process for the first time. <Ok>
On the next prompt, choose Yes.
┌───────────────────────────────────────────────┤ Configuring libdvd-pkg ├───────────────────────────────────────────────┐ │ │ │ If activated, the APT post-invoke hook takes care of future automatic upgrades of libdvdcss2 (which may be triggered │ │ by new versions of libdvd-pkg). When updates are available, the hook will launch the process of downloading the │ │ source, recompiling it, and (if "apt-get check" reports no errors) using "dpkg -i" to install the new versions. │ │ │ │ Alternatively, the process can be launched manually by running "sudo dpkg-reconfigure libdvd-pkg". │ │ │ │ Enable automatic upgrades for libdvdcss2? │ │ │ │ <Yes> <No> │ │ │ └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
In some cases, you may have to install additional tools depending on your version of Ubuntu. Run each line and if it doesn’t install, then it’s not compatible with the version of Ubuntu you’re using.
sudo apt install libdvdread7 sudo apt install libdvdread8 sudo apt install libdvdread4 sudo apt install libdvdnav4
To install additional packages and plugins for browsers, run the commands below.
sudo apt install gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly sudo apt install ubuntu-restricted-extras
These packages and tools should get you up and running with playing DVDs and videos in Ubuntu.
That should do it!
This post showed you how to play DVDs and watch videos in Ubuntu Linux. If you find any error above or have something to share, please use the comment form below.