mk6ve
Posts: 23
Joined: Fri Jan 01, 2016 1:45 pm

Getting h.264 support in Opera

Thu Jan 14, 2016 11:50 am

It appears that due to Chrome shipping their own patched ffmpeg libraries, h.264 and mp3 support is broken in Opera (Chromium and Vivaldi too as far as I know). Youtube still works with WebM, but many other sites like Duolingo or Coursera do not. You can build your own ffmpeg but there is a simpler way that I've gotten to work in 1.0, mostly by trial and error.

I assume you have Opera installed as per 3rd party wiki page, this means you also had to install binutils and some other dependencies I don't quite remember anymore.
  1. Go to opera://about/ to find your Opera version and relevant Chromium version.
  2. Get the latest ubuntu chromium-codecs-ffmpeg-extra package relevant to your major Chromium version from here, place it somewhere and extract libffmpeg.so, e.g.

    Code: Select all

    mkdir ~/.opera-ffmpeg
    cd ~/.opera-ffmpeg/
    wget http://security.ubuntu.com/ubuntu/pool/universe/c/chromium-browser/chromium-codecs-ffmpeg-extra_47.0.2526.106-0ubuntu0.15.10.1.1218_amd64.deb
    ar p chromium-codecs-ffmpeg-extra_47.0.2526.106-0ubuntu0.15.10.1.1218_amd64.deb data.tar.xz | tar xJ ./usr/lib/chromium-browser/libs/libffmpeg.so --strip 5
    
  3. Place the libffmpeg.so in the Opera directory, don't forget to append Opera version to the filename. Other posts suggest placing the file in lib_extra directory but on my system it has to replace the libffmpeg.so present in lib dir, so:

    Code: Select all

    sudo mv /usr/lib64/opera/lib/libffmpeg.so.34 /usr/lib64/opera/lib/libffmpeg.so.34.old
    sudo ln -s libffmpeg.so /usr/lib64/opera/lib/libffmpeg.so.34
    
  4. Restart Opera, it should support HTML5 codecs now. You can test h264 here.
This solution will likely break between every major update and you will have to repeat it with the new chromium-codecs-ffmpeg-extra package and change the libffmpeg.so.34 to 35 or whatever the future version is.

As a sidenote, on Ubuntu the latest Opera versions are supposed to autodetect whether chromium-codecs-ffmpeg-extra is installed so if there's ever an official Opera package for Solus maybe it's worth looking into including those in the non-core repos as well. Also note that I'm not really an expert here, just a user who wanted to save someone a few hours of googling and troubleshooting.

User avatar
ikey
Project Founder
Posts: 1581
Joined: Sun Jul 27, 2014 10:42 pm
Location: Ireland
Contact: Website

Re: Getting h.264 support in Opera

Thu Jan 14, 2016 1:28 pm

Isn't there a way we can make Opera use the system-wide ffmpeg?
Image

mk6ve
Posts: 23
Joined: Fri Jan 01, 2016 1:45 pm

Re: Getting h.264 support in Opera

Thu Jan 14, 2016 8:18 pm

Not as far as I know, Chromium only uses its internal ffmpeg lib.

It's my understanding that you can compile Chromium with (as does Arch) or without the proprietary codecs (like Ubuntu, separating them into the chromium-ffmpeg-extra package) and Opera devs don't feel bold enough to ship it with their binary. There's an AUR package that builds the ffmpeg lib from chromium source and puts it in Opera directory.

User avatar
Justin
Development Team
Posts: 3617
Joined: Mon Jul 28, 2014 10:42 am
Location: Adelaide, Australia
Contact: Website Google+ Twitter

Re: Getting h.264 support in Opera

Fri Jan 15, 2016 3:29 am

Just checked no new Opera release in their folder either.

User avatar
olivir
Posts: 99
Joined: Sun Dec 25, 2016 6:47 pm
Location: France
Contact: Twitter

Re: Getting h.264 support in Opera

Tue Mar 21, 2017 12:35 pm

Hi,

Is it the same procedure for Vivaldi browser ? No special Solus package ?

User avatar
mintspider
Posts: 68
Joined: Mon Jan 02, 2017 5:19 am
Location: Lexington, Kentucky, USA
Contact: Website Facebook Google+ Twitter YouTube

Re: Getting h.264 support in Opera

Mon May 08, 2017 3:22 am

This issue is still unsolved as far as I see.

My Opera about:
Version information
Version: 44.0.2510.1159 - New version 44.0.2510.1449 is available
Update stream: Stable
System: Solus 2017.04.18.0 (x86_64; Budgie:GNOME)
Browser identification
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36 OPR/44.0.2510.1159

The referred to deb site does have a download for 57.0.2987, but it does not contain the path or file for: ./usr/lib/chromium-browser/libs/libffmpeg.so

I know I *can* use Chrome or Firefox, but Opera is my preferred browser on Android and Windows (at work), and have them all linked together.
Scotsman in Kentucky.
Running Solus Budgie on 2 Alienware M15x laptops.
http://thespider.oric.org
http://mintspider.blogspot.com

User avatar
mintspider
Posts: 68
Joined: Mon Jan 02, 2017 5:19 am
Location: Lexington, Kentucky, USA
Contact: Website Facebook Google+ Twitter YouTube

Re: Getting h.264 support in Opera

Sat May 20, 2017 8:08 pm

This is a current working solution for me, in getting Opera on Solus to show certain files, like animated gifs and H.264 video (especially on You Tube):

One You Tube video that was not working for me was: https://youtu.be/s5j6OHXi2Eo
(Big Daddy from Destination Linux, on a Live Community Chat.)

Follow the Linux instructions at https://www.slimjet.com/en/libffmpeg.php
You will want the x64 file.
Download the package into ~/Downloads
Then go into that folder and use unzip to extract the libffmpeg.so file.

In /usr/lib64/opera :
sudo cp libffmpeg.so libffmpeg.so_orig
sudo cp ~/Downloads/libffmpeg.so .

If Opera is running, then close and re-open.

Hope this works for you also!
Scotsman in Kentucky.
Running Solus Budgie on 2 Alienware M15x laptops.
http://thespider.oric.org
http://mintspider.blogspot.com

EbonJaeger
Posts: 10
Joined: Wed Apr 12, 2017 5:33 pm

Re: Getting h.264 support in Opera

Sun May 21, 2017 4:18 pm

mintspider wrote:
Sat May 20, 2017 8:08 pm
-snip-
This does indeed work! Thank you very much for sharing this!

User avatar
mintspider
Posts: 68
Joined: Mon Jan 02, 2017 5:19 am
Location: Lexington, Kentucky, USA
Contact: Website Facebook Google+ Twitter YouTube

Re: Getting h.264 support in Opera

Tue May 23, 2017 11:05 am

EbonJaeger wrote:
Sun May 21, 2017 4:18 pm
This does indeed work! Thank you very much for sharing this!
Opera updated to 45.0.2552.812, so I had to do this again.
Still works though.
Scotsman in Kentucky.
Running Solus Budgie on 2 Alienware M15x laptops.
http://thespider.oric.org
http://mintspider.blogspot.com

EbonJaeger
Posts: 10
Joined: Wed Apr 12, 2017 5:33 pm

Re: Getting h.264 support in Opera

Wed May 24, 2017 12:24 am

mintspider wrote:
Tue May 23, 2017 11:05 am
EbonJaeger wrote:
Sun May 21, 2017 4:18 pm
This does indeed work! Thank you very much for sharing this!
Opera updated to 45.0.2552.812, so I had to do this again.
Still works though.
Noted, thanks for the heads-up.

Return to “Tutorials”