Blog

Thoughts from my daily grind

Opera Browser - Fix HTML5 Video Not Playing on Ubuntu

Posted by Ziyan Junaideen |Published: 17 September 2020 |Category: Linux
Default Upload |

The Opera Browser has a long history and its good to see that its still kicking. The last time I used a Opera browser was in 2011 in a Nokia phone. It was the Opera Mini. I owe a great deal of thanks to the Opera Mini browser to help me with my engineering degree when I was a student at University of Peradeniya as it helped me reach out to the web in general and Wikipedia in particular from a dumb phone.

After almost 10 years, I opened up the Opera Browser, now based on Chromium engine. YouTube was the first site I visited and got the error "Your browser does not currently recognize any of the video formats available". I knew this was a H264 licensing issue. I was surprised why of all Google didn't go webm? This was not limited to YouTube. Many sites that played video simply didn't work. When clicked 'Play' the video will (in a URL with a .mp4 extension) open in a new tab and not play.

The Fix

Long story short, you have to...

  1. Install the Chromium browser if not already installed
  2. Find the libffmpeg.so library
  3. Either make a symlink or copy the libffmpeg.so to where it should be in Opera the opera browser.

Detailed

Install the Chromium browser...

sudo apt install chromium-browser

In Ubuntu 20.04 the Chromium browser is packaged as a snap. Seems like even if you apt install what you get is a snap package. If I remember correct this is not the case with Ubuntu 18.04.

Now you need to find where the file is. You can use the Files app to find, or you can use the locate command. Be warned, updating the db takes time especially if your HDD isn't a SSD (makes a grrr-grrr noise when you use the computer).

sudo apt install locate
sudo updatedb
locate ffmpeg.so

In mine, its:

/snap/chromium/1298/usr/lib/chromium-browser/libffmpeg.so

Depending on your system not using the snap package or being in Ubuntu 18.04 your file might be on:

/usr/lib/chromium-browser/libffmpeg.so

The next thing you need to do is to copy over or link it to the Opera package. At the moment the Opera Browser is not a snap package. The path it needs to be linked to might change if it is made to a snap.

sudo cp <Chromium Source> /usr/lib/x86_64-linux-gnu/opera/libffmpeg.so

or

sudo ln -sf <Chromium Source> /usr/lib/x86_64-linux-gnu/opera/libffmpeg.so

That is it. Now close the browser and open it again and enjoy your HTML5 video.

Tags
About the Author

Ziyan Junaideen -

Ziyan is an expert Ruby on Rails web developer with 8 years of experience specializing in SaaS applications. He spends his free time he writes blogs, drawing on his iPad, shoots photos.

Comments