Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Using H.264 in Vivaldi for Linux

How to use H.264 support In Vivaldi, via an alternative FFMpeg library


The following is a quick guide to get tthis working on various Linux distros. As a side note, if you have Chrome installed alongside Vivaldi, Netflix should also work after making these changes.


Install chromium-codecs-ffmpeg-extra

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

You will now need to restart Vivaldi. You can then test support on this page.

Arch Linux

Install vivaldi-snapshot from AUR

git clone
cd vivaldi-snapshot

Install vivaldi-ffmpeg-codecs from AUR

git clone
cd vivaldi-ffmpeg-codecs

Install from unofficial repo

You can also install both packages from the [herecura] repo.

Test if all media is supported

Other distros

If your distro does not provide a package with a suitable lib, you can probably use the one from Ubuntu.

Fetch a package

64bit Linux
32bit Linux

Extract the lib from the package

ar p chromium-codecs-ffmpeg-extra_45.0.2454*.deb data.tar.xz | tar xJf - ./usr/lib/chromium-browser/libs/ --strip 5

Note: ar is from the GNU binutils package.

Installing in the Vivaldi directory

Issue the following as root (or prefaced with sudo):

install /opt/vivaldi-snapshot/lib/

You will now need to restart Vivaldi. You can then test support on this page.

Building your own replacement

If you don't want to use the file in the package provided by Ubuntu, you can compile your own.

Installing build dependencies

Ubuntu, Debian & Mint

sudo apt-get update && sudo apt-get install automake build-essential libtool pkg-config yasm zlib1g-dev 


sudo dnf install autoconf automake gcc gcc-c++ libtool make nasm pkgconfig zlib-devel 


zypper in -t pattern devel_basis 

Other distros

  • autoconf
  • automake
  • gcc
  • gcc-c++
  • libtool
  • make
  • nasm (or yasm)
  • pkg-config
  • the zlib development support files

Fetch and unpack the appropriate Chromium source archive

tar xf chromium-$CHRVER.tar.xz
cd chromium-$CHRVER

Fetch and configure Depot Tools

git clone --depth 1
export PATH="$PATH:`pwd`/depot_tools"


./build/gyp_chromium --depth . -Dcomponent=shared_library -Dffmpeg_branding=ChromeOS -Dclang=0
ninja -C out/Release ffmpeg

Note: On systems that don't use PulseAudio (e.g. Slackware), you should also include the define -Duse_pulseaudio=0.

Copy the lib into your Vivaldi install

Issue the following as root or prefaced with the sudo command:

install out/Release/lib/ /opt/vivaldi-snapshot/lib/

Restart browser

You will now need to restart Vivaldi. You can then test support on this page.

Tips for package maintaners

If you repackage Vivaldi browser for your distro, you might want to consider making a vivaldi-snapshot-ffmpeg-codecs package containing a replacement ffmpeg library. It is suggested that you place this library in the directory /opt/vivaldi-snapshot/alt_ffmpeg.

To ensure that Vivaldi detects and prefers the replacement stored there, apply the following patch to the Vivaldi startup script (/opt/vivaldi-snapshot/vivaldi-snapshot):

--- vivaldi-snapshot.original
+++ vivaldi-snapshot
@@ -45,13 +45,8 @@
 # Find with additional codecs.
-if [ -r $CHR_CODECS_CH ]; then
-    sed -n '1s/chromium-browser (\(\([0-9]\+\.\)\{3\}\).*/\1/p')
-  if [ "$CHR_CODECS_VER" = "45.0.2454." ]; then
-    FFMPEG_LD_LIBRARY_PATH=":/usr/lib/chromium-browser/libs"
-  fi
+if [ -r "$HERE/alt_ffmpeg/" ]; then
 # Set LD_LIBRARY_PATH to prefer our libs, excluding $HERE/lib/ if
 # an alternative ffmpeg was found.

This comment has been minimized.

Copy link

Kabouik commented Dec 11, 2016

Thanks for the thorough guide. On Solus 1.2.1, I have had to use a different path to make it work so it may be worth reporting it.

I fetched the following package:

Extracted the lib from the package:
ar p chromium-codecs-ffmpeg-extra_53.0.2785.143-0ubuntu0. data.tar.xz | tar xJf - ./usr/lib/chromium-browser/libs/ --strip 5

Installed it in the Vivaldi directory (differs from what is written in the original how-to):
sudo install /usr/share/vivaldi-snapshot/lib/

Seems to work correctly now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.