Skip to content

Instantly share code, notes, and snippets.

@mkaraki
Created February 15, 2020 10:09
Show Gist options
  • Save mkaraki/684cd27d6e09c19f986de03f63a55b5c to your computer and use it in GitHub Desktop.
Save mkaraki/684cd27d6e09c19f986de03f63a55b5c to your computer and use it in GitHub Desktop.
Install ffmpeg codec for Opera in Linux (Ubuntu)
#!/bin/bash
# for Ubuntu
# Install pre-requirements
sudo apt-get update
sudo apt-get install -y chromium-codecs-ffmpeg-extra
# Import to opera
sudo ln -sf /usr/lib/chromium-browser/libffmpeg.so /usr/lib/x86_64-linux-gnu/opera/libffmpeg.so
@fgurdradee
Copy link

#!/bin/bash

for Ubuntu

Install pre-requirements

sudo apt-get update
sudo apt-get install -y chromium-codecs-ffmpeg-extra

make directory called "lib_extra" under opera - using this method minimizes having to import a new copy every time Opera updates

see here for more info https://www.reddit.com/r/operabrowser/wiki/opera/linux_libffmpeg_config

sudo mkdir /usr/lib/x86_64-linux-gnu/opera/lib_extra

Import to opera/lib_extra

sudo ln -sf /usr/lib/chromium-browser/libffmpeg.so /usr/lib/x86_64-linux-gnu/opera/lib_extra/libffmpeg.so

@aceqbaceq
Copy link

awesome!

@adolfo92
Copy link

For newer versions of Ubuntu

Now that Chromium is linked totally to snapd, the code changes a little having to find the libraries inside the /snap/chromium... directory

This worked for me, idk if the "2828" directory is standard but you would have to check for yourself what's inside the /snap/chromium directory.

sudo ln -sf /snap/chromium/2828/usr/lib/chromium-browser/libffmpeg.so /usr/lib/x86_64-linux-gnu/opera/lib_extra/libffmpeg.so

Some extra notes

Your opera installation already have a libffmpeg.so file inside the /usr/lib/x86_64-linux-gnu/opera/ directory, some people say to leave that file as, is but for accident i also replaced that file, i'll be notifying if something breaks.

Regarding the file that already comes with the opera installation. No, it doesn't work as a replacement for the one on the chromium installation. I already tried making the link for that into the lib_extra directory and didn't worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment