-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Firefox 132+ to list of HEVC-supporting browsers #5876
base: master
Are you sure you want to change the base?
Conversation
Mozilla implemented support for HEVC decoding using WMF on Windows. Support for HEVC playback is being tested anyway using the canPlayHevc() function, so this should be a safe change for other operating systems (or systems without hardware HEVC decoding) as well. Fixes jellyfin#5706
Firefox does not support 10bit HEVC and is lying with the feature tests. The playback will automatically fallback to transcoding with our fail and retry mechanism, but I think it is better to add check here: jellyfin-web/src/scripts/browserDeviceProfile.js Lines 964 to 983 in 9fe9666
Basically we should skip these main10 profile tests for Firefox so that they are not mistakenly marked as supported to avoid unnecessary retry and reduce video load time. |
Nothing can ever be easy, huh? So basically if the browser is Firefox, we should only add |
Quality Gate passedIssues Measures |
I have added an override for Firefox's real capabilities at the end of the block of checks that determine HEVC profile compatibility (seems cleaner to me to do it at the end instead of making each condition longer, I doubt the "unnecessary" checks will make a significant difference). jellyfin-web/src/scripts/browserDeviceProfile.js Lines 983 to 987 in dac35a1
I was able to test this using a HEVC What @gnattu said confused me a bit tbh, because it was working before as well. But checking the logs showed that Jellyfin did an automatic fallback to transcoding when playback of the the This override will need to be removed once Firefox supports |
Cloudflare Pages deployment
|
Hi, I understand that you are probably quite busy. But I wanted to ask whether anyone from the JF team thinks we can proceed with adding this? Is there something else I could do? |
Please be patient as the web team is super busy. It is normal that a PR is not merged for weeks as lots of mine are in this state as well. I'm good with your current solution but we still need the web team members to look at it. |
|
Firefox on other platforms do not report HEVC as supported so this is currently redundant
We can do little if it is a firefox bug |
This may not necessarily be a problem with Firefox itself. |
One is an AMD driver issue and the other two are a QSV filter issue I handled in the past. They are not related to this one because there is no hardware transcoding involved. If Chrome doesn't have this problem on the same file, then you need to wait for Firefox to fix their frame cropping. |
@gnattu Which feature tests/under which conditions is Firefox lying? I recently filed a related bug and may look into upstreaming a fix for it so might be useful to collect all issues into a fix. This link might be helpful: https://cconcolato.github.io/media-mime-support |
Firefox reports HEVC main10 as supported for |
@fanonwue Just tested Firefox 132 stable with |
In that case, do you want me to adjust the workaround to only work below 132? |
Since HEVC is experimental in older versions, I don't think it's necessary to add a workaround specifically for those broken versions, as browser updates are usually frequent. |
Sorry, this is my first time contributing to a larger project: Do you want me to revert the last commit that introduced the override then? I think it would be good to update the minimum FF version to 132 then as well, I've set it to 121 in the original commit. |
It should be enough to bump the checked version up to 132. |
HEVC 10bit was broken before, but the support seems to be mores table now
Quality Gate passedIssues Measures |
I've removed the previous override (disallowing HEVC main10) and raised the minimum version to 132. |
We have more problems regarding this because Firefox 132 on Windows is lying again where it will report HEVC as supported even that flag is disabled as long as the media codec extension is installed which is super annoying. In the worst case we have to implement manual switch for Firefox users to enable this manually but I really don't want to go that approach. |
Just tested it with Firefox Nightly 134 and this does not happen. My test video is HEVC main10, it's streaming directly when setting EDIT: Also works with stable 132. I think the important part is to restart the browser. It works for HEVC main and HEVC main10. |
Mozilla implemented support for HEVC decoding using WMF on Windows. Support for HEVC playback is being tested anyway using the canPlayHevc() function, so this should be a safe change for other operating systems (or systems without hardware HEVC decoding) as well.
Changes
Firefox (121 and later) supports HEVC decode in fMP4 containers when it's using the new WMF-based media backend, so it should be added to the conditional check for that. The new backend is only available on Windows and not enabled by default (iirc), but when it's present, decoding works perfectly.
The
canPlayHevc()
function correctly reports decoding capabilities, so a fallback to H264 happens whenmedia.wmf.hevc.enabled
is disabled, WMF is not present or no hardware decoding is available (I was only able to test this using WSL2 so far, but I doubt that this is going to be different for "real" systems).Issues
Fixes #5706
EDIT: Changed version in title to 132 as there have been bugs regarding 10-bit HEVC in earlier versions.