Learning about Dolby Vision and CoreELEC development

https://github.com/erazortt/DoViBaker
with avisynth

Essentially my thinking was that would be a part of it.

Not that familiar with the details of the tool, but I think what that does would need to be stopped halfway through, after the reshaping + composing of the FEL layer, but before any tone-mapping / conversion to RGB. From there, add in the metadata to the pixels in the top rows, send the correct avi packet and vsif, and it should be good.

As above, I think it could be done.

But it would require someone that is familiar with the PC side of playing back video and controlling what avi and vsif packets are sent over the hdmi. I am not, and am happy playing with the CoreELEC side of things at the moment.

@OCEFDA Maybe you can find someone that knows / wants to work on the PC side of things? I’d be happy to help out wr.r.t. clarifying exactly what I have done as needed

The only player on PC that supports Dolby Vision is Energy Media Player, and I think its developer could help: https://bg.linkedin.com/in/ivan-dimitrov-448138203

2 Likes

Thanks. will try to find someone that is willing and able.

This is interesting.

Hopefully what he did could be ported to any other platform. From my side when I said PC I did not meant a physical/logical PC but was referencing to any non-DV enabled platform. I thought that was what @doppingkoala was also after and meant when he said PC - having a way to play DV material on any non-DV enabled platform?

The thought was more something that let madVR / MPC play all profiles of DV in tv-led mode.

It actually may not by that out of reach for tv-led FEL.

DoVi_Scripts MODE.S (7) can apparently already play FEL using MadVR+MPC in either HDR10 or SDR. Would need to cut this process halfway through, once the composing the layers is done - but before the mapping to HDR10 / SDR. Then embed the metadata.

MPC also a HDR “passthrough” mode, maybe this could be extended to passthrough the required vsif and set the avi packet as needed?

I’d like to test your version on my Odroid N2, but wander which version to use; I guess the 22 -no version. How it defers from 20.5 -ng Nexus version?

Either should work. Currently the -no version is slightly behind the -ng version. Differences are

  • -no is missing the HDR10+ conversion.
  • -no is missing the automatic adjustment of the L1 data based on the source min and max pq.

Also I get no passthrough audio with the -no version. Unrelated to the DV stuff, happens in the nightly it was based off.

It’s been an option in all my builds. The issue for someone else to test it now would be knowing what byte sequence to send (without going through the code).

Was more trying to gauge interest to see if it worth putting something together that can form the byte string based on DV metadata.

It would give the ability to be able to actually see how changing any of the metadata changes the image with the knowledge that the metadata passed in is exactly what is passed to the TV. Which does seem useful of itself …

Well, I tried with -no version without any success on my N2. Every DV test file I tried ended in N2 reboot. Some triggered Dolby Vision logo on my LG Oled, but only black screen showed following full reboot after a couple of seconds…
Will try -ng version. If I get similar outcome would you want, and which exactly, debug log to see what’s going on.
Btw, I did not find/see any DV settings on tried “22.0-P_devel_20240807212441” version.

Almost unbelievable, Dolby Vision plays on Odroid N2 :joy:

Installed Nexus 20.5-ng and updated with your latest -ng (devel_20240817133235) version (from this post) Made recommended initial settings, and after reboot → Dolby Vision videos play on my N2.

Did not have much time for detailed testing, but all my DV test files (about 12 of them, mix of P5, P7 and P8) played with proper DV colors on my LG C2.
Things observed after brief testing:

  • as you mentioned, OSD is brighter, following DV TV settings.
  • you mentioned that P5 videos play with wrong colors, but my several P5 videos are displayed with proper colors, only colors of OSD, when it’s displayed, are in wrong colors.

Did not yet test any movie using subtitles, but expect them to be very bright, which I can fix with color/transparency settings…

Update to the -no version


Changes: Brings in line with -ng version. Adds L1 adjustment and HDR10+ conversion.

Initial once-off setup:
Set kodi to use a 3840 x 2160 gui resolution. Enable the option “Disable GUI scaling”. Set refresh rate to 25 fps (or any other refresh rate that is different to your HDR10+ files - ensures correct colors when stopping HDR10+ converted files). Reboot.

Nothing has been added to the GUI.


Based off what someone else had, I have a suspicion what is causing this, but the troubleshooting didn’t get finished. Repeatable enter

cat /sys/class/amcanvas/canvas_pool_map

until the canvas numbers start repeating. Post all of the outputs, so I can check if it is the problem I suspect.

Would only be correct if it had no reshaping. I couldn’t find any P5 content without reshaping. Closest I could find is the glassblowing samples that only have linear reshaping on the chroma channels.

If it really does look the same, put up a link to that sample.


The gui HDR luminance setting actually seems to be working.

I’ll be away for some time, and will not be able to test -no version again. When I get back I’ll do it, if it’s not resolved by then.

I used these 2 files: L8 100nits trim test P5 DV.mp4 and
L8 100nits Trims P5 4-steps TEST (881 nits)

Some other test files can be found here, link

Yeah this looks like older versions of the P5 test files I did when I didn’t know that dovi_tool.exe generated P5 without reshaping metadata. I added profile 5 encoding support in dovi_scripts with the official DEE and replaced all the P5 test files a couple months ago.

It doesn’t change anything for the rpu response test but p5 without reshaping metadata is technically wrong.

Can you explain how you got to this point - did you use a ng-arm-20 nightly and then install the update you linked to? I’m assuming no need for any additional files like a dovi.ko?

Are there any config changes you need to make in CE? (4:2:2 12-bit forced output I’ve read - anything else?)

If using the -ng version I guess start from any-ng version of CoreELEC before updating?

Honestly not really sure if versions of anything need to match beyond that - I haven’t tried.