How to enable HTML5 MP4 (H.264/AAC) video and MP3 audio in Vivaldi for Linux, via an alternative FFMpeg library
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. Alternatively, use my latest-widevine.sh to fetch and extract Chrome's copy of Widevine, so that it can be used by Vivaldi.
If you don't have working Flash video and need that in addition, please refer to these instructions.
sudo apt update && sudo apt install oxideqt-codecs-extra
You will now need to restart Vivaldi. You can then test support on this page.
If you want to use the latest stable, install vivaldi and vivaldi-ffmpeg-codecs.
If you want to use the latest snapshot, install vivaldi-snapshot and vivaldi-snapshot-ffmpeg-codecs.
Alternatively, you can also get both of these packages from from the unofficial [herecura] repo.
After installing from the AUR or the linked unofficial repository, 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 library or one is not detected, you can run the script ./latest-proprietary-media.sh
(included with this gist) as your normal user (not root) to fetch and install the Ubuntu file. Once installed, simply restart Vivaldi. You can then test support on this page.
If you want to build your own replacement libffmpeg use the Arch vivaldi-snapshot-ffmpeg-codecs PKGBUILD as a guide.
If you are a maintainer and intend to repackage Vivaldi browser for your distro, you might want to consider making vivaldi-ffmpeg-codecs or vivaldi-snapshot-ffmpeg-codecs packages containing a replacement libffmpeg.so library. It is suggested that you place this library in the directory /opt/vivaldi/
or /opt/vivaldi-snapshot/
directories respectively. You will need to update these packages from time to time as Vivaldi ups its Chromium version. If your libffmeg.so is compiled from a Chromium that is too old, it could prevent Vivaldi from displaying any videos and/or cause crashes.