A codec is used to encode and decode digital data stream. It is mainly
used to reduce file size of audio and video files. Every audio and video
file type is encoded and decoded differently. So, to play a specific
audio/video file, you must have a suitable codec installed on your
Some codecs are free while others are proprietary in nature. So, most
of them are not included on open source operating systems like Debian.
As these codecs are not included, you canít play every type of audio and video files once you install a fresh copy of Debian.
In this article, I am going to show you how to install multimedia codecs on Debian 10 Buster. So, letís get started.
Enabling Official Contrib and Non-Free Repository:
The official package repository of Debian 10 has most of the common
multimedia codecs already available. To install multimedia codecs, you
have to enable the non-free and contrib package repositories on your Debian 10 machine.
To enable non-free repository, run the following command:
$ sudo apt-add-repository non-free
The non-free repository should be enabled.
The same way, enable the contrib repository with the following command.
$ sudo apt-add-repository contrib
Now, update the APT package repository cache with the following command:
$ sudo apt update
The APT package repository cache should be updated.
Installing Multimedia Codecs from Official Debian 10 Repositories:
Now that youíve enabled the non-free and contrib official Debian 10 repositories, you are ready to install multimedia codecs on Debian 10.
The best way to install multimedia codecs is to install your favorite
audio/video player on Debian 10, which in turn will install all the
required multimedia codecs automatically.
If you know the package name of the multimedia codec that you want to
install, you can manually install each multimedia codecs separately.
VLC is one of the best multimedia player out there. There is a saying
that if VLC canít play a media file, then no other player can play it.
So, installing VLC player should also install most of the multimedia
codecs automatically. VLC player is available in the official package
repository of Debian 10 Buster. So, you can easily install it with the
APT package manager.
To install VLC player, run the following command:
$ sudo apt install vlc
Now, press Y and then press to continue the installation.
APT will download and install all the required packages.
At this point, VLC should be installed.
Now, you should be able to play almost any type of media files.
Installing Some Other Codecs:
If you need support for one of the following codecs, then you have to install the libavcodec-extra package on Debian 10.