Installing Ubuntu’s available multimedia codecs can let video players open common formats that currently show an unsupported-format message or play without sound. You’ll use Ubuntu’s software repositories and a player to test the result; you’ll need an internet connection and permission to install software.
What You’ll Need
- A supported Ubuntu installation and an administrator password for installing packages.
- An internet connection. Codec packages are downloaded from the configured software repositories.
- The video file that is causing the problem, plus a media player such as the preinstalled Videos app or VLC.
Step-by-Step
- Check whether the problem is limited to one file. Try playing a different video in the same player. If only one file fails, it may be damaged, incomplete, or encoded in an uncommon format; installing codecs will not repair a corrupt file. Note the exact error and whether video, audio, or both are missing.
- Update Ubuntu’s package information. Open the App Center or Software & Updates and check that the Ubuntu repositories are enabled. Alternatively, open Terminal and run
sudo apt update. Enter your password when asked; the characters will not appear as you type. Updating package information helps Ubuntu find current packages in its configured repositories. - Install the standard multimedia package. In Terminal, run
sudo apt install ubuntu-restricted-extrasand review the package list before confirming. This package collects commonly used audio and video components that are not all installed by default. Some components have distribution or licensing conditions; read any prompts and accept only if you agree. Package availability can vary by Ubuntu release and enabled repositories. - Handle any license prompt carefully. If an installer displays a text-based license screen, use the keyboard controls shown on screen, often Tab to move between choices and Enter to confirm. Read the terms before accepting. If there is no prompt, let installation finish. Do not close the terminal while packages are being installed.
- Install a capable player if needed. Ubuntu’s default player may support your file after the codecs are installed. For another option, install VLC from Ubuntu’s App Center, choosing the package offered through Ubuntu’s software sources, or run
sudo apt install vlc. Avoid downloading random codec files or installers from unverified websites. - Restart the player and test the file again. Close and reopen the player so it can detect newly installed components, then open the original file. If the file still fails in one player, test it in another. A difference between players can point to player configuration or support rather than a missing system package.
- Check the file’s format and audio/video streams. The filename extension alone does not identify how a video was encoded. If available, use a trusted media-information tool such as MediaInfo, or inspect the file with
ffprobeif FFmpeg tools are installed. Look for the container, video codec, audio codec, and any reported errors. This helps distinguish an unsupported codec from a damaged file. - Consider a conversion only when necessary. If the file is valid but uses a codec your players cannot handle, convert it with a reputable media application to a format supported by your devices. Keep the original file, check that the conversion software has the codecs it needs, and avoid uploading private videos to online converters. Re-encoding can reduce quality; changing only the container is not enough when the underlying codec is unsupported.
Common Mistakes
- Assuming every playback error means a missing codec. A partial download, damaged file, unsupported subtitle format, or audio-device issue can produce similar symptoms. Test another file and another player before changing packages.
- Installing packages from untrusted sources. Do not run shell commands copied from unfamiliar sites without understanding them, and do not install codec bundles from random download pages. Prefer Ubuntu’s configured repositories or a trusted application source.
- Ignoring repository settings. If Ubuntu cannot find a package, the relevant repository may be disabled, package information may be stale, or the package may not be available for that release. Read the error instead of adding an unrelated repository.
- Expecting the file extension to tell the whole story. Two files ending in
.mp4can use different video and audio codecs. The container and the codecs inside it both matter. - Accepting prompts without reading them. Some multimedia components present licensing terms. Review the displayed conditions and choose whether to accept; installation may not continue without your decision.
Tips
- Keep Ubuntu updated with the normal Software Updater or package updates. Updates can fix player and library bugs as well as security issues.
- When reporting a playback issue, include your Ubuntu release, player name, exact error, and the file’s codec information. Do not share a video publicly if it contains private material.
- If video plays but there is no sound, check the player’s selected audio track, system volume, and output device. A missing audio codec is only one possible cause.
- If playback is choppy rather than rejected, try another player and check whether the computer is under heavy load. A high-resolution or demanding video can exceed the system’s decoding capacity even when its codec is supported.
- To remove the standard package later, use Ubuntu’s software manager or run
sudo apt remove ubuntu-restricted-extras. Removing it may not remove every dependency installed alongside it; review the proposed changes before confirming.
Troubleshooting
“Unable to locate package” or a repository error: Run sudo apt update and read the output for connection or repository errors. Open Software & Updates and confirm that Ubuntu’s usual software sources are enabled. If a repository is unavailable, check Ubuntu’s official documentation for your release rather than adding a third-party source at random.
Installation stops or reports unmet dependencies: Make sure no other software updater or package installation is running. Then try sudo apt --fix-broken install, review the changes, and run sudo apt update again. If the problem continues, save the full error text; do not force package removal with unfamiliar commands.
The player still reports an unsupported format: Restart the player and test the file in a second player. Confirm that the installation completed successfully and identify the actual video and audio codecs. A codec may be proprietary, uncommon, or unavailable in your Ubuntu release’s repositories; in that case, a trusted player with its own supported decoding components or a carefully chosen conversion may be needed.
The file plays, but the picture or sound is wrong: Try another file to rule out file damage, select a different audio or subtitle track, and check the player’s settings. If the same file has glitches in multiple players, it may be incomplete or corrupted. Obtain a complete copy from a legitimate source before troubleshooting further.
Hardware acceleration causes glitches: If playback became worse after changing graphics or player settings, restore the player’s default video-output or hardware-acceleration setting and test again. Graphics drivers and decoding support differ by computer, so there is no single setting that works for every system.
Frequently Asked Questions
Does Ubuntu include all video codecs by default?
No. Some common multimedia components are not installed by default, and certain formats may require additional software or may not be available from the configured repositories.
Is ubuntu-restricted-extras required?
No. It is a convenient collection of commonly used components, not a universal fix. Install it only if it is available for your release and you agree to any displayed terms.
Do I need to reboot after installing codecs?
Usually not. Close and reopen the media player first. Reboot only if an update or another system component specifically requires it.
Why does an MP4 video still say unsupported?
MP4 is a container, not a guarantee about the codecs inside. The video or audio stream may use an unsupported codec, or the file may be incomplete or damaged.
Can I install codecs without Terminal?
Often, yes. Use Ubuntu’s App Center or software manager to install available multimedia packages and players. Terminal is useful when you need to see precise package-manager messages.
Will installing codecs fix every video?
No. It cannot repair corrupted or incomplete files, guarantee support for every encoding, or solve unrelated sound, display, or hardware-performance problems.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Access to Compressed Zipped Folder Is Denied in Windows 10
- Erase Microsoft Surface Data Without Booting Windows
- Apps to Install for a New Mac: A Practical Starter List
- Show or Hide Thumbnails in Windows 10
- Choose a Loud Bluetooth Speaker for Your Gathering
- iPhone X IMEI and Serial Number: How to Find Them