Update:
All metadata levels working for cmv2.9 and cmv4.0.
This also includes the level 5 metadata that doesn’t appear to be used by other players in tv-led mode. Sending the level 5 data avoids the problems with L2 positive lift. It will also chop off any gui elements that happen to be showing though - may later try to make the L5 data automatically adaptive based on if the gui has been recently updated / subtitles are showing.
Problems:
-
Content that has reshaping. Won’t play correctly as this work is only adding the metadata. The reshaping would require actually altering the video stream and isn’t something that could be fixed by sending different metadata. From my a few samples I have looked at, it seems this won’t impact P7 (no FEL) or P8 content. But I does mean that some P5 content won’t work correctly.
-
Higher bitrate files. I’m getting flickers on my video with higher bitrate files with a 4K gui and a 12-bit 4:2:2 output. Seems entirely unrelated to DV. I have seen mentions of problems relating to a 4K giu being blamed on device hardware limitations. That said a 4K gui with a 12-bit 4:4:4 output works fine for me for higher bitrate files, so I can’t wrap my head around it being a hardware limitation.
The build:
Usage:
Initial once-off setup: Set kodi to use 12-bit 422 with a 3840 x 2160 gui resolution. Enable the option “Disable GUI scaling”. Reboot.
Use:
To use trigger DV with a video (any video, doesn’t need to be DV) playing by
echo Y > /sys/module/amvideo/parameters/inject_osd_metadata
echo Y > /sys/module/am_vecm/parameters/DV_vsif_send_in_hdmi_packet
echo Y > /sys/module/am_vecm/parameters/always_send_tvled_DV_vsif
echo DV_enable > /sys/devices/virtual/amhdmitx/amhdmitx0/attr
If the file playing is a DV file that metadata will be used. If not, metadata from a P5 file will be used and the brightness will alternate.
To disable
echo N > /sys/module/amvideo/parameters/inject_osd_metadata
echo N > /sys/module/am_vecm/parameters/DV_vsif_send_in_hdmi_packet
echo N > /sys/module/am_vecm/parameters/always_send_tvled_DV_vsif
echo DV_disable_vsif > /sys/devices/virtual/amhdmitx/amhdmitx0/attr