Pinterest Stumbleupon Whatsapp
Ads by Google

You’ve switched to Linux, and now you’re ready to start listening to music and watching video. But — oh no — the file won’t play!

LinuxCodecs-Video-Error

This is a moment that surprises many new Linux users. Your Windows and Mac OS X computers played media files out of the box. So do your phones and tablets. Why, then, doesn’t Linux?

Simply, your distribution didn’t come with the necessary codecs. This wasn’t an oversight. There are legal and ethical reasons why some projects don’t pre-install codecs. I’ll try to keep this simple, and then we’ll dive into what you can do about it.

What are Codecs?

A codec is what tells your computer how to decode or encode a data stream. This is relevant whenever you want to watch video, whether locally or on the web. We could spend all day listing various video codecs and how they work. Fortunately, that is something we’ve already covered All You Need to Know about Video Codecs, Containers, and Compression All You Need to Know about Video Codecs, Containers, and Compression Explaining the difference between codecs and containers is relatively simple, but hard part is attempting to understand each format. Read More .

Codecs are also necessary when you’re playing audio. The most common music format is MP3 (you may recall how portable media players were often called MP3 players, despite their ability to play other formats). Alternatives include AAC, WAV, and Ogg. Audio isn’t as complicated as video, but something still needs to tell your favorite music application how to play these files 4 Linux Music Players That Deserve Your Attention Now 4 Linux Music Players That Deserve Your Attention Now Which Linux music player is the best? We compare four excellent music players you may not know about. Read More .

Ads by Google

Without the necessary codecs, you can’t play particularly formats, nor can you create them.

LinuxCodecs-Music-Error

That means that while you can easily record an audio file for a podcast using Linux How to Easily Record an Audio or Video Podcast on Linux How to Easily Record an Audio or Video Podcast on Linux Podcasting is a media-based activity, so Linux users might think that podcasting is best done on Windows or OS X. While true historically, it's a myth we're happy to dispel! Read More , you can’t save it in some of the more popular formats until you get your hands on the right software. You probably won’t be able to listen to or watch downloads of your favorite feeds Manage Your Podcasts on Linux with These 10 Apps Manage Your Podcasts on Linux with These 10 Apps Linux doesn't have a great choice of podcast clients, but don't worry - nearly every modern music player for Linux can serve as a podcatcher. Let's take a look at the options. Read More either.

This sounds like essential functionality, especially today. So, why don’t all Linux distributions ship with codecs?

Multimedia and the Law

Many common multimedia formats are patented. This usually doesn’t affect users directly, as they’re welcome to stream whatever they want on the devices they own. But patent holders charge money from the companies that make those products.

Microsoft, Apple, Google, and computer OEMs pay royalties to sell computers that play encumbered multimedia formats. This can be expensive, which is why Microsoft stopped offering DVD playback on Windows 8 back in 2012. The company felt that paying a royalty for each computer running Windows 8 didn’t make sense. Many of them, if not most, would lack disc drives.

Linux distributors aren’t selling a product. They’re giving away software for free and not paying a license for every download.  These projects are only able to ship free, non-restricted formats. Examples of these include Ogg, Matroska, and WebM.

Installing proprietary codecs isn’t difficult, but it may not be legal in your country. Linux has a global reach, so some distributions make restricted codecs easy for anyone to install. The downside of this approach is a person can run afoul of the law without even knowing. An Ubuntu user in the US technically shouldn’t have access to free versions of these codecs, but the distribution does not make this clear. That said, it’s unlikely this ambiguity will land you in any real trouble.

How to Install Codecs

Some distributions ship with codecs pre-installed. Most of the major ones don’t. How you install codecs varies depending on which one you’re running. Though in most cases, you have the option to buy a codec pack.

Here is what you can expect from several of the more common distributions.

Ubuntu

Ubuntu doesn’t provide codecs out of the box, but it does allow users to download the MP3 codec from Fluendo during installation. This is a codec that Fluendo has made available for anyone to install for free legally, as the patent holders don’t charge end users.

Others are available through the Ubuntu Software Center as restricted extras.

LinuxCodecs-Ubuntu-Software-Center

Fedora

Fedora doesn’t provide access to any proprietary codecs, either pre-installed or in repositories. This is partly due to a principled dedication to only sharing free software. This is also due to the project being sponsored by Red Hat, an American company subject to US law.

You can gain non-free codecs by adding the unofficial RPM Fusion repository.

OpenSUSE

Like the others, a fresh openSUSE install will leave you with free codecs only. The project has made an extensive list of formats considered restricted.

OpenSUSE encourages you to buy codecs, but the community suggests an alternative approach that doesn’t cost money.

Arch Linux

As a build-your-own distribution, Arch Linux doesn’t come with codecs. It comes with nothing. But the project includes restricted formats in its repositories. You can get the codecs when you install the libraries needed to play them.

How to Avoid the Issue Entirely

If you don’t want to install codecs, you can install a distribution that includes them out of the box. Linux Mint is one aimed at new users that play proprietary codecs out of the box. Adobe Flash, MP3, and even the capability to play DVDs come included (something else you’re recommended to buy). Those who want to use Linux Mint but don’t want to risk legal issues can download a No Codecs version.

Technically, you’re not entirely out of the woods. Just as with Windows and Mac OS X, you may still encounter the occasional media format that your machine doesn’t yet understand. The list of codecs already in existence is surprisingly huge.

LinuxCodecs-Codecs

Though, chances are, if you throw VLC at a video, you will probably get it to work. MPlayer is another media player that can play pretty much anything.

Easy Listening, and Keep Watching

Linux may not make codecs immediately available, but once they’re installed, you’re good to go. Many programs use the same libraries in the backend, such as GStreamer or Xine. You should be able to fire up various music and video players without having to configure each. And in this area, you’ll find many to choose from 5 Amazing Linux Video Players for Watching Movies and Shows 5 Amazing Linux Video Players for Watching Movies and Shows There are dozens of Linux video players to choose from, so which one should you use? Which one is right for you? Variety is great, but who has the time to sift through it all? Read More .

So despite the initial setup, you can still use a Linux computer to manage your music libary, edit home videos Video Editing on Linux Just Got Better With PiTiVi Video Editing on Linux Just Got Better With PiTiVi PiTiVi, a video editor that has historically been in the "simple home user" category, has gained several features since its early days. Read More , and watch some of your favorite movies. Don’t let those initial errors dampen your expectations. You may find your experience better than the one you left behind (again, there are so many free music players for you to try 3 Fresh & Lightweight Music Players For Enjoying Your MP3s on Linux 3 Fresh & Lightweight Music Players For Enjoying Your MP3s on Linux If you're a Linux user who loves music, you've probably noticed that audio players come in all shapes and sizes, from iTunes alternatives to lightweight apps. Which lightweight music player should you choose? Read More ).

Are you struggling to get certain audio or video files to play under Linux? Have you had a difficult time getting codecs to work on your distribution? Ask for help or share your experience in the comments below!

Image Credit: Angry Penguin by Wnong via Shutterstock, Audio and Video File Format Icons. 15 common digital audio and video file formats isolated on white.

  1. Mladen
    May 21, 2016 at 9:49 am

    It seems that fluendos codecs pack doesnt work with totem 3.10.01 (distros based on ubuntu 14.04) but it works on totem in distros based on ubuntu 12.04, so I had to buy oneplay player.But why totem 3.10.01 doesnt recognize codecs pack?

Leave a Reply

Your email address will not be published. Required fields are marked *