Back to tips

Step-by-step guide

Install essential media codecs

Enable broad audio/video playback support so media works out of the box.

Time: 5 minUpdated: 2026-04-10Keywords: codecs ffmpeg gstreamer vlc

Why this helps

Codec issues are a top reason beginners think Linux is broken. Fixing this early prevents frustration.

  • MP4/H.264 playback works
  • Common streaming formats work
  • Audio codecs load reliably

Media compatibility path

Media playback setup
  1. 1. Install codec packages
  2. 2. Install VLC/MPV fallback player
  3. 3. Test local file + web stream
  4. 4. Reboot once if browser still fails

Detailed steps

Step 1: Install core codecs

Use your distro package manager to install multimedia codecs and FFmpeg components.

# Ubuntu / Debian sudo apt update && sudo apt install -y ubuntu-restricted-extras ffmpeg # Fedora (RPM Fusion enabled) sudo dnf install -y gstreamer1-plugins-{bad-\*,good-\*,base} gstreamer1-plugin-openh264 ffmpeg # Arch sudo pacman -S --noconfirm ffmpeg gst-plugins-good gst-plugins-bad gst-plugins-ugly

Step 2: Install reliable player

Install VLC as a fallback player. It often plays files that browser decoders reject.

Step 3: Test two real cases

Test one local MP4 file and one browser stream (for example YouTube). Validate audio and video together.

Step 4: Restart browser services

Close all browser windows and reopen. Some codec libraries are only loaded at browser start.

How to verify

Troubleshooting

Browser video is black but VLC works
  • Reopen browser fully.
  • On Fedora, verify RPM Fusion multimedia repos are enabled.
Only audio works, no video
  • Check hardware acceleration settings in browser.
  • Update GPU drivers and reboot once.

Related tips