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.
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.
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.
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