'ZDNET Recommends': What exactly does it mean?
ZDNET's recommendations are based on many hours of testing, research, and comparison shopping. We gather data from the best available sources, including vendor and retailer listings as well as other relevant and independent reviews sites. And we pore over customer reviews to find out what matters to real people who already own and use the products and services we’re assessing.
When you click through from our site to a retailer and buy a product or service, we may earn affiliate commissions. This helps support our work, but does not affect what we cover or how, and it does not affect the price you pay. Neither ZDNET nor the author are compensated for these independent reviews. Indeed, we follow strict guidelines that ensure our editorial content is never influenced by advertisers.
ZDNET's editorial team writes on behalf of you, our reader. Our goal is to deliver the most accurate information and the most knowledgeable advice possible in order to help you make smarter buying decisions on tech gear and a wide array of products and services. Our editors thoroughly review and fact-check every article to ensure that our content meets the highest standards. If we have made an error or published misleading information, we will correct or clarify the article. If you see inaccuracies in our content, please report the mistake via this form.
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.
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.
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
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:
You'll probably see two directories:
It's the 30 directory you want, but if you see a number higher than 30, that's the one you'll use.
Next. you want to check out which child directory houses the .so file. For that, issue the command:
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.
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.