Codecs and DVD

Install codecs, Java, and encrypted DVD playback

1. To be able to play most audio and video formats, install Ubuntu Restricted Extras using the following command:

sudo apt-get install ubuntu-restricted-extras

2. I suggest to also install the unrestricted version of libavcodec so you don't encounter issues with missing codecs when trying to use some video editors or transcoders - install them by using the following command:

sudo apt-get install libavcodec-extra

3. You may also need Java, but you must figure out what you need. Most users will only need OpenJRE and the Java browser plugin by using the following command:

sudo apt-get install icedtea-8-plugin openjdk-8-jre

For development, you'll also want OpenJDK by using the following command:

sudo apt-get install openjdk-8-jdk

If for various reasons, you need Oracle Java (the package includes JDK, JRE and the browser plugin), you can install Oracle Java 8 from the WebUpd8 Oracle Java PPA, by using the following commands:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

4. Encrypted DVD playback can be enabled by installing the "libdvd-pkg" package.

I recommend installing this package from the command line, as it's an installer that automatically downloads and installs libdvdcss2, and you may want to see if something goes wrong. To install it, use the following command:

sudo apt-get install libdvd-pkg