ffmpeg's chromium USE flag makes ffmpeg install libffmpeg.so in /usr/lib64/chromium, but it is not useable or recognized by vivaldi.
https://www.youtube.com/html5 says vivaldi doesn't support H.264
I tried to install http://gpo.zugaina.org/www-plugins/vivaldi-ffmpeg-codecs, but SRC_URI was broken.
I copied vivaldi-ffmpeg-codecs ebuild to my local overlay and updated SRC_URI and installed www-plugins/vivaldi-ffmpeg-codecs-64.0.3282.119
Finally, https://www.youtube.com/html5 says vivaldi supports H264.
(In reply to crocket from comment #0)
> ffmpeg's chromium USE flag makes ffmpeg install libffmpeg.so in
> /usr/lib64/chromium, but it is not useable or recognized by vivaldi.
Not recognised how? There is a function checkffmpeg() in /usr/bin/vivaldi that checks different locations. Which libffmpeg.so did it pick? Perhaps you can add some statements ("echo $1 $2" on the line after "export VIVALDI_FFMPEG_FOUND=YES" perhaps) that show which one it loads?
/usr/bin/vivaldi-stable: line 35: [: -ge: unary operator expected
/usr/bin/vivaldi-stable: line 35: [: -ge: unary operator expected
No suitable library for HTML5 MP4 (H.264/AAC) video and MP3 audio was
found, therefore only open codecs will play.
# Chromium's FFMpeg version N-89284-gba4dfad is the oldest known working version
/usr/lib64/chromium/libffmpeg.so installed by ffmpeg contains a string, "FFMpeg 3.3.6". Thus, /opt/vivaldi/vivaldi's checkffmpeg can't use it. It seems I need to install http://gpo.zugaina.org/www-plugins/chromium-codecs-ffmpeg-extra or http://gpo.zugaina.org/www-plugins/vivaldi-ffmpeg-codecs
"FFMpeg 3.3.6" -> "FFMpeg version 3.3.6"
According to https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=vivaldi-snapshot-ffmpeg-codecs, libffmpeg.so for vivaldi or opera has to be built from chromium, not ffmpeg.
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=vivaldi-ffmpeg-codecs would be more appropraite for the current version of vivaldi on gentoo overlay.
https://gist.github.com/ruario/bec42d156d30affef655 says you will need to update vivaldi-ffmpeg-codecs from time to time as Vivaldi updates its Chromium version.
I suggest incorporating https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=vivaldi-ffmpeg-codecs into vivaldi as a USE flag.
opera ignores /usr/lib64/chromium/libffmpeg.so, too.
The startup script for vivaldi runs some checks to find a good libffmpeg:
checkffmpeg '/usr/lib/chromium-browser/libffmpeg.so' '/usr/share/doc/chromium-codecs-ffmpeg-extra'
checkffmpeg "/usr/lib/$DEBARCH/oxide-qt/libffmpeg.so" '/usr/share/doc/oxideqt-codecs-extra'
checkffmpeg '/usr/lib64/chromium-ffmpeg-extra/libffmpeg.so' '/usr/share/doc/packages/chromium-ffmpeg-extra'
The first entry I add through a patch, the rest have as second argument what Vivaldi developers apparently see as canonical locations for a document that describes the libffmpeg in the first argument. Perhaps the first checkffmpeg line should get a second argument as well, but what file should it point to?
Also note that the line I add causes bash to complain:
/usr/bin/vivaldi: line 35: [: -ge: unary operator expected
Because `grep -aom1 'FFmpeg version N-[0-9]\+-' "$1" | cut -f2 -d-` is not in double quotes, when it is an empty string,
"/usr/bin/vivaldi: line 35: [: -ge: unary operator expected" is printed on stderr.
It simply means grep -aom1 'FFmpeg version N-[0-9]\+-' "$1" failed to find 'FFmpeg version N-[0-9]\+-' from an ffmpeg library.
The ffmpeg library must be compiled from chromium's source code.
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=vivaldi-ffmpeg-codecs has instructions that build libffmpeg.so from chromium source code.
(In reply to crocket from comment #11)
> Because `grep -aom1 'FFmpeg version N-[0-9]\+-' "$1" | cut -f2 -d-` is not
> in double quotes, when it is an empty string,
Yes yes yes.
> The ffmpeg library must be compiled from chromium's source code.
Like media-video/ffmpeg[chromium]? I am not sure what you're trying to add to the conversation now.
As far as I know, media-video/ffmpeg[chromium] doesn't build libffmpeg.so from chromium's source code.
libffmpeg.so produced by ffmpeg's chromium USE flag is not useable by opera or vivaldi.
(In reply to crocket from comment #13)
> As far as I know, media-video/ffmpeg[chromium] doesn't build libffmpeg.so
> from chromium's source code.
Nope, but chromium builds its libffmpeg.so from ffmpeg's sources. They do apply their own patches to it, though.
> libffmpeg.so produced by ffmpeg's chromium USE flag is not useable by opera
> or vivaldi.
It used to work. I guess chromium has somehow made it incompatible without their patches added. Havent studied this, but they may be portable to work with upstream ffmpeg using patches. I tried with ffmpeg-4 but it didnt work. No info about ffmpeg-9999.
Maybe add email@example.com to CC here, since he's done all the work for ffmpeg[chromium]?
#654208 (chromium[system-ffmpeg] doesnt work) related to this one.
Same issue here: hard replacement of libffmpeg.so provided by Vivaldi with media-video/ffmpeg[chromium] is a no go.
CC Chewi seems to be a good idea. For the record, last comment of chewi: https://gist.github.com/ruario/bec42d156d30affef655#gistcomment-2374195
http://gpo.zugaina.org/www-plugins/vivaldi-ffmpeg-codecs is not a reliable solution either as it is based on Arch Linux herecura repo which is synced with Arch Linux. For example it requires glibc 2.27 as of now (Gentoo Stable = 2.26).
I'm using "chromium-codecs-ffmpeg-extra" from Ubunutu's repositories to get H.264/MP4 working.
When I get a Vivaldi update and it breaks H.264/MP4 I download the latest one, extract it and copy libffmpeg.so to /opt/vivaldi/lib/
Bah, there's so much confusion here, I wish someone had pinged me earlier.
You don't need the Chromium sources. I have just pushed a fix to the ffmpeg ebuilds (v4+ only) to make it work again. It won't work out of the box yet because jer stopped patching the launcher script a while back. For now, you'll need to manually set LD_PRELOAD to the libffmpeg.so path or symlink it from /opt/vivaldi/lib/libffmpeg.so.
jer, in terms of making this work in the browser, I think more caution is needed.
The version check it does will never work because it's checking against the version used by Chromium (based on git commits) rather than the upstream ffmpeg version that our library has.
Just commenting it out is dangerous because it'll almost certainly break when the ffmpeg subslot/soname changes. I seriously recommend adding an ffmpeg dependency like "proprietary-codecs? ( media-video/ffmpeg:0/56.58.58[chromium] )" or you'll get problems that could include videos not working without warning, browser tabs crashing, and the browser segfaulting on startup. With the dependency in place, users can choose whether they would prefer to upgrade ffmpeg now or keep the videos working.
Using that approach, you can avoid patching altogether and just replace the libffmpeg.so file that gets installed with a symlink. I'm less bothered about this aspect though, I'd just like it to work while avoiding nasty breakages.
Confirm the bug. Thwe workaround is delete /opt/vivaldi-snapshot/lib/libffmpeg.so and replace it with symlink of /usr/lib64/chromium/libffmpeg.so.
/opt/vivaldi-snapshot/lib/libffmpeg.so -> /usr/lib64/chromium/libffmpeg.so