ah, do you have a link to the flag?
I am not a coder unfortunately, otherwise I would dive in even more.
From a high level, the bug is traced to the below log, same file/Plex URL, but bitrate is set incorrectly when the URL is directly opened:
PKC - This works. CE sets 8-bit.
info <general>: PLEX.playback_decision: The playurl for DirectPlay is: https://192-168-50-60.3519aa45431e49a1946399da99cd65ef.plex.direct:32400/library/parts/464/1694634547/?Accept=%2A%2F%2A&Content-Type=application%2Fx-www-form-urlencoded&Accept-Language=hu&X-Plex-Device=Linux&X-Plex-Model=4.9.269&X-Plex-Device-Name=Kodi+CoreELEC&X-Plex-Platform=Generic&X-Plex-Platform-Version=1.0.0&X-Plex-Product=PlexKodiConnect&X-Plex-Version=3.9.0&X-Plex-Client-Identifier=a8f8926f-a26f-4a74-a2ef-a7adc30e7492&X-Plex-Provides=client%2Ccontroller%2Cplayer%2Cpubsub-player&X-Plex-Protocol=1.0&Cache-Control=no-cache&X-Plex-Token=XXXXXXXXXXXXXXXXXX
info <general>: VideoPlayer::OpenFile: plugin://plugin.video.plexkodiconnect.movies/?mode=play&plex_id=475&plex_type=movie&filename=Anna.mkv
and
PM4K - CE sets incorrect bitrate to 12-bit
2024-04-02 11:27:52.731 T:3777 info <general>: VideoPlayer::OpenFile: https://192-168-50-60.3519aa45431e49a1946399da99cd65ef.plex.direct:32400/library/parts/464/1694634547/?X-Plex-Token=XXXXXXXXXXX&X-Plex-Client-Profile-Name=Generic&X-Plex-Client-Identifier=13efcf13-722b-464f-a491-93652706d317
Is this detail enough, or are you looking for more specific information to the trigger? I’m happy to research this more if someone can point me to the right direction as I think it’s quite impactful.
Just search for it, there’s only 1240+ posts
Before anyone asks: yes, we’ve tried adapting the other parameters appended to the playback URL PKC uses, to PM4K, to no avail.
This also happens with smb sources fed into xbmc.Player().
@cpm also did some initial research into this 12-bit bug, the findings are here, hopefully we can get a conversation going:
That’s the ultimate goal. We welcome all the help.
Awesome, thank you so much.
@PurplePlayer one more question, it still shows the Pixel Format as 8-bit, RGB.
Is this true or just erroneous information in this window?
Your clip works fine on my LG E8 - I use CE21 Nightly - played tv-led from SMB (all standard setting) played direct from File Manger using 1GB ethernet through three switches from a standard QNAP QTS setup.
See correct 8bit RGB for the connection which goes through a SONY HT-A9 to arc port 3 on the TV. Basic HDMI cable (I think came with the Ugoos or SONY) from Ugoos to SONY and 10M optical based HDMI from SONY to TV.
As mentioned would be worth your while to try direct to TV and with other cables, to rule that out.
Have recently setup Jellyfin and using JellyCon from Kodi (want to keep Kodi side lightweight) - looks a little snappier than SMB - had no issues and always got 8bit RGB for tv-led (so far - been a couple of weeks).
Thats correct for tv-led
The video data is structured like 12bit YUV422 (though in practice in a different colour space) but labeled for the HDMI transmission as “8bit RGB” - referred to as tunnelling for tv-led Dolby Vision.
Both 12bit YUV422 and 8bit RGB structures equate to exactly the same bandwidth requirements.
The reason behind it was something to do with HDMI 1.4b standard but the link explaining escapes me at the moment.
TV-led DV is actually like the oldest HDR format proceeding even HDR10, iirc. To be as backwards compatible as much as possible with legacy equipment: 4K 8-bit RGB @ 24/30Hz was the maximum that HDMI 1.4:could handle. It’s the same bandwidth as 4:2:2 YUV 12-bit. But HDMI 1.4 can’t handle that spec and therefore it gets tunneled in the 8-bit RGB signal.
Not that it really matters: but the BT.709 flag setting is a deliberate setting from the code - based on the underlying HDMI standards it is falling back to BT.709 because of the resolution, when BT.2020nc is not explicitly set.
Technically the code can be changed to force the flag to be empty or “default” (I did this for my curiosity) and found it to looks the same as BT.709
Testing from @R3S3T_9999 (thank you) though pretty much puts this to rest for modern TV DV implementations - the environment controlled capture and analysis of the resulting image shows the same result regardless the flag setting.
Only differences observed I know are: on my LG E8 - where I prefer BT.2020nc over BT.709 and on @ragico’s Panasonic where the preferences was for BT.709.
The conclusion is this flag is very likely irrelevant for most people, but some older generation TV pick it up somewhere in the processing and it has a subtle change to the image.
This is why I added the parameter so we can switch back and forth
I agree BT.2020nc feels the more appropriate given the WCG even if no visible difference.
Note that a 8-bit 444 RGB tunnel is not the only form of TV-led DV. It can also be done using a standard 4:2:2 YUV 12-bit signal on (apparently not all) hdmi 2.1 devices. In the form the metadata looks like it is sent the same way as hdr10+ using standard hdmi extended metadata packets (EMP), just with the dv specific data.
You can check if your setup supports this mode by seeing DV_YCbCr_422_12BIT
under the supported modes of cat /sys/class/amhdmitx/amhdmitx0/dv_cap
.
Would be really interesting if anyone actually has this mode working. The structure of data packets looks very similar to what is embedded inside the rgb tunnel which is known. Given all the EMP transmission code looks like it lives in the open source amlogic side (should allow all the packets to be captured/saved from a device) and the similarity to the signalling of hdr10+,it would be interesting to see if this mode could be made to work without using the dovi.ko or a supported soc.
Enable Kodi debug logging include the video component.
Restart kodi and play one file plugin://
. Play for 5-10s, stop and backup kodi.log
like by cat /storage/.kodi/temp/kodi.log | paste
.
Restart Kodi and make same with http
link.
Post both kodi logs.
I tried 21 nightly and player led and solved the problem.
Great - It should also work tv-led (i.e. deselect the “Use Player Led”), can ping back if still have issues with that.
Oddly this is what I ended up with, maybe someone could explain why:
My True Romance UHD remux that I did from my Arrow UHD BD, done with MakeMKV:
- CE20 TV Led just played with a blank screen but you could hear sound
- Changed to Player Led and it played with green picture and no sound
- Updated to CE21 nightly and enabled Player Led and then it seemed to work completely fine, colours looked right and sound worked
- Downgraded back to CE20 and it still worked regardless of which mode I chose
- Tried another file and same problem with no picture of green picture
Also for some reason the ability to switch between and player and tv led has vanished so I don’t actually know whether it’s enabled or disabled anymore (doesn’t matter which skin I try):
Otherwise with CE21 nightly it seems everything I try now works perfectly so I can only offer my thanks to everyone involved in getting this working!
My Panasonic LZ1500 shows BT709 also with Firestick 4k Max 2023. Only ATV 4k 2022 and Sony X800m2 shows no flag at all.
You know a way to show no flag also in Ugoos/CE21?
Thanks.
Weirdly today every file I try works regardless of whether player led is enabled or not.