Jump to content

Tone Mapping?


Recommended Posts

chrisrobbins1970
Posted

How would I know when and when not to use tone mapping ?

image.png.7ab2d2858a5802f9f7cfa17c2fa7da3c.png

Posted

When you have HDR content that needs to be converted for any reason.  The only reason to disable those is if you are having a problem with them (like the machine doesn't have enough grunt to do it).

  • Agree 1
chrisrobbins1970
Posted

So for the Synology DS1520+... which is better software/hardware tone mapping?

Lessaj
Posted

It has an Intel CPU with QuickSync right? If so, hardware.

  • Agree 1
  • 3 weeks later...
sh0rty
Posted

@ebr @softworkzwanna hop into this thread simply because I do not want to open an extra one for that sind it surely has been asked before but I cannot find it. Last time I used that feature is a long time ago and a lot improved since then.

One questions that came to my mind regarding tone mapping:

Is there a mechanism for Emby server to determine when to use tone mapping on a file? Or is there no one except from another trigger that triggers transcoding in general? Example: I have a 4K HDR stream. When I play it with Theater (default settings) connected to a 1080p non HDR monitor via HDMI or DP, there is no tone mapping because Theater direct plays the file, even it's 4K. If I lower max bitrate in App settings to 1080p 60Mbit, video gets transcoded and tonemapped. It would be nice if tonemapping would get triggered without have to force transcode the video. E.g. with a checkbox in app settings to tell the server that every HDR stream needs to be tone mapped or something like this.

Or am I just not smart enough to find a setting for the above desired behaviour? Is this even possible?

 

Thanks guys!

rbjtech
Posted

I have exactly the same issue on one of my clients - it's a 4K HDR capable player (it's an Amazon Cube) but it's attached to a 1080p SDR TV.    Thus it direct plays 4K just fine - but does not tone map as you say, so I need to force it by limiting the bitrate on the client below the 'norm' for 4K.    Not ideal.      I've tried setting the Amazon Cube 'display' to 1080p non-HDR, but it doesn't appear to make any difference to emby, it still sees it as a 4K capable device.

Maybe emby needs to read the 'display settings' on the device as opposed to the 'full capabilities' on the device - I'm not seven sure if that is possible ?

  • Like 1
Spaceboy
Posted

had exactly the same issue with a 4K but SDR tv and a shield and saw the same results. it didnt really seem to go anywhere, for the reasons that @rbjtechsuggests i believe, and i eventually replaced the tv

  • Like 2
Lessaj
Posted

At least for Emby theater the built in MPV player will handle the tone mapping, albeit not quite as well as setting up MPV as an external player with your own custom flags, so in that case it wouldn't require transcoding - I'm not sure if the android player does that but I don't believe it does. However if the display resolution is less than 4k I don't believe that it should be auto selecting the 4k version whether the player can handle the tone mapping or not. I see this in the web client as well, I don't have a 4k HDR display attached to my computer but it will still pick that version.

  • Like 1
Posted

When a client indicates support for 10bit and HDR, then we assume that it handles tone mapping at the client side.

When transcoding, it's always to H.264, which cannot convey HDR/10bit. That's the reason why we are always doing server-side tone mapping when it's enabled and when transcoding needs to be done.

If you are seeing cases in clients where the content is directplaying or being just remuxed (like output is HEVC) and the player doesn't do proper tone mapping, then we need to adjust the client's profile to indicate that it doesn't support tone mapping, so that the server knows that it needs to transcode(with tone mapping), even when you don't reduce quality to enforce transcoding.

 

  • Agree 1
rbjtech
Posted
49 minutes ago, softworkz said:

If you are seeing cases in clients where the content is directplaying or being just remuxed (like output is HEVC) and the player doesn't do proper tone mapping, then we need to adjust the client's profile to indicate that it doesn't support tone mapping, so that the server knows that it needs to transcode(with tone mapping), even when you don't reduce quality to enforce transcoding.

 

Yes, this is what we are reporting.   Even though I have correctly set the 'display' in the client to match the actual TV capabilities (1080p/Non-HDR/8Bit in mycase) emby is still 'Direct Playing' a 4K HDR/DV.   The scaling doesn't seem to be an issue, it's the tonemapping that is the problem. 

Thanks !

  • Like 1
Posted
13 minutes ago, rbjtech said:

Yes, this is what we are reporting.   Even though I have correctly set the 'display' in the client to match the actual TV capabilities (1080p/Non-HDR/8Bit in mycase) emby is still 'Direct Playing' a 4K HDR/DV.   The scaling doesn't seem to be an issue, it's the tonemapping that is the problem. 

Thanks !

Which client?

sh0rty
Posted (edited)
6 hours ago, softworkz said:

Which client?

Emby Theater latest on the same machine as Emby Server latest stable. Techspecs are in my signature. PC is connected to 3 1080p non-HDR displays from Acer (2xDP, 1x HDMI).

Like I initially said, I guess a simple setting or checkbox in the client additionally to the auto mechanisms in Emby, no matter if it's Theater, Android etc., that tells the server "hey my connected display is not HDR capable", so that the server transcodes in any case with tonemapping would be awesome.

Edited by shorty1483
Posted
14 hours ago, rbjtech said:

FireTV Cube running Emby for FireTV (2.1.14a) - 2nd Gen (not the latest one).

The TV app has never been adjusted for video range support.

Posted

Hmm, seems like we got a logical hole in this regard.

It's a bit more difficult than the usual player capabilities, because it's not sufficient to check whether the player can decode 10bit HEVC. We also need to check whether the display supports HDR and whether the current display mode (HDMI connection) is set to HDR, and if the latter is not fulfilled, we need to know whether the player can do (and is set up to do) tone mapping. If none of the former is true, then the server must transcode with tone mapping.

 

  • Agree 3
Posted
17 hours ago, shorty1483 said:

Emby Theater latest on the same machine as Emby Server latest stable. Techspecs are in my signature. PC is connected to 3 1080p non-HDR displays from Acer (2xDP, 1x HDMI).

Like I initially said, I guess a simple setting or checkbox in the client additionally to the auto mechanisms in Emby, no matter if it's Theater, Android etc., that tells the server "hey my connected display is not HDR capable", so that the server transcodes in any case with tonemapping would be awesome.

If you choose gpuNext for the VO setting of the player, doesn't the player do the tone mapping then?

Posted
18 hours ago, shorty1483 said:

I guess a simple setting or checkbox in the client additionally to the auto mechanisms in Emby, no matter if it's Theater, Android etc., that tells the server "hey my connected display is not HDR capable", so that the server transcodes in any case with tonemapping would be awesome.

Something in that direction might make sense, but we also need to be careful not to create contradictive options. The new (Theater) Windows app for example knows the capabilities of each connected display (spoiler 1), knows on which display it is currently being shown (spoiler 2) and can even control HDR mode for that display (spoiler 3). 🙂 

We should also be able to predict and control the player's behavior regarding tone mapping, which means in turn that fully automatic handling should be doable there.

For browser playback though, we'll need to see because support for HEVC High10 profile doesn't necessarily mean that tone mapping will be done in all cases. I think Windows performs tone mapping on SDR screens, but only if the desktop mode is HDR, which in turn requires at least one display to support HDR mode, but otherwise it's up to the browser. 

  • Like 2
sh0rty
Posted
16 hours ago, softworkz said:

If you choose gpuNext for the VO setting of the player, doesn't the player do the tone mapping then?

No, gpu-next setting doesn't make any difference. File direct plays also in this mode.

Posted
1 hour ago, shorty1483 said:

No, gpu-next setting doesn't make any difference. File direct plays also in this mode.

Yes of course, but doesn't it do client-side tone mapping in that case?

sh0rty
Posted (edited)
2 hours ago, softworkz said:

Yes of course, but doesn't it do client-side tone mapping in that case?

You tell me. 🤣 Not really familiar with the differences. What I can say is, that the picture looks different between gpu-next and auto.

Force transcoding with Reinhardt Tonemapping and video output set to gpu-next in Theater:image.png.7a1b0ecf74c3bab4f31ceb6785c1a389.png

Direct play with video output set to gpu-next in Theater:
image.png.b09c2b7982bae32bb7ff120bb69da0ae.png

Direct play with video output set to Auto in Theater:
 image.png.5b7e8a229469595c417ab29d638d34b4.png

Edited by shorty1483
Posted

This appears to me as if all of them would be tone-mapped, because non-tonemapped would normally  rather have less contrast than the Reinhhardt tone mapping.

Let's maybe use some commonly known video like "sony food fizzle 4kmedia" (google). Unfortunately, tone mapping is not something like a defined and predictive procedure. For the mentioned video, here's a comparison:

image.thumb.png.141bd249eaf2f15e22d980c30fee684a.png

 

Left top and center bottom: Not tone mapped (classic windows media player and MPC HC)

Center top and right bottom: tone mapped in two different ways (VLC and MPV)

Right top: Probably bug, causing over-exposure (Windows Media Player)

sh0rty
Posted
On 6/2/2024 at 1:00 PM, softworkz said:

This appears to me as if all of them would be tone-mapped, because non-tonemapped would normally  rather have less contrast than the Reinhhardt tone mapping.

Let's maybe use some commonly known video like "sony food fizzle 4kmedia" (google). Unfortunately, tone mapping is not something like a defined and predictive procedure. For the mentioned video, here's a comparison:

 

Left top and center bottom: Not tone mapped (classic windows media player and MPC HC)

Center top and right bottom: tone mapped in two different ways (VLC and MPV)

Right top: Probably bug, causing over-exposure (Windows Media Player)

Is there any client log in Theater where I could check out whats going on the client end?

Posted
3 minutes ago, shorty1483 said:

Is there any client log in Theater where I could check out whats going on the client end?

No, but the new Emby Theater Windows will have client-side logs.

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...