How to Enable Ubuntu to Play Videos and MP3: Install Restricted Extras

How to Enable Ubuntu to Play Videos and MP3: Install Restricted Extras

When you first install a clean version of Ubuntu, you may notice that certain media files—such as MP3s, high-definition MP4 videos, and proprietary web fonts—do not function as expected. This is not a technical failure of the operating system; rather, it is a deliberate philosophical choice. Ubuntu is built on the principles of Free and Open Source Software (FOSS). Because many popular media codecs (like H.264 or AAC) are proprietary and restricted by patents in certain countries, they are excluded from the default installation to ensure the OS remains legally “free” globally. However, for a professional desktop experience, these codecs are essential for daily productivity and multimedia consumption.

This guide provides a professional walkthrough for installing the Ubuntu Restricted Extras package. We will examine the technical components included in this meta-package, provide the precise terminal commands for installation, and address the specific legal prompts that appear during the process. By implementing these “restricted” components, you transform Ubuntu into a fully-featured multimedia workstation capable of handling virtually any modern file format.

What is the Ubuntu Restricted Extras Package?

The ubuntu-restricted-extras is a “meta-package.” This means it does not contain software itself but acts as a trigger to download and install a collection of other packages. The primary components include GStreamer plugins (which allow the default video and music players to decode various formats), the Microsoft TrueType Core Fonts (such as Arial, Times New Roman, and Verdana), and support for unrar and FFmpeg. These tools are the backbone of modern digital media, ensuring that documents look correct and videos play smoothly across different platforms.

In addition to standard audio and video support, this package also enables support for DVD playback (though encrypted DVDs require an additional library called libdvd-pkg). By installing this single meta-package, you avoid the tedious task of hunting down individual codecs one by one. It is the industry-standard “first step” for anyone setting up a new Ubuntu-based environment for creative or professional use.

Method 1: Installing via the Terminal (Recommended)

For professional users, the terminal is the most reliable way to manage packages. It provides real-time feedback and ensures that you are interacting directly with the Advanced Package Tool (APT). To begin, open your terminal (Ctrl+Alt+T) and update your local package index to ensure you are pulling the most recent versions of the software.

sudo apt update
sudo apt install ubuntu-restricted-extras

During the installation, a blue screen (the “EULA” prompt) will appear in your terminal. This is a crucial step that often confuses new users. Because the Microsoft fonts included in the package require you to agree to their license, the terminal will pause. Use the Tab key to highlight the “OK” or “Yes” button, and then press Enter. Failing to do this will cause the installation to hang indefinitely. Once you accept, the system will finalize the installation and configure the codecs automatically.

Method 2: Enabling Codecs During Initial Installation

If you are currently in the process of installing Ubuntu or plan to perform a fresh install soon, you can bypass the post-install terminal commands entirely. In the “Updates and Other Software” stage of the Ubuntu installer, there is a specific checkbox labeled “Install third-party software for graphics and Wi-Fi hardware and additional media formats.” Checking this box performs the same action as the manual apt install command.

By selecting this during the OS installation, the restricted extras are baked into your system from the first boot. This is the most streamlined approach for users who want their environment ready for use immediately. However, if you skipped this step or are working on a pre-installed system (such as one provided by a hardware manufacturer), the terminal method remains the definitive way to “catch up” and enable full multimedia support.

Solving the “Microsoft Fonts” Installation Issue

One common technical hurdle when installing restricted extras is a failure in the ttf-mscorefonts-installer. Sometimes, the connection to the SourceForge servers—where these fonts are hosted—can time out, leading to an incomplete installation. You might notice that while your videos play, your web browser or office suite still lacks standard fonts like Arial or Calibri. If this occurs, you can trigger a re-configuration and re-download of the font package specifically.

sudo apt install --reinstall ttf-mscorefonts-installer

If the automatic installer continues to fail, professional users often opt to manually copy the fonts from a Windows partition or download them as a ZIP file. However, for 99% of users, the re-install command solves the “half-installed” state. Having these fonts is not just about aesthetics; many professional documents and websites are hard-coded to look for these specific typefaces, and without them, layouts may appear broken or misaligned.

Verifying Your Multimedia Capabilities

Once the installation is complete, it is a professional best practice to verify that your system is now capable of handling restricted formats. You do not need to reboot Ubuntu for these changes to take effect, though you should restart any open media players or web browsers. Test your system by attempting to play an MP3 file in Rhythmbox or an MP4/MKV file in the default “Videos” app (Totem).

If you encounter a file that still refuses to play, it is likely that the file uses a very niche or ultra-modern codec not covered by the standard extras. In these cases, the professional recommendation is to install VLC Media Player. VLC includes its own internal library of nearly every codec in existence, serving as a powerful backup to the system-wide GStreamer plugins. You can install it easily with sudo apt install vlc.

Legal and Licensing Considerations

It is important to understand the legal context of the “Restricted Extras.” In some countries, software patents govern the use of codecs like MP3 and H.264. By installing these extras, you are technically utilizing patented technology. In the United States and many European countries, this is perfectly legal for personal use, as the “patent royalties” are often covered by the software distributors or fall under fair use for individuals.

However, for enterprise environments or organizations deploying Ubuntu at scale, you should consult with your legal department regarding licensing. This is why Ubuntu does not include them by default: it protects the user and the distributor from potential legal claims in jurisdictions with aggressive patent enforcement. For the individual freelancer or home user, however, the “ubuntu-restricted-extras” package is a safe and standard enhancement used by millions worldwide.

Optimizing Video Playback with Hardware Acceleration

After enabling software support for videos, the final step for professional-grade performance is Hardware Acceleration. By default, your CPU does the “heavy lifting” of decoding video. If you have an NVIDIA, AMD, or Intel GPU, you can offload this task to the hardware, leading to smoother 4K playback and lower battery consumption on laptops. This often requires installing the VA-API or VDPAU drivers alongside your restricted extras.

For Intel and AMD users, this is often as simple as installing mesa-va-drivers. For NVIDIA users, ensure you are using the proprietary drivers found in the “Additional Drivers” tab of your software settings. When hardware acceleration and restricted codecs work in tandem, Ubuntu’s multimedia performance becomes indistinguishable from—and often superior to—that of Windows or macOS.

Why does Ubuntu make it “hard” to play MP3s?

Ubuntu doesn’t make it “hard”; it makes it “safe.” By excluding proprietary codecs by default, Ubuntu avoids legal issues in countries with strict software patents. Providing a simple one-line command to install them is the compromise that keeps the OS free while remaining user-friendly.

Do I need to pay for these codecs?

No. For personal use, these codecs are provided for free through the Ubuntu repositories. The “restricted” label refers to the licensing and patents, not a financial cost to the end user.

Can I install these on Kubuntu or Xubuntu?

Yes. Each official Ubuntu “flavor” has its own version of this package. For Kubuntu, it is kubuntu-restricted-extras; for Xubuntu, it is xubuntu-restricted-extras. The installation process and the contents are virtually identical.

Conclusion

Enabling full multimedia support in Ubuntu is a critical transition from a “pure” open-source environment to a practical, high-performance workstation. By installing the Ubuntu Restricted Extras, you bridge the gap between open-source philosophy and the reality of modern proprietary media standards. This single meta-package resolves the most common frustrations for new users, ensuring that MP3s, high-definition videos, and standard web fonts function flawlessly. Whether you utilize the terminal for a precise installation or select the third-party software option during your initial setup, the result is a robust, versatile OS ready for any professional challenge. As you continue to optimize your Ubuntu environment, let this installation be the foundation for a seamless, media-rich digital experience. Take control of your multimedia today and unlock the full potential of your Linux desktop.

Al Mahbub Khan
Written by Al Mahbub Khan Full-Stack Developer & Adobe Certified Magento Developer