Installing codecs for VLC on Ubuntu 26.04
user: I installed VLC media player on my new Ubuntu 26.04 but I don't know if I need to download stuff to play all video formats. is there some command I should run?
assistant: I’ll give you the practical codec setup, not a giant multimedia lecture. VLC already handles most files, but Ubuntu’s restricted extras are still worth installing for broader system/browser support.
assistant: Run this, Captain:
```bash
sudo add-apt-repository multiverse && sudo apt update && sudo apt install ubuntu-restricted-extras libavcodec-extra ffmpeg
```
That gives Ubuntu broader support for common restricted/non-free media formats, codecs, fonts, and playback helpers. Ubuntu does not include some of these by default because of patent/copyright restrictions.
During install, you may get a Microsoft fonts EULA screen. Use **Tab** to highlight **OK**, press **Enter**, then accept.
For normal video files like `.mp4`, `.mkv`, `.avi`, `.mov`, `.webm`, etc., that should be enough. VLC already plays a lot by itself, but this helps the whole Ubuntu system too.
For **commercial encrypted DVDs**, also run:
```bash
sudo apt install libdvdnav4 libdvdread8 libdvd-pkg && sudo dpkg-reconfigure libdvd-pkg
```
Ubuntu’s own help page lists those DVD packages and says to run `sudo dpkg-reconfigure libdvd-pkg` to install DVD decryption support, but notes legality depends on your country.
After that, reboot or at least close and reopen VLC:
```bash
reboot
```
Showing first 3 of 3 messages. View the full conversation at https://mcwai.org/ai-conversation/installing-codecs-for-vlc-on-ubuntu-26-04