Closed SmoochySix4 closed 8 months ago
In 10.8, HDR10 isn't specified for HEVC: https://github.com/jellyfin/jellyfin-web/blob/d274d7f74187e2f5fe601e022183ddaa68281c8e/src/scripts/browserDeviceProfile.js#L841-L844
In 10.9, it is enabled for HEVC, but disabled for Edge :man_shrugging: : https://github.com/jellyfin/jellyfin-web/blob/5e8cc3f9150987846c8458cbe1e33f9689b1ba51/src/scripts/browserDeviceProfile.js#L196-L198
Edge does not support tone-mapping when there is no GPU, and when there is a GPU, the tone-mapped SDR color is a mess. As for the case where the display HDR has been manually turned on, we need a check to bypass this.
@dmitrylyzo Do you know how to check if the current display is SDR or HDR in a browser?
And it has recently introduced more bugs to the point where it cannot decode AV1. But it still reports via canPlaytype that it supports AV1.
@dmitrylyzo Do you know how to check if the current display is SDR or HDR in a browser?
Maybe https://stackoverflow.com/a/75213217 (for modern browsers), but I haven't tested.
We could add a checkbox to toggle HDR support (I had this idea when I was trying to implement the IsHDR param - it is replaced by your VideoRange). Not all HDR capable panels have sufficient brightness/contrast - scenes become too dark. With this checkbox, we can disable HDR to force tone-mapping.
I am not sure I understand where the issues lie, then, as I have had no issues with the color on Amazon, Plex, or Netflix when using Edge Chromium with HEVC HDR10.
What should be the selection is, if you have tone mapping turned off in the settings, then jellyfin-web should ignore anything related to the video having HDR and just direct stream the video, instead of forcing the transcode. If tone mapping is turned off, what is the point of the transcode to begin with?
That being said, if I were to want to enable Edge Chromium as an HDR supported browser in jellyfin-web, what & where would I make the modification?
I am not sure I understand where the issues lie, then, as I have had no issues with the color on Amazon, Plex, or Netflix when using Edge Chromium with HEVC HDR10.
Since your display supports HDR, tone mapping is not required. But it may be dark if the brightness is insufficient (nits?). In your case, enabling HDR will work. That's why Nyan asked how to detect HDR capability from JS.
What should be the selection is, if you have tone mapping turned off in the settings, then jellyfin-web should ignore anything related to the video having HDR and just direct stream the video, instead of forcing the transcode. If tone mapping is turned off, what is the point of the transcode to begin with?
Having client-side Enable tone-mapping
is also useful. But we still need to know if the client supports HDR10 or DolbyVision - this can trigger transcoding (can HDR10, but can't DoVi). So mentioned checkbox was intended as a device profile setting.
That being said, if I were to want to enable Edge Chromium as an HDR supported browser in jellyfin-web, what & where would I make the modification?
As a workaround, change this block to:
if (browser.edgeChromium || browser.chrome || browser.firefox) {
hevcVideoRangeTypes += '|HDR10|HLG'; // add this
vp9VideoRangeTypes += '|HDR10|HLG';
av1VideoRangeTypes += '|HDR10|HLG';
}
Maybe https://stackoverflow.com/a/75213217 (for modern browsers), but I haven't tested.
Great. Maybe YouTube is using this API, so it can provides HDR video options dynamically.
We could add a checkbox to toggle HDR support (I had this idea when I was trying to implement the IsHDR param - it is replaced by your VideoRange). Not all HDR capable panels have sufficient brightness/contrast - scenes become too dark. With this checkbox, we can disable HDR to force tone-mapping.
Make sense.
For the record, DoVi P5 on Windows Chrome/Edge requires this option. But it's disabled by default.
chrome://flags/#enable-media-foundation-clear
I downloaded the source code, modified the .js file, and currently testing with npm start, but that file is still being transcoded. Still saying the videos range is not supported. Do I need to disable tone mapping as well?
I downloaded the source code, modified the .js file, and currently testing with npm start, but that file is still being transcoded. Still saying the videos range is not supported. Do I need to disable tone mapping as well?
Just in case, are you connecting http://localhost:8081
?
Check the payload for PlaybackInfo
in the Developer Tools / Network. There should be
"CodecProfiles": [{
"Codec": "hevc",
"Conditions": [{
"Condition": "EqualsAny",
"IsRequired": false,
"Property": "VideoRangeType",
"Value": "SDR|HDR10|HLG" // <-- here supported video ranges
}]
}]
Okay, I am not sure where that is. First timer with nodejs and the like. But... I did figure out what was wrong on my end. I had checked out 10.8.9, and it didn't work. Works great on 10.8.11. No transcoding at all.
Now, to figure out how to stop it from letterboxing a 1080p video on a 2k monitor...
Thanks for all of the help.
Works great on 10.8.11. No transcoding at all.
With this workaround? Or just clean 10.8.11? Or disabled video transcoding?
Sorry. Yeah, 10.8.11 with the edit to the browserDeviceProfile.js
Edge does not support tone-mapping when there is no GPU, and when there is a GPU, the tone-mapped SDR color is a mess. As for the case where the display HDR has been manually turned on, we need a check to bypass this.
@dmitrylyzo Do you know how to check if the current display is SDR or HDR in a browser?
And it has recently introduced more bugs to the point where it cannot decode AV1. But it still reports via canPlaytype that it supports AV1.
if (screen.colorDepth > 24 && window.matchMedia('(color-gamut: p3)').matches) {
/* use HDR content, or if you want you can check also for rec2020 */
} else {
/* use SDR content */
}
But can you elaborate on the no-GPU thing? How can you run Edge without a gpu? It is not a terminal application that you can view over SSH :D
I think most people can infer from the context that no GPU means the GPU hardware acceleration is disabled in Chrome (artificial/driver bug list/driver not installed).
I have a similar experience, basically everything HEVC (up to 8K@60, 10bit, PQ/HLG), VP9, AV1 decodes fine but Jellyfin Web tends to start transcoding quite often. Basically everything except Dolby Vision P5 and Rext plays correctly, which this test page confirms. (The MediaFoundation flag suggested above changed nothing, Edge just doesn't seem to handle the DV P5 color space correctly)
If at all possible a checkbox to fall back to transcoding in those few rare cases would be significantly nicer.
Describe The Bug The HDR HEVC movie keeps getting transcoded to non-HDR H264 even though my monitor is HDR, the setting is on in Windows 11, and it works fine in Plex, YouTube, Amazon, Max, etc...
All required browser extensions/codecs from the Microsoft App Store are downloaded.
Media Information
Screenshots
System (please complete the following information):
Additional Context