From Vivaldi (for Linux) 2.9 onwards the way that proprietary media support is handled has changed. The official (deb/rpm) packages run a script called
update-ffmpeg (that is included with Vivaldi) as part of the post install process.
This script fetches and installs a suitable proprietary media enabled libffmpeg.so and places it in “/var/opt/vivaldi/media-codecs-$CHROMIUM_VERSION/libffmpeg.so” (where CHROMIUM_VERSION roughly matches the Chromium version of Vivaldi).
When Vivaldi launches the (bash-based) startup wrapper script looks for the presence of this file and if it finds it, then it will use LD_PRELOAD to load this in preference to limited lib that ships within the package (lib/libffmpeg.so).
For maintainers of unofficial Vivaldi install packages on non deb/rpm distros such as Arch, Gentoo, Solus, Slackware, etc., the following are suggestions as to how to handle the new situation:
- Offer your own proprietary media enabled libffmpeg.so. This could either be bundled with the Vivaldi repackage or as a seperate package that is listed as a dependency (or recommended package) – See: Providing a proprietary media enabled libffmpeg.so
update-ffmpegin post install (and
update-ffmpeg --undoat pre or post uninstall). This will cause your package to work like the official (deb/rpm) packages, i.e. installation and removal of a suitable library will then be offloaded to this script
- Do nothing. If
update-ffmpeghas not been run in post install, then the startup wrapper will not find a proprietary media enabled libffmpeg.so and it will set the variable
NObefore launching Vivaldi. This in turn will cause Vivaldi to inform the user of the issue and guide them how to fix themselves (basically it tells them to run the script themselves).
If you choose option “1.” do not overwite “lib/libffmpeg.so” within the package, because doing so will bypass the startup wrapper's logic for setting the
The startup wrapper assumes that the bundled copy is always limited. It is therefore better to save your file within the main Vivaldi install directory, named as “libffmpeg.so.$MAJOR.$MINOR”, where “$MAJOR.$MINOR” represents the first and second parts of the Vivaldi version number, e.g. for Vivaldi version 2.9.1705.41 the startup wrapper will look for a file named “libffmpeg.so.2.9”. If this is found, it will be preloaded in preference to the bundled “lib/libffmpeg.so” and the variable
VIVALDI_FFMPEG_FOUND will be set to
NO before launching Vivaldi (thus disabling the warning message to the user).
An example of distro that does this is Arch Linux https://aur.archlinux.org/packages/vivaldi-snapshot-ffmpeg-codecs/. The build instructions in the linked PKGBUILD could also be used as a guide as how to build a suitable library.