Hi @doppingkoala. Is this thread about enabling DV on non-DV media players?
Yes, is amazing what he’s trying to achieve. Can you help in testing with above instructions please, thanks.
@doppingkoala I’m now getting permission denied on write injected_values with p5 & all dv files. It goes automatically in dv but black screen. Strange because i could swear this permission denied wasn’t the case earlier. Any ideas, thanks.
I noticed your test image is using the 4.9 CoreELEC kernel
Same as cpm test build.
Iam thinking if testing on Hk1x4 S905X4.
However i have doubts
This is why
I took a chance with Kinhank G1 on cpm build because i had 2 if the 3 ingredients for Dolby Vision Playback
1 dovi.ko in vender kernel
2 SoC Dolby Vision compatible
What was missing was 3 Dolby blob in Device tree
This is why failed.
Your build is missing all 3
1 No dovi.ko in vender kernel
2No SoC Dolby Vision compatible
3No Device tree
How can these echo commands do anything?
Or you are manipulating the GUI ?
Not taking away from anything you have worked on
Just trying to understand if it is even possible
Yes. Looking like everything aside from dual layer should work properly.
Not quite there yet, but the latest build I posted is a very important step and should let any device put a tv into tv-led DV mode. Essentially, all that remains to do for proper usage is to get access to DV metadata in the right place in the code.
Have a go, shouldn’t matter what your device is. There is not dependence only any existing amlogic DV code, dovi.ko, soc compatibility, or dolby blobs in a device tree.
Because I added them in…
More seriously, I am technically manipulating the gui, but only to embed some metadata in pixels in the top few rows - aside from this the actual video stream is untouched.
Essentially, in tv-led mode all that a source device does is take the DV metadata and use this to modify some bits in the top pixels, signal to the TV to look for this metadata, and then let the TV do all the real work. The exception is dual layer support where the source device also needs to compose the two layers - my current work doesn’t address that at all.
Only needing to embed the metadata is why only tv-led mode will work on unsupported devices and not player-led mode, not because it is better (which it is), but because all that really needs to be done is embed the metadata. Using the patents and confirmed with the captures of the DV “tunnel”, what metadata to embed has been worked out. The breakthrough in the recent builds I’ve posted is how to embed that metadata in CoreELEC.
edit: if you boot it up, play a video and just run
echo Y > /sys/module/amvideo/parameters/inject_osd_metadata
you can actually see the metadata in the top pixels yourself.
Thank you for reply
Explanation
I really like your response about echo commands!!!
It is a busy night in my area.
House of Dragons New Season episode.
Also busy week at work coming up.
I noticed from OP you are using S905X3 B revision.
I have Tanix-tx5 Plus Deluxe S905X3 iam going to use instead of HK1X4 S905X4
Check for typo’s (it is injected_value
not injected_values
) / just use to copy button in the top right corner of the snippet windows with the commands. I just ran through them all and the commands are correct in my post. There is no link to the type of file that is playing.
Your tv might be more sensitive then mine to bad signals. Try doing the disable and enable commands between trying different values.
Also try adding
echo Y > /sys/module/am_vecm/parameters/always_send_tvled_DV_vsif
to the enable commands and
echo N > /sys/module/am_vecm/parameters/always_send_tvled_DV_vsif
to the disable commands.
@xmlcom Was your photo in Learning about Dolby Vision and CoreELEC development - #250 by xmlcom actually in DV mode of your TV?
I’m starting to look at some code in the kodi/xbmc repo.
Does anyone know if there any easy way to modify variables in that part of the code over ssh at runtime? I was after something similar to the module params that I have been using in the linux code.
It’s alive !!! - DV working for non licenced devices
Since my previous update, I’ve now managed to get metadata to be read from a playing file to use in the fly.
Only L1 metadata at the moment is taken from the playing file. But now the data is passing through getting all the other metadata is straightforward.
Setup: Get the on-the-fly metadata working as detailed in Learning about Dolby Vision and CoreELEC development - #249 by doppingkoala.
Usage: After the setup, play a DV file and enter the following commands (use the copy button).
For P5 content:
echo 0,0,0,0,82,0,0,32,0,3,31,6,145,32,0,252,91,4,67,32,0,1,11,234,87,0,0,0,0,8,0,0,0,8,0,0,0,66,185,254,163,254,163,254,163,66,185,254,163,254,163,254,163,66,185,255,255,0,0,0,0,0,0,0,0,12,2,1,1,0,62,11,134,0,42,1,0,0,0,6,1,0,20,0,50,0,35,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,189,151,135,54 > /sys/module/amvideo/parameters/metadata_buffer
echo 0,0,0,0,82,0,0,32,0,3,31,6,145,32,0,252,91,4,67,32,0,1,11,234,87,0,0,0,0,8,0,0,0,8,0,0,0,66,185,254,163,254,163,254,163,66,185,254,163,254,163,254,163,66,185,255,255,0,0,0,0,0,0,0,0,12,2,1,1,0,62,11,134,0,42,1,0,0,0,6,1,5,220,13,172,11,184,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,116,190,2,153 > /sys/module/amvideo/parameters/metadata_buffer2
echo Y > /sys/module/amvideo/parameters/update_crc
echo 5 > /sys/module/amvideo/parameters/steps_to_try
echo 0 > /sys/module/amvideo/parameters/num_frames_to_toggle_metadata
echo Y > /sys/module/amvideo/parameters/get_aux_data_from_provider
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
For profile 8:
echo 0,0,0,0,82,0,0,37,102,0,0,53,234,37,102,249,252,235,28,37,102,68,202,0,0,1,0,0,0,8,0,0,0,8,0,0,0,28,54,34,67,1,134,14,70,48,142,5,20,0,0,1,166,62,90,255,255,0,0,0,0,0,0,0,0,12,0,1,0,0,62,11,134,42,42,1,0,0,0,6,1,0,20,0,50,0,35,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,120,97,107 > /sys/module/amvideo/parameters/metadata_buffer
echo 0,0,0,0,82,0,0,37,102,0,0,53,234,37,102,249,252,235,28,37,102,68,202,0,0,1,0,0,0,8,0,0,0,8,0,0,0,28,54,34,67,1,134,14,70,48,142,5,20,0,0,1,166,62,90,255,255,0,0,0,0,0,0,0,0,12,0,1,0,0,62,11,134,42,42,1,0,0,0,6,1,5,220,13,172,11,184,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,194,81,228,196 > /sys/module/amvideo/parameters/metadata_buffer2
echo Y > /sys/module/amvideo/parameters/update_crc
echo 5 > /sys/module/amvideo/parameters/steps_to_try
echo 0 > /sys/module/amvideo/parameters/num_frames_to_toggle_metadata
echo Y > /sys/module/amvideo/parameters/get_aux_data_from_provider
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
Test files: Any DV file should work, but L1 demos from Level 1 – Google Drive are great demos of seeing the dynamic response.
Color space and L1 should be correct. No other DV metadata would be so don’t expect the output to look exactly as it should at this stage.
The build:
Appreciate anyone that can to test it out and let me know how it goes for others.
Amazing! Getting DV in P5/P8 files on my Beelink GS king-X, Take my hats off to you mate, truly Genius indeed.
However still finding it difficult on non DV files with the injected_value write, but will persist till i get it working.
Thanks again.
If P5/P8 files are working and putting your tv into DV mode, the value for injected_value
is correct.
After you have a DV file working, try on a non DV file:
echo 0,0,0,0,82,0,0,37,102,0,0,53,234,37,102,249,252,235,28,37,102,68,202,0,0,1,0,0,0,8,0,0,0,8,0,0,0,28,54,34,67,1,134,14,70,48,142,5,20,0,0,1,166,62,90,255,255,0,0,0,0,0,0,0,0,12,0,1,0,0,62,11,134,42,42,1,0,0,0,6,1,0,20,0,50,0,35,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,120,97,107 > /sys/module/amvideo/parameters/metadata_buffer
echo 0,0,0,0,82,0,0,37,102,0,0,53,234,37,102,249,252,235,28,37,102,68,202,0,0,1,0,0,0,8,0,0,0,8,0,0,0,28,54,34,67,1,134,14,70,48,142,5,20,0,0,1,166,62,90,255,255,0,0,0,0,0,0,0,0,12,0,1,0,0,62,11,134,42,42,1,0,0,0,6,1,5,220,13,172,11,184,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,194,81,228,196 > /sys/module/amvideo/parameters/metadata_buffer2
echo N > /sys/module/amvideo/parameters/update_crc
echo 0 > /sys/module/amvideo/parameters/steps_to_try
echo 125 > /sys/module/amvideo/parameters/num_frames_to_toggle_metadata
echo N > /sys/module/amvideo/parameters/get_aux_data_from_provider
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
Yep, That works also .
Issues to Note: gui wrong colour fix not working with below Cmd. And sometimes when stop play you get blank screen with DV still activated & must reboot to fix it all.
echo N > /sys/module/am_vecm/parameters/DV_vsif_send_in_hdmi_packet
echo DV_disable_vsif > /sys/devices/virtual/amhdmitx/amhdmitx0/attr
So my value is 1 like yours on a beelink gs king-x, right?
If you didn’t change it since the last boot, yes.
Ahh yes, you will need a different disable command to match the updated enable command for you
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
So with these results, it appears that your tv needs the vsif to be sent constantly to enable DV. This is something that wasn’t needed on my tv. Looking at the original amlogic dv code, the vsif is sent all the time. I’ll just change my code to always send the packet.
Thanks, why is my tv (lg c6) need vsif sent all time & how do i check myself? Thanks.
Is your next step to work on L2 L8… etc.
I’m still in awe how you did this or even came up with the idea of this, incredible indeed.
I have been away from the thread too long. Exciting progress! On my x96 max with Philips 808, p5 and P8 are working.
Not sure what injected value and playing non hdr videos are about. I’ll try to read back.
Tv froze once when I entered P8 commands for p5 file.
Could be because the tv supports an older version of tv-led DV. Could something specific to that model. No real idea.
You can check by playing with /sys/module/am_vecm/parameters/always_send_tvled_DV_vsif
. TV-led mode has only worked for you when enabled and you have needed it to be disabled to exit dv mode.
If DV s working don’t bother with the injected_value
stuff. Most of it was more a troubleshooting with xmlcom, but that issue appears to have been vsif related.
Not sure what to make of that, I have no problems with that (aside from the obviously wrong colors). The tv doesn’t / can’t even actually know what the profile of the actual file was anyway - all it gets is what is sent in the metadata.
probably tv issue. I was entering commands a bit too quickly I guess.
The part of the metadata relating to the colorspace (i.e., p5 vs p8) is actually meant to be static metadata. My tv seems to be fine having this changed on the fly without disabling and reenabling DV, maybe not all are as tolerant.
@DMDreview Could you please upload a capture of the DV tunnel when playing a CMv4.0 file please? All the others are CMv2.9 and I need it to tell me how to write the metadata
edit: no need, I didn’t check all your captures. One of them is CMv4.0.