The following is a quick guide to get this working on various Linux distros. As a side note, if you have Chrome installed alongside Vivaldi, Netflix should also work after making these changes.
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.
If your distro does not provide a package with a suitable lib, you can probably use the one from Ubuntu.
wget http://security.ubuntu.com/ubuntu/pool/universe/c/chromium-browser/chromium-codecs-ffmpeg-extra_45.0.2454.101-0ubuntu0.14.04.1.1099_amd64.deb
wget http://security.ubuntu.com/ubuntu/pool/universe/c/chromium-browser/chromium-codecs-ffmpeg-extra_45.0.2454.101-0ubuntu0.14.04.1.1099_i386.deb
ar p chromium-codecs-ffmpeg-extra_45.0.2454*.deb data.tar.xz | tar xJf - ./usr/lib/chromium-browser/libs/libffmpeg.so --strip 5
Note: ar
is from the GNU binutils package.
Issue the following as root (or prefaced with sudo
):
install libffmpeg.so /opt/vivaldi-snapshot/lib/libffmpeg.so
You will now need to restart Vivaldi. You can then test support on this page.
If you don't want to use the file in the package provided by Ubuntu, you can compile your own.
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
- autoconf
- automake
- gcc
- gcc-c++
- libtool
- make
- nasm (or yasm)
- pkg-config
- the zlib development support files
CHRVER=45.0.2454.26
wget http://commondatastorage.googleapis.com/chromium-browser-official/chromium-$CHRVER.tar.xz
tar xf chromium-$CHRVER.tar.xz
cd chromium-$CHRVER
git clone --depth 1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
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
.
Issue the following as root or prefaced with the sudo
command:
install out/Release/lib/libffmpeg.so /opt/vivaldi-snapshot/lib/libffmpeg.so
You will now need to restart Vivaldi. You can then test support on this page.
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 libffmpeg.so
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 @@
fi
# Find libffmpeg.so with additional codecs.
-CHR_CODECS_CH="/usr/share/doc/chromium-codecs-ffmpeg-extra/changelog.Debian.gz"
-if [ -r $CHR_CODECS_CH ]; then
- CHR_CODECS_VER=$(gzip -cd $CHR_CODECS_CH |
- 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/libffmpeg.so" ]; then
+ FFMPEG_LD_LIBRARY_PATH=":$HERE/alt_ffmpeg"
fi
# Set LD_LIBRARY_PATH to prefer our libs, excluding $HERE/lib/libffmpeg.so if
# an alternative ffmpeg was found.