Skip to content

Instantly share code, notes, and snippets.

@lukaszzek

lukaszzek/instructions.md Secret

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

Install depot tools

https://www.chromium.org/developers/how-tos/install-depot-tools

Get chromium source code

Opera Developer 35.0.2052.0 -> http://commondatastorage.googleapis.com/chromium-browser-official/chromium-48.0.2547.0.tar.xz
Opera Beta 34.0.2036.3 -> http://commondatastorage.googleapis.com/chromium-browser-official/chromium-47.0.2526.35.tar.xz
Opera 33.0.1990.115 -> http://commondatastorage.googleapis.com/chromium-browser-official/chromium-46.0.2490.86.tar.xz

Unpack the archive

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

Install build dependencies (Ubuntu only)

# Visit https://chromium.googlesource.com/chromium/src/+/master/docs/linux_build_instructions_prerequisites.md
./build/install-build-deps.sh --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/libffmpeg.so* $OPERADIR/lib_extra

Restart browser

@axfelix

This comment has been minimized.

Copy link

@axfelix 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 install-build-deps.sh 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 :)

@axfelix

This comment has been minimized.

Copy link

@axfelix axfelix commented Aug 24, 2015

FYI, had to comment out a line to be able to build Chromium 46 for Opera developer 33: https://code.google.com/p/chromium/issues/detail?id=515917, otherwise this still worked fine.

@lukaszzek

This comment has been minimized.

Copy link
Owner Author

@lukaszzek 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).

@ghandmann

This comment has been minimized.

Copy link

@ghandmann ghandmann commented Sep 23, 2015

Good finding, that the libffmpeg.so 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 http://www.quirksmode.org/html5/tests/video.html

I simply link the libffmpeg.so to $OPERALIB/lib_extra/libffmpeg.so.$OPERAVERSION:

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

This comment has been minimized.

Copy link

@gronki 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