Backporting of features from Kodi 22 to NG branch? Is that in any way doable?

I’d be mainly interested in:

Having ffprobe (its library more likely) updated to a version that can differentiate between Dolby Digital Plus with Atmos and Dolby Digital Plus “vanilla”, DTS-X and DTS-X IMAX
[Estuary] Add mediaflags for new types of audio by thexai · Pull Request #26170 · xbmc/xbmc · GitHub + [Session] Set Atmos profile instead of JOC codec string by CastagnaIT · Pull Request #1745 · xbmc/inputstream.adaptive · GitHub (second link is just icons for default skin)
Update to ffmpeg 7.1 by sundermann · Pull Request #24972 · xbmc/xbmc · GitHub (and this is where the “magic happens” as far as I can tell)

The new functionality to have better scaling of thumbs and posters (Scale large texture to the actual display size by mxalbert1996 · Pull Request #25630 · xbmc/xbmc · GitHub).

I understand and accept that NG won’t be updated to CE22 but I’m wondering if some small (hopefully small, I haven’t got a clue) quality of life improvements could be ported over, as a last farewell to FEL supporting hardware.

I’d be ready to donate for the above to happen, if anybody is willing to try.
I am not sure of how Kodi uses ffmpeg, I know that for the command line programs the component needed is ffprobe. Which is what leads me to hope in a simpler implementation than “let’s port ffmpeg 7 to Kodi 21”. But maybe the two components are interlinked when one builds Kodi and they are not separated like ffmpeg and ffprobe are. I am 100% ignorant on this, don’t hate me.

2 Likes

they are all potentially doable, just depends on the amount of effort required…
I took a quick surface-level look at “better scaling” PR the other day, didn’t look that difficult, but it depends on some other changes that were done in v22 branch (texture-handling related), and those other changes can rely on yet another changes (and you end up in a change rabbit-hole).
So one needs to check first if they are critical to the ticket’s goal and if so also add them to the backport, if not - then those specific changes have to be reverted in a compatible manner. With ffmpeg-related stuff it’s trickier afair, as there are usually additional external patches for it in the CE base and also in CE/LE kodi/xbmc. There’s always a chance that desired PR commits might rely on the code that was added/changed for v22 and are not easily ‘transferable’ to v21. So for relatively small features/benefits you might have to spends stupid amount of time (though varies depending on your skill and expertise). I might try at some point when I have a few hours, but cannot dedicate more time and these specific features not being important for my use-case.

P.S. The safer route might be trying ffmpeg 6.1.1(2) (6.1.x added spatial codec detection, though might be missing the DTS-HR:X profile)
There is a chance that API-wise it might be more compatible with 6.0 that 7.x and will require less changes in unrelated-to-audio places of the kodi.

1 Like

:crazy_face:

I would be a bit more careful with such comments.
A software engineer take about €140,-/h.
Do perform such action I guess it will take about 4 weeks with each about 40h. So you can calc your donation by yourself. :joy:

Maybe also a good calculation for users what can’t understand why some items at CE do not happen because it’s a hobby in free time only…

2 Likes

Tried 6.1.1 ffmpeg, and as expected some hunks from CE patches were not compatible and I didn’t have time to check/fix the conflicts. There still might be one (and probably easier) way to do it with 6.0.1: ashlar from kodi forum has isolated patches for Atmos and DTS:X detection that from what I understood are directly compatible with 6.0, so might try that sometime next week.

UPDATE: couldn’t resist and made a quick test) spatial audio patches seem to apply without conflict, so only kodi+skin changes remain (and testing of course).

1 Like

I never intended what I wrote as a “I will pay for development of this”. I said I’d be willing to donate and I have done in the past, for Kodi, trying to support development as best as I could.

It is not a “job”. Obviously only people interested in the mentioned changes that would like to see them ported to CE21 would be interested (or maybe they just like the challenge and the idea of making some people happy, there’s good people around, everywhere in the world).

I understand your resources are limited, I specifically wrote that I accept your decision on the NG branch. To reply like this, in my opinion, seems just ill spirited and I don’t know what I have done to deserve it. And it’s not the first time.
Just sorry, 'cause I have an enormous amount of respect for what you devs do.

Thank you! I’m the ashlar that isolated patches on kodi forums. I’ve been waiting for this feature for more than a year now. Which is why it saddens me not to have it on NG branch.

As far as the new scaling stuff, I hope you’ll manage to find the time and that is not as hard as it could be (I understand that potentially it could ramificate forever, but they seemed to imply that it was using stuff already there… although it could be already there in 22 and not in 21).

Let me know if you need me to test anything or just get in touch with me on Kodi’s forums (since here private messaging seems disabled). I will try to assist in any way I can. Thanks again.

Private messaging is here not disabled, but due to forum security rules one needs to have a certain number (don’t know exact number :slight_smile: of posts before sending PM is enabled…

At 126 posts written I am surprised if that’s the case… I’ve been here for months… :-/

1 Like

Holy hell I’m really getting old… for all my time on this forum I’ve always missed the HUGE blue button with “Message” clearly written on it.

so… managed to get spatial audio detection working in v21 (reports proper codec names for DTS:X and Atmos profiles), added only variables to the skin (without images) for quick testing and it shows as empty space in media flags (as it cannot find the proper image for the codec) and player debug info shows correct codec names. It won’t detect the DTS:X for HRA, but afaik it’s not even part of the latest ffmpeg yet, but might be backportable if/when it becomes available.

2 Likes

while I’ve added the necessary codec flag images to the estuary and necessary vars, I can’t get the images for new dtsx and atmos codecs to show after update in estuary. Seems like the stock skin doesn’t fully update after on-top-installation or I missed some other place in the skin where it should be added… Though from what I understood images are not hardcoded/mapped in the skin, but are referenced dynamycally by %codec_name%.png, so It should have worked.
Anyways, it worked in the customized AZR skin (with additional flags added), so I could verify the functionality.

1 Like

So excited to see something moving in the right direction.
@chuckster you’re awesome!

After changing something skin related in kodi then you need to clean kodi-theme-Estuary package to be rebuild.

thanks! will try that. I clean the whole kodi package everytime I change anything there (compiles fast on my machine), so I assumed it will clean all other kodi-related packages.

Btw, after successful build I’ve checked the ‘build’ folder and while there is a kodi-theme-Estuary-1.0 folder, it’s empty. Is it supposed to be like that (e.g., files are moved from it during build process or smth)?

It never worked like that.

The purpose of kodi-theme-Estuary package is only to copy skin from kodi folder to image.

Without cleaning this package changes newer get in image.

1 Like

great, thanks a lot!

Worked this time, could now see the new tags in estuary.
Would this be of interest to you as a PR (a bit later after more testing) ?

1 Like

Maybe. Describe the required changes briefly so it can be discussed.

But better would be ti push in Kodi upstream.

1 Like

Those flags in default estuary, just a bad joke.
I see those new kodi “images” in CE no, the empty flag with the codec name, which is was not fit to the flag and currently truncated in both side, the font also bigger or smaller, than the other… pff…
And they cannot agree to the names of the flags…
Sadly the big skinners are gone from TK.