Skip to content

Instantly share code, notes, and snippets.

Last active May 9, 2019
What would you like to do?
h264 in opera >= 31

Install depot tools

Get chromium source code

Opera Developer 35.0.2052.0 ->
Opera Beta 34.0.2036.3 ->
Opera 33.0.1990.115 ->

Unpack the archive

tar -xf chromium-<version>.tar.xz
cd chromium-<version>

Install build dependencies (Ubuntu only)

# Visit
./build/ --no-arm

Build ffmpeg

./build/gyp_chromium -Dcomponent=shared_library -Dffmpeg_branding=Chrome -Dffmpeg_soname_version=<opera_version> 
# opera_version = 35 is for Opera Developer, 34 for Opera Beta and 33 for Opera
ninja -C out/Release ffmpeg

Copy the lib to OPERADIR

# Declare OPERADIR to /usr/lib/x86_64-linux-gnu/opera-developer,/usr/lib/x86_64-linux-gnu/opera-beta or /usr/lib/x86_64-linux-gnu/opera
sudo mkdir $OPERADIR/lib_extra
cp out/Release/lib/* $OPERADIR/lib_extra

Restart browser

Copy link

axfelix commented Aug 19, 2015

Thanks for this -- just used successfully on Ubuntu 14.04.3, newest opera-developer (32). Went pretty smoothly though I had to chase down some of the Chromium -dev dependency libraries manually since the had some issues on 14.04.3 (I think there's some dumb version-numbers-in-package-names stuff in the point releases since 14.04), and I wound up building with -Dclang=0 since it seemed to be looking for a shipped version of clang that didn't exist, and system gcc worked fine.

Can't say I'm particularly excited about having to redo this for every new opera release though :)

Copy link

axfelix commented Aug 24, 2015

FYI, had to comment out a line to be able to build Chromium 46 for Opera developer 33:, otherwise this still worked fine.

Copy link

lukaszzek commented Sep 22, 2015

Thanks for the heads-up, I'll update the instructions. I have however found out that copying and moving library from chromium-ffmpeg-codecs-extra deb package is usually good enough (unless some binary incompatibility arises).

Copy link

ghandmann commented Sep 23, 2015

Good finding, that the from chromium-ffmpeg-codecs-extra also works in Opera 32. I can confirm this. ;)
For me Opera 32 (32.0.1948.25) now plays all videos on

I simply link the to $OPERALIB/lib_extra/$OPERAVERSION:

# e.g.:
sudo ln -s /usr/lib/chromium-browser/libs/ /usr/lib/x86_64-linux-gnu/opera/lib_extra/

Copy link

gronki commented Feb 29, 2016

I get a "corrupt patch" error from git. Please help?

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