Jellyfin Forum
HDR/DV tone mapping, very dark in this example - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: General Questions (https://forum.jellyfin.org/f-general-questions)
+--- Thread: HDR/DV tone mapping, very dark in this example (/t-hdr-dv-tone-mapping-very-dark-in-this-example)



HDR/DV tone mapping, very dark in this example - xilex - 2023-10-24

Hello, I have an issue where tone mapping is very dark. It has generally worked well, but I noticed this particular video the image is very dark. The first screenshot is from Jellyfin. The second is from VLC. I am playing the video in Chrome browser, because the device I am playing on cannot handle decoding 4K HVEC at the moment. I used these settings for tone mapping from a post I found online that recommended them to increase the brightness. I am not sure if tone mapping is imperfect, and the best is to use the source that the output device supports, eg in this case SDR would be best.

Is this normal behavior for Jellyfin? Would it be better if I used Apple TV to play? My TV supports HDR, but not Dolby Vision. Either way, it would be nice to have it convert to SDR in a viewable format. Thanks.

In Server > Playback, I have these settings:
* NVENC hardware acceleration
* Tone mapping algorithm: Mobius
* Tone mapping mode: auto
* Tone mapping range: auto
*  ... desat: 0
*  ... peak: 10
*  ... param: null

The source video information:
Code:
Video
Title: 4K HEVC HDR
Codec: HEVC
Profile: Main 10
Level: 153
Resolution: 3840x2160
Aspect ratio: 16:9
Interlaced: No
Framerate: 25
Bitrate: 18832 kbps
Bit depth: 10 bit
Video range: HDR
Video range type: HLG
Color space: bt2020nc
Color transfer: arib-std-b67
Color primaries: bt2020
Pixel format: yuv420p10le
Ref frames: 1

   

   


RE: HDR/DV tone mapping, very dark in this example - toytown - 2023-10-24

I think its because the HDR Format is HLG. I'm pretty sure i have the same file (Planet Earth 3) and noticed the same thing yesterday. It direct plays on my LGTV perfectly but when transcoded to H264 i get the dark image like you have here. This doesn't happen on other DolbyVision/HDR content, i'm using an Arc380 so it seems its happening on multiple hardware.


RE: HDR/DV tone mapping, very dark in this example - xilex - 2023-10-25

(2023-10-24, 11:34 PM)toytown Wrote: I think its because the HDR Format is HLG.  I'm pretty sure i have the same file (Planet Earth 3) and noticed the same thing yesterday.  It direct plays on my LGTV perfectly but when transcoded to H264 i get the dark image like you have here.  This doesn't happen on other DolbyVision/HDR content, i'm using an Arc380 so it seems its happening on multiple hardware.

Thanks, that is good to know. Sounds like I should use the TV's native player (which sounds like is a whole other ordeal to install on older LG TVs).


RE: HDR/DV tone mapping, very dark in this example - nyanmisaka - 2023-10-25

There must be a flaw in my HLG tonemapper code. I'll take a look at it later.


RE: HDR/DV tone mapping, very dark in this example - nyanmisaka - 2023-10-25

As a workaround, you can temporarily disable the tone-mapping.
Unlike HDR10, HLG content is pretty well backwards compatible with SDR display most of the time.


RE: HDR/DV tone mapping, very dark in this example - nyanmisaka - 2023-10-25

It should be fixed in the next jellyfin-ffmpeg release.

After fix:
   


6.0 https://github.com/jellyfin/jellyfin-ffmpeg/actions/runs/6644058402
5.1 https://github.com/jellyfin/jellyfin-ffmpeg/actions/runs/6644059210

Once these builds are complete, you can download them to try out early.


RE: HDR/DV tone mapping, very dark in this example - xilex - 2023-11-03

(2023-10-25, 05:39 PM)nyanmisaka Wrote: It should be fixed in the next jellyfin-ffmpeg release.

6.0 https://github.com/jellyfin/jellyfin-ffmpeg/actions/runs/6644058402
5.1 https://github.com/jellyfin/jellyfin-ffmpeg/actions/runs/6644059210

Once these builds are complete, you can download them to try out early.

Thanks for getting a fix out so quickly! How do I know whether to use the 6.0 or 5.1 ffmpeg? I am currently on using the combined/jellyfin_10.8.10.zip on Windows. I'm guessing it's 5.1 since the download page (https://repo.jellyfin.org/releases/server/windows/stable/) lists ffmpeg 5.1.x versions.


RE: HDR/DV tone mapping, very dark in this example - nyanmisaka - 2023-11-03

(2023-11-03, 03:24 AM)xilex Wrote:
(2023-10-25, 05:39 PM)nyanmisaka Wrote: It should be fixed in the next jellyfin-ffmpeg release.

6.0 https://github.com/jellyfin/jellyfin-ffmpeg/actions/runs/6644058402
5.1 https://github.com/jellyfin/jellyfin-ffmpeg/actions/runs/6644059210

Once these builds are complete, you can download them to try out early.

Thanks for getting a fix out so quickly! How do I know whether to use the 6.0 or 5.1 ffmpeg? I am currently on using the combined/jellyfin_10.8.10.zip on Windows. I'm guessing it's 5.1 since the download page (https://repo.jellyfin.org/releases/server/windows/stable/) lists ffmpeg 5.1.x versions.

Both 5.1 and 6.0 are supported in JF 10.8.10. Download and extract the 'windows-win64-portable' into your JF installation folder.


RE: HDR/DV tone mapping, very dark in this example - xilex - 2023-11-04

Thank you. Video looks beautiful now (using 6.x).

Is there any advantage to using the older ffmpeg over version 6?

[Image: SbdvyQe.png]


RE: HDR/DV tone mapping, very dark in this example - nyanmisaka - 2023-11-04

(2023-11-04, 02:29 AM)xilex Wrote: Thank you. Video looks beautiful now (using 6.x).

Is there any advantage to using the older ffmpeg over version 6?

[Image: SbdvyQe.png]

For NVIDIA users, with the enablement of the AV1 encoder in FFmpeg 6.0, a driver update is mandatory.
Therefore, we have not enabled FFmpeg 6.0 in JF 10.8.x for the time being but postponed it to JF 10.9.

Quote:NVENC headers are updated to meet the requirement of NVENC AV1 encoder, the minimum required NVIDIA driver versions have been changed to 520/522 series.