jellyfin / jellyfin-web

Web Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
2.43k stars 1.29k forks source link

HDR not working in Edge w/ HEVC extensions #4280

Closed Sawtaytoes closed 1 year ago

Sawtaytoes commented 1 year ago

Describe The Bug

When playing HDR content from Jellyfin web, it's transcoding that content instead of sending it to my browser in HDR.

Looks like this (left to right):

image

I took this screenshot in SDR mode. In HDR mode, Jellyfin looks the same, but the other two clip as-expected because it's an SDR screenshot: image

Steps To Reproduce

  1. Open Edge in Windows.
  2. Go to Jellyfin.
  3. Set hardware acceleration to "None" (I have no GPU in this box, and my processor's AVX-512 isn't supported).
  4. Click on an HDR10 demo video (h.265 10-bit).
  5. Check Playback Info.
  6. See transcoding video because of an unsupported format.

Expected Behavior

I expect Jellyfin to play HDR content in one of these ways:

Logs

This video's range type is not supported. image

Screenshots

See above.

System (please complete the following information):

Additional Context

This is a new Jellyfin install this week. I'm running it in a Docker container through TrueNAS using the TrueCharts version. I've also modified the resource limitations to 16 threads and 32GB of RAM.

This chart says Edge HDR is supported with the HEVC Extensions which is why I bought them: image

dmitrylyzo commented 1 year ago

Does it work if you uncheck the Allow video playback that requires transcoding for the user in the Dashboard?

No hevcVideoRangeTypes here: https://github.com/jellyfin/jellyfin-web/blob/cf204f0b27c4ac39a4013791c2ae2c6b62fc24eb/src/scripts/browserDeviceProfile.js#L863-L866

StaZhu commented 1 year ago

Edge doesn't support PQ HDR tone-mapping well which is a known issue of the browser impl. See this table for more details (https://github.com/StaZhu/enable-chromium-hevc-hardware-decoding#hdr-supports-compared-with-edge--safari).

Chrome supports PQ/HDR tone-mapping well thats why you wasn't facing any issue on Chrome.

Sawtaytoes commented 1 year ago

I was having the same issue on Chrome, but I didn't post it because it was shown as unsupported in the docs.

It works in Plex on Chrome, not Jellyfin. No browser I tested shows HDR for Jellyfin.

When playing YouTube in Edge, HDR works fine. Same as Chrome. I don't know what you mean about PQ tone-mapping in Edge.

Since I have hardware acceleration disabled, there's no tone-mapping anyway.

And on an HDR display, I don't always need a tone mapper enabled. My display can handle it in some scenarios (like a TV).

nyanmisaka commented 1 year ago

Edge doesn't browser side tone-mapping at all. So you have to rely on server side tone-mapping.

We currently only support DV/HDR ->SDR tone-mapping with GPU on your server. And CPU based software tone-mapping is WIP.

Chrome does support tone-mapping but it requires this PR: https://github.com/jellyfin/jellyfin-web/pull/4041

Sawtaytoes commented 1 year ago

That PR, #4041, will enable HDR in Chrome just like Plex?

nyanmisaka commented 1 year ago

Yes. It enables HDR direct play and HEVC transcoding for Chrome.

You can also modify this line to allow HDR in Chrome. https://github.com/jellyfin/jellyfin-web/pull/4041/files#diff-a78ea2803d6a5a5ae575ccbe06597ca3489dd840596c4c7e07b1b9427397364fR883

Schaka commented 1 year ago

Thank you, this clarification helped a lot. I tried the PR locally and it worked. For anyone else looking for a temporary solution - build jellyfin-web locally with #4041

brothercheng0924 commented 1 year ago

Yes. It enables HDR direct play and HEVC transcoding for Chrome.

You can also modify this line to allow HDR in Chrome. https://github.com/jellyfin/jellyfin-web/pull/4041/files#diff-a78ea2803d6a5a5ae575ccbe06597ca3489dd840596c4c7e07b1b9427397364fR883

Hello, I also want to enable HDR direct play for Chrome, but I cannot find the file src/scripts/browserDeviceProfile.js in my Synology. The Jellyfin I am using is installed directly through the SPK file of synology community. So what should I do now, I'm sorry I'm a novice in this field. I'm looking forward to your reply.

jellyfin-bot commented 1 year ago

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.

If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.

This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.