Home » Internet » How to Fix YouTube Videos Not Playing On Linux

How to Fix YouTube Videos Not Playing On Linux

by Pratik
0 comment

Often, I have had this issue where random YouTube videos won’t play on Firefox, while they work fine on Google Chrome. A bit of Google search and turns out videos that operate on licensed codecs like HEVC-265 don’t play on Open Source web browser like Firefox and Vivaldi. For instance, I used Vivaldi and it only supports free open-source video codecs. So, it doesn’t support MPEG-4 and HEVC-265. But, there is a workaround for Chromium-based browsers and here’s how you fix YouTube videos not playing on YouTube.

Which codec your browser doesn’t support

Before we get to the fixes, it is important to understand the problem. YouTube recently moved from flash videos to HTML5 embedded video players. So, you don’t require Adobe Flash to run videos on YouTube anymore. Your web browser has to be HTML5 compatible which most of them are. But, they don’t support all the video codecs. To check what codecs your browser doesn’t support, head over to the HTML5 test website.

On the right-hand side, you will see all the video codecs supported by your browser. In my case, I am using Vivaldi and it doesn’t support MPEG-4 and H.265 which is evident from the HTML5 test below.

results of html5 test on mozilla firefox - youtube videos not working linux

How to Fix YouTube Videos Not Playing On Linux

1. Chromium-based browsers

You need to install the licensed codec. You can use the following command or just run Vivaldi on the command line if you use the Vivaldi browser.

Head over to the terminal and type “vivaldi” and hit Enter. It will open a new browser window and in the terminal, it will tell you the codecs found. Initially, there will only be open codecs installed and it will prompt you the command to install the proprietary command. Use that command or you can directly paste the following command.

 sudo apt update && sudo apt install chromium-codecs-ffmpeg-extra

vivaldi command on terminal to find proprietary codec command

If the above command doesn’t work for you, you can alternatively download the “.deb” file from this location. Once downloaded, double-click on the file and install the additional codecs. After installation, restart your chromium-browser. In my case, it is Vivaldi. Play the video and now it should work.

chromium ffmpeg codecs extra on ubuntu app store

2. Firefox

In the case of Firefox, all you have to do is update to the latest version of Mozilla Firefox for your Linux distro. But, there is a small caveat. Firefox supports OpenH.264 which is different from proprietary HEVC 264. So, the particular video I was testing played well on OpenH.264. However, not all H.264 videos would play on OpenH264 and there is no workaround to get the proprietary H.264 and H.265 working on Firefox.

For any issues or concerns regarding video codecs, let me know in the comments below.

Also Read: Best Download Manager For Linux

You may also like

Leave a Comment