How to Install MultiMedia Codecs in Ubuntu 20.04 LTS

The default Rhythmbox music player and Totem video player do not work out-of-box due to lack of media codecs.

Due to legal reason, Ubuntu does not have the multimedia codecs pre-installed, though they are available in the main repositories.

Besides installing other media players, e.g., VLC, MPV, you can run single command to install all required codecs.

1. Open terminal either by pressing Ctrl+Alt+T on keyboard or by searching for ‘terminal’ from system application menu.

2. When terminal opens, run command:

sudo apt install ubuntu-restricted-extras

Type your password, no asterisk feedback, and hit Enter. For Lubuntu or Kubuntu, you may use lubuntu-restricted-extras or kubuntu-restricted-extras instead in the code.

The command will install audio, video codecs as well as Microsoft TrueType core fonts and library to handle RAR archive in your system.

Done!

About ml

ml is a part time stay-at-home dad who've been using Ubuntu Desktop for a few years. He writes in the free time and wishes to share some useful tips with Ubuntu beginners and lovers.

2 comments

  1. Thanks, very helpfull

  2. Already did this terminal says they are the latest. But VLC player still says it hasn’t got AV1 codec installed. The VLC is the latest Ver 3.0.12.1 the Ubuntu is 20.04.2LTS

    Ubuntu ver 20.04.2 LTS VLC ver is 3.0.12.1 Updates are current
    Using the below list of Preferences changes to VLC I have managed to get some MKV files to play but not all.
    Here is one video that defeats me https://www.youtube.com/watch?v=fUinvtDigVk
    Some times only the sound plays. Sometimes I get an error saying the AV1 Decoder is required but not installed. Supposedly the latest version of VLC shoud have it so I uninstalled and reinstalled and nope, La Rue Sans Joi.
    These are the changes I’ve made to VLC:
    In FILE CASHING (MS) I set the value to 1000.
    Under ffmpeg I set hardware decoding to Disable
    Under ffmpeg I set the Threads value to 2
    Under Audio, I made sure the Enable Audio box is checked
    Under Video I selected OpenGL video output
    Under the Input / Codex icon I set Pre load MKV files to Always Fix.
    I went through the process in Terminal to install BluRay using wget –no-check-certificate http://vlc-bluray.whoknowsmy.name/files/KEYDB.cfg That didn’thelp

    I’m stuck this makes no sense. MKV is an ever more popular low loss video format that’s been out for almost a decade and it won’t play in the latest players? I’m stuck Got any suggestions? Oh I tried SMplayer no luck there either.

    ALSO sudo apt install ubuntu-restricted-extras Reading package lists… Done Building dependency tree
    Reading state information… Done ubuntu-restricted-extras is already the newest version (67). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Sooooooo, I already have them too