How to fix Opera not displaying Facebook and Twitter videos issue on Linux
Publish Time: 05 May, 2023
Photo Illustration by Mateusz Slodkowski/SOPA Images/LightRocket via Getty Images

Since I started using Linux in 1997, there's been one issue that has never failed to be a part of the open-source platform...the legality of playing certain multimedia codecs. It's one of the reasons why, in certain operating systems, you must install those codecs from a third party and agree to their licenses. 

Also: How to choose the right Linux desktop distribution for you

Just to be clear, it's not a Linux thing, it's a legal thing. And don't be mistaken, it's not illegal to play those media files on Linux, it's just that licenses must be agreed to, in order to keep things above board. And in some cases, there are no licenses to agree to...it's just the installation must be undertaken by the user.

It's a similar situation to the playing of videos on social media platforms like Facebook and Twitter. You might have come across those black squares that state the video cannot be displayed.

Also: How to install Ubuntu Linux (It's easy!)

Fortunately, there's a fix for it and I'm going to walk you through the process.

How to fix Opera's missing video issue

What you'll need: The only things you'll need to resolve this issue are a running instance of the Opera browser (or a browser based on Opera, such as Vivaldi) and a user with sudo privileges. That's it. Let's get to the fix.

1. Install chromium-ffmpeg

The first thing to do is open a terminal window and install the snap version of chromium-ffmpeg. For those who don't know this software, it's a command line tool for the manipulation, conversion, and streaming of multimedia content. To install chromium-ffmepg, issue the following command:

sudo snap install chromium-ffmpeg

2. Locate the libffmpeg.so

With the software installed, you have to create a link (symlink) such that Opera can use the shared object file, libffmpeg.so. Before you do that, you must find out where libffmpeg.so is. First, check the chromium-ffmpeg directory with the command:

ls /snap/chromium-ffmpeg/

You'll probably see two directories:

  • 30
  • current

It's the 30 directory you want, but if you see a number higher than 30, that's the one you'll use. 

3. Locate the directory housing the libffmpeg.so file

Next. you want to check out which child directory houses the .so file. For that, issue the command:

ls /snap/chromium-ffmpeg/30

You'll probably see a number of sub-directories, such as chromium-ffmpeg-108372. You're looking for the directory with the highest number, which will be the directory that houses the most recent version of the libffmpeg.so file.

4. Create a link to libffmpeg.so

We can now create the link from the chromium-ffmpeg directory to the correct Opera directory with a command like this:

sudo ln -s /snap/chromium-ffmpeg/30/chromium-ffmpeg-108372/chromium-ffmpeg/libffmpeg.so /usr/lib/x86_64-linux-gnu/opera/

If, after running the command, you get an error saying the libffmpeg.so file already exists, rename it with the command:

sudo mv /usr/lib/x86_64-linux-gnu/opera/libffmpeg.so /usr/lib/x86_64-linux-gnu/opera/libffmpeg.so.bak

After running the above command, run the link command again and it will succeed.

Also: 8 things you can do with Linux that you can't do with MacOS or Windows

Once you've issued the final command, close and re-open Opera and the problem should be resolved. Videos will now play without issue on the Opera browser running on Linux.

Featured

New iPhone 15 Pro overheating reports: Still too hot after iOS 17.0.3 and fresh issues arise after the update Generative AI will far surpass what ChatGPT can do. Here's everything on how the tech advances iPhone 15 Pro review: Prepare to be dazzled The best USB-C cables for the iPhone 15: What the experts recommend
  • New iPhone 15 Pro overheating reports: Still too hot after iOS 17.0.3 and fresh issues arise after the update
  • Generative AI will far surpass what ChatGPT can do. Here's everything on how the tech advances
  • iPhone 15 Pro review: Prepare to be dazzled
  • The best USB-C cables for the iPhone 15: What the experts recommend
I’d like Alerts: