Get H.264/MP4 codecs to work in Vivaldi Browser
Posted #CaffeeLog#Linux
I’m a happy user of the Vivaldi Browser. But every time after an upgrade, H.264 videos stop working and every time I search and try quite a while to get it working again…maybe because the solution is always to obvious.
So, now I write it down in the hope of remembering it next time ;).
1) The easy (to obvious) option
Execute vivaldi in a comand line!
The output is something like:
$ vivaldi
No suitable library for HTML5 proprietary media (MP4[H.264/AAC]) was found,
therefore only open codecs will play.
To add support for proprietary media, issue the following command and restart
Vivaldi:
curl https://launchpadlibrarian.net/401553574/chromium-codecs-ffmpeg-extra_72.0.3578.98-0ubuntu0.16.04.1_amd64.deb |\
tail -c+1081 | tar xJ -C ~ --wildcards \*libffmpeg.so --xform 's,.*/,.local/lib/vivaldi/,'
There it is. Execute the command and it will download a .deb package, extract the libffmpeg.so
and store it under ~/.local/lib/vivaldi/libffmpeg.so
.
Done.
You can also store the shared library in /opt/vivaldi/lib/
to be used system wide.
2) Compile libffmpeg.so by yourself
As described e.g. here, it is also possible to compile the libffmpeg.so
(in case you don’t trust pre-compiled libraries).
Finally: Test all codecs
To test the different video codecs, go to: https://www.quirksmode.org/html5/tests/video.html