Install All Media Codecs in Ubuntu With a Single Command

When you install the Ubuntu operating system, some of the media files (audio/video) don’t work on your system. The reason for not working the media files are missing “ubuntu-restricted-extras”, which usually occurs when you opt for the minimal installation option feature. This package contains several required packages like unrar, encrypted DVD playback, and mp4.

This guide lists all the possible steps to install all media codecs on Ubuntu. Let’s start!

How to Install All Media Codecs in Ubuntu?

All media codecs use the “ubuntu-restricted-extras”, which is present in the “Multiverse” repository, which is not free & open-source. Due to licensing and legal issues, Ubuntu can not include it in the default “apt” repository.

The following three steps will allow you to add a multiverse repository followed by all media codecs. To install the “All Media Codecs” in your system, follow the below three simple steps.

Step 1: Install Multiverse Package

To install the “ubuntu-restricted-extras” package, we must enable the “Multiverse” via the below-mentioned command:

$ sudo add-apt-repository multiverse

Step 2: Update the Core Repositories

It’s recommended to update the system core repositories after installing the package for the newer version of the packages via the command:

$ sudo apt update

Step 3: Install Ubuntu Restricted Extras

The “ubuntu-restricted-extras” package can be installed on Ubuntu using the following command:

$ sudo apt install ubuntu-restricted-extras -y

It will show a “Package Configuration” screen with a description of the “End-User License Agreement” EULA to use the Microsoft Software & related media applications. Press the “Tab” key to navigate to “<Ok>” and click the “Enter” button to continue to the next screen.

A new screen with the permission to “Accept” the terms and continue to install the “ubuntu-restricted-extras”. By default, the “<No>” option is selected. Press the “Tab” key to switch the selection to “<Yes>” as shown below. Press the “Enter” key to continue:

After accepting the “license terms”, the remaining packages of the “ubuntu-restricted-extras” will start installing.

It is observed that the installation is successful without any errors.

That’s all from this post!

Conclusion

To install All media Codecs in Ubuntu, enable the “Multiverse” repository and execute the “sudo apt install ubuntu-restricted-extras -y” command in the terminal. The Ubuntu codecs may be missing due to the minimal installation of the latest releases. This post provided the simplest method to install multimedia codecs on Ubuntu.