Firefox works fine with the default codecs in fedora workstation 40.
I need to use SimpleScreenRecorder (SRR), and had installed x264 from rpm-fusion to create mp4 videos there.
After that Firefox is playing YouTube videos with stuttering video example
These packages aren’t installed
❯ dnf list libswscale-free libavcodec-free
Last metadata expiration check: 0:08:27 ago on Sat 21 Sep 2024 11:36:57 AM -05.
Available Packages
libavcodec-free.i686 6.1.2-1.fc40 updates
libavcodec-free.x86_64 6.1.2-1.fc40 updates
libswscale-free.i686 6.1.2-1.fc40 updates
libswscale-free.x86_64 6.1.2-1.fc40 updates
~
❯
I have following the recommendations of rpm-fusion web
❯ dnf list libavcodec-freeworld
Last metadata expiration check: 0:19:40 ago on Sat 21 Sep 2024 03:45:08 PM -05.
Installed Packages
libavcodec-freeworld.x86_64 6.1.2-2.fc40 @rpmfusion-free-updates
Available Packages
libavcodec-freeworld.i686 6.1.2-2.fc40 rpmfusion-free-updates
~
❯
❯ sudo dnf group install --with-optional -x PackageKit-gstreamer-plugin multimedia
Last metadata expiration check: 4:06:28 ago on Sat 21 Sep 2024 11:59:24 AM -05.
No match for group package "PackageKit-gstreamer-plugin"
Dependencies resolved.
==============================================================================================================================================================================
Package Architecture Version Repository Size
==============================================================================================================================================================================
Installing Groups:
Multimedia
Transaction Summary
==============================================================================================================================================================================
Is this ok [y/N]: y
Complete!
~ 4s
❯
After install I restarted the computer, but doesn’t work.
As it seems you have all the codecs, the problem could be elsewhere, for example the Nvidia drivers or perhaps the SimpleScreenRecorder has something to do with it. Neither of which I am familiar with.
H.265 is not supported on Firefox, regardless of the packages you install; there is simply no way to enable it. YouTube primarily uses VP9 and AV1 codecs, so you don’t need H.265 anyway. You can go to about:support in Firefox. The page will show you the media codec support status:
Firefox in fedora repo has many issue like some codes does not work.
I recommend you to just remove firefox sudo dnf remove firefox
And install firefox from software store as flatpak from flathub
Else flatpak install flathub org.mozilla.firefox
It will give you a good out of the box experience no issues at all.
And it is more secure to use a browser as a flatpak.
It seems that no hardware acceleration is configured, which may be causing video stutter. Do you know what GPU you’re using? If it’s a typical, recent NVIDIA GPU, you can try the following:
With that quote, why does that flag exist and seemingly work on Windows? Or is it a matter of semantics? (I guess Firefox is passing it to wmf but why can’t it do that with ffmpeg?)
WMF is a DRM-enabled environment for media plugins, so the key here is probably the proprietary nature of the integration. There is no open source alternative for this that could be used on linux, ffmpeg doesn’t have anything like that.
In that case, the method I mentioned above does not work. I’m not personally familiar with this card, but I think you would need the Nouveau driver instead to enable video acceleration. If it becomes too complex, lowering video bitrate is another alternative.
I feel that H.265 licensing is a huge mess. My understanding is that each application requires a license to use H.265. However, MPV can play H.265 videos with hardware acceleration using FFmpeg and VAAPI, but Firefox cannot.