Double-clicking an everyday MP4 phone video or downloaded movie on a fresh Ubuntu setup only to see the built-in Videos app complain that an “MPEG-4 AAC decoder is required” or “H.264 decoder is required” catches almost every new Linux desktop user off guard. Ubuntu leaves certain patented audio and video codecs out of the default free installation, even though unlocking smooth MP4 playback takes less than two minutes. Here are the two cleanest ways to fix it.
1. Install Ubuntu’s Official Media Codecs (Fixes Videos App and Browsers)
Ubuntu packages all everyday audio and video decoders — including H.264, AAC, MP3, and standard web codecs — inside one official meta-package so both the default Videos player and web browsers play media smoothly.
- Press Ctrl + Alt + T to open a Terminal window.
- Type the following command and press Enter:
sudo apt update && sudo apt install ubuntu-restricted-extras - Enter your Ubuntu password when asked and press Enter (no dots show while typing), then press Y and Enter to confirm the download.
- If a grey-and-purple Microsoft Core Fonts licence screen pops up partway through, press the Tab key once so <Ok> turns red, press Enter, then select <Yes> and press Enter to finish.
- Close and reopen your Videos app (or Firefox) — standard MP4, M4A, and web videos will now play cleanly with sound and picture.
2. Or Install VLC Media Player From Ubuntu App Center (Zero Terminal Needed)
If you never want to touch Terminal or deal with font licence prompts — or you also play MKV, HEVC, and older AVI recordings from cameras — VLC includes its own self-contained decoders that work out of the box.
- Open App Center from your Ubuntu Dock on the left.
- Search for VLC and click Install.
- Once installed, right-click any
.mp4file in Ubuntu Files, choose Open With…, pick VLC media player, and switch on Always use for this file type so future videos open straight in VLC automatically.
3. Check Snap Permissions If VLC Cannot Open Videos on a USB Stick
Remember that if you install VLC through Ubuntu App Center and later try playing an MP4 video stored on a USB flash drive or second internal hard disk rather than your Home folder, open Ubuntu Settings -> Apps -> VLC -> Permissions and toggle Read/write files on removable storage devices On so VLC can read external drives smoothly.