yeah that’s my discussion thread, opened it just so we could get some votes and discussion going from other members, as I find things can get lost in just the forum thread ![]()
Hi,
Would it possible to add an option to force Plex to do the tone mapping from HDR to SDR instead of Kodi? As the colors look washed out on Kodi, but look fine on Plex.
Hmm that would mean forcing the server to transcode, not direct play. Are you sure you want that?
There’s currently no option to force transcoding without for example disabling 4K or HEVC direct play in PM4K.
Edit: which kodi version are you using? Is this a known issue?
It is known that Kodi’s HDR → SDR conversion is not great.
You would need a client device capable of Dolby VS10 to get a much better tonemapping on device (without Plex transcoding). The cpm build of CoreElec handles this - which is what I use with PM4K. I use it for HDR → DV chroma upscaling, but many people use it for your purpose instead: DV/HDR → SDR tonemapping.
Zidoo and Dune devices also have a VS10 implementation, but CoreElec based devices are far superior.
It would help if you went a little bit more into detail here I think. I’m not sure everyone knows of the multitude of CE builds and device specifics, let alone VS10 ![]()
As @panni mentioned earlier, Plex server can only apply tonemapping (HDR → SDR) during transcoding, eg going from 4K → 1080p or 4K remux → 4K 20Mbps. This workaround involves disabling 4K or HEVC direct play in PM4K thereby forcing Plex server to transcode the stream and apply tonemapping onto the content.
However, tonemapping can also be done locally during playback on the client device without a transcode. The Plex windows desktop app, which uses the mpv.io player can tonemap HDR → SDR directly through the app. As @Virmin8 referenced, Kodi also has this capability in the convert HDR->SDR option. When the tonemapping happens on the device, the Plex server dashboard will still show Direct Play/Direct Stream as the server is not involved in any processing.
That said, you cannot force Plex media server to just apply tonemapping without transcoding the entire stream. There is no way @panni can code an option here to use server side tonemapping without the server transcoding the content directly (no direct play/stream). You’re limited to whatever tonemapping capability is on the playback client. Unfortunately in Kodi’s case, the default HDR->SDR tonemapping is quite poor.
Enter ‘VS10’. This is a delivered Dolby tonemapping engine that is enabled on only a few streaming devices as part of its Dolby Vision processing. The only commercial options available are specific Dune and Zidoo devices that have enabled VS10 and uses Dolby’s method to tonemap HDR/DV → SDR.
Fortunately, the open-source community has a much better implementation of VS10. There is a fork of CoreElec (a KodiOS) known as the ‘cpm version’ after its creator. This person enabled the VS10 engine in CoreElec and allows the same HDR/DV → SDR tonemapping within Kodi using the Dolby engine instead. This is far superior to Kodi’s own tonemapping and is preferred. The below thread contains the technical details if anyone is interested:
The menu options looks like this in Kodi if you were to use VS10 to tonemap, note that HDR/HDR10+/HDR HLG/Dolby Vision are set to ‘SDR’. The default Kodi option would be turned off:
This cpm-fork of CoreElec with the VS10 engine can be found here:
It should be installed over the 21.1.1 stable release of CoreElec/Kodi. There are guides to help you navigate this should you go down this route. But it will solve your issue of poor tonemapping in Kodi.
As an aside, most users are using VS10 for chroma upscaling instead. That is going the other way from SDR / HDR / HDR10+ → DV. I won’t digress too much from the OG question, but many users can find utility in VS10 as the HDR / HDR10+ tonemapping to DV is fantastic.
Does that mean that’s possible on a SHIELD with kodi, without CE?
No, it is only for CoreElec
CoreElec’s recent nightly has updated the default PlayerProcessInfo to show more content information. A user there (ty frodo19) graciously helped modify the file to display correctly in the Plextuary skin. Shown below:
If you are on the cpm fork of CoreElec. The information displayed will also include DV profiles including FEL vs MEL:
Any CE + PM4K users will find this modified Plextuary to be useful.
skin.plextuaryce.zip (5.2 MB)
skin.plextuary_cpm.zip (5.2 MB)
Activate by using Keymap Editor add-on and binding PlayerProcessInfo to a remote control key.
Thank you both for all the information. Looks like disabling HVEC in additional codec gets me the result I want. I am busy using coreELEC on an old Android TV as I wanted TRUE-HD Audio Passthrough. This device is connected to a 1440p monitor that is able to accept 4K signal only when HDR is enabled in the monitor settings. Unfortunately, HDR looks horrible on the monitor, so needed something to do the HDR to SDR conversion and I’ve noticed Plex does a pretty decent job. Will look into these other coreELEC builds that @MikeTeavee mentioned.
I forgot, now my 1080p Anime shows are also transcoding, so a toggle to transcode only when HDR files are detected would be awesome, otherwise I’ll just have to remember to toggle on/off HVEC
Hmm, I can provide that functionality. It would work only for HDR based files, so HDR10+, and DV with HDR base layers (not DV Profile 5). Disabling HDR for DV P5 would in this case not transcode (as Plex can’t map it to SDR).
This solution is far from ideal, though it doesn’t hurt PM4K to implement this (and it’s fairly easy).
Keep in mind that transcoding 4K is a heavy task for the PMS’s machine, if you’re not making use of a graphics card.
That would be awesome if you could implement this. I know it is far from ideal, but this solution would be the last issue that PM4K would resolve for me. Thanks for all you hard work on this Project, it has really helped resolving most issues I had with the official Plex app.
I’ve just got to say this again. What a champion we have in @panni. I’d remind everyone that there’s a way to show tangible appreciation described in the first post (I’m not on commission).
I’m not venturing into the DV world but it’s been an interesting read chaps.
0.8.0-beta3.4: script.plexmod.zip (2.8 MB)
Changes:
- Episodes: Fix rare bad pagination leftbound wraparound
- Episodes: Improve progress display for multi-episode video files
- Episodes: Always select episode even if the item was the same (might fix certain display issues after season watched)
- Libraries: Massive potential speedup (5-10x) for huge libraries (thousands of items); thanks @bowlingbeeg
- Shows/Episodes: Use separate thread for background music
- Player: DEBUG_LOG: Mask Plex token when logging subtitle path
- Player/PPI: Show verified LAN connection if we’re local (also for managed users), in Stream Info; drop generic “local” tag
- Video/MediaChoice: Fix default subtitle selection when switching between multiple media versions of the same item (rare)
- Core/Settings: Add option to disable HDR (HDR Fallback) DirectPlay and force transcoding; doesn’t apply to DV Profile 5
Details from @bowlingbeeg:
On slower devices if we have lots of items to create for the library it can take a long time. On the Zidoo Z9X it can take 15 seconds if the library has 4500 items. So this code divides that up and submits background threads to do the work. On the Z9x it takes only 2 seconds to do 4500 items with this change.
Note from me:
There’s currently an issue with some items not showing up in Libraries with UNPLAYED filter active and sorted by Title (less items shown than are actually there; only seems to happen if the library contains Collections). All other view modes seem unaffected. Could be a Plex API issue, investigating with them.
Thanks @panni. The new option works perfectly.
Thanks @panni
Great Update!
All is working fine on Ugoos AM6B+ with CPM’s latest Build on CE ![]()
![]()
Does the ‘Shuffle’ button on TV shows respect already played episodes?
I use it frequently and it seems like completed episodes are also included in the shuffle.
Not sure, I’ll check. Also not sure if it should do that by default.
In my mind it works like so. If there are unwatched episodes in the playlist, collection, or tv show - random will pick from the unwatched list.
If the entire list is watched, then it randomly picks an episode.


