Closed MauriceW67 closed 1 year ago
@glennguy @CastagnaIT Any chance of one of you taking a look and see what's causing this? :)
atm im busy with the rework
but on hdr log i see a lot of DEMUX_SPECIALID_STREAMCHANGE
im not sure if its correct where on the non-hdr log there are no,
when DEMUX_SPECIALID_STREAMCHANGE event happens may cause a delays in kodi because reinitialize a lot of things
could be useful to know if the problem happens also on Kodi 19 and 20.
@Varstahl not related to this problem but i noticed in the amazon manifest (20mb of manifest they are crazy?)
there are under AdaptationSet
tag, SegmentDurations
tag
can you provide me some info about SegmentDurations
tag? its a custom your addon implementation or its an untouched amazon manifest?
i ask because i workin on ISAdaptive rework and i was going to delete this support since i havent found SegmentDurations
tag specs around the web
same for codecPrivateData
attribute on Representation
tag
@CastagnaIT I did not check on Kodi 19, but on Kodi 20.1 the same issue occurs. I will try to get a log of that one as well.
@CastagnaIT I created a log with Kodi Nexus 20.1 and ISA 20.3.5. It was too big so I split it into two:
https://paste.kodi.tv/ukavuriyif.kodi https://paste.kodi.tv/efiditurac.kodi
Same choppiness of the video. Same DEMUX_SPECIALID_STREAMCHANGE log entries as Kodi Omega.
(The log is from a Kodinerds 20.1 build from Maven, but that should not matter for this case)
I can confirm the same behaviour, with HDR disabled it does not happen. Other thing I've noticed is that Kodi set the TV ouput for "The Boys" content at 4K/60Hz. Not that it has anything to do with this issue, but for any other content Kodi sets my TV output to 24 or 50Hz. My device is a Fire TV 4K Max.
@MauriceW67 can you provide a new log? all logs has been wiped out due to kodi website data breach
@CastagnaIT I updated the opening post with new log links.
I had to split the HDR10 log, because it seems Kodi's paste size limit has decreased from what it was before.
i have prepared a modified version in the hope to have more log details please install it and provide a new log for hdr
i dont know what version you use aarch64? inputstream.adaptive-android-aarch64-omega-95058ea.zip inputstream.adaptive-android-armv7-omega-95058ea.zip
you can drag n drop the new log file directly when you write the message here, so you can avoid pastebin
@CastagnaIT I use 64-bit on the Shield Pro 2019.
But with your test version Kodi immediately exits without any message. Went back to the release version 21.1.0 and the video plays again (with chopping).
Log file from crashed Kodi is attached.
i will need to get an amazon account to investigate first on "exits" crash problem after that we will try again understand this
@CastagnaIT One place to look is to check here if this condition is returning true: https://github.com/xbmc/inputstream.adaptive/blob/27ffa26a21859924049b8df698319440ac41ae98/src/samplereader/FragmentedSampleReader.cpp#L230-L237
This flows through to the session and sets the flag that the stream has changed and IA instructs VP to reset.
The mp4 files are accessible so I had a look and they contain a lot of sample description boxes in the initialization:
These are almost identical except that the nalu arrays in the hvcC boxes differ slightly. This shouldn't affect us as we always ask for the first sample description box, but....
Each of the tfhd boxes in each segment's moof has a sample description index that seems to be random after initially incrementing.
So this changing of sample description index and with each of them having small changes in extradata is what's causing the stream change to be triggered on each segment.
I don't know about the nalu array values, but I wonder if we really need to be reinitializing the player every time that changes, because the rest of the sample description is exactly the same. The method for comparing them is only looking at the raw data, I wonder if bento4 has something better....
i think we dont care about nalu or extradata on how is implemented DEMUX_SPECIALID_STREAMCHANGE on kodi core is currently too expensive imo we could limit sending DEMUX_SPECIALID_STREAMCHANGE only when codec and/or codec profile change while in playback, and remove all other checks and see how works
make a test by commenting all relevants m_changed = true;
on session.cpp and check if there are hdr problems when in playback
@MauriceW67 would you be able to try test build from here https://jenkins.kodi.tv/blue/organizations/jenkins/xbmc%2Finputstream.adaptive/detail/PR-1251/1/artifacts ?
@glennguy Unfortunately with this test build Kodi exhibits the same behavior as with @CastagnaIT 's previous test build. It crashes to the Android TV homescreen right after selecting the desired resolution. No error message is displayed.
Tested both versions: 32-bit on my Philips TV and 64-bit on the Shield 2019 Pro.
Tested with Kodi Omega nightly kodi-20230506-eebc7146-master
See attached debug log.
Thanks for testing, I've reproduced the crash in part and pushed a fix to the test PR.
Could you try a build from here when you get a chance? - https://jenkins.kodi.tv/blue/organizations/jenkins/xbmc%2Finputstream.adaptive/detail/PR-1251/2/artifacts/
@glennguy Thank you, that version seems to have solved the choppiness!
Tested also with DV content (LOTR) and that still works too. Also tested some other addons. Disney+ addon (Mandalorian, DV) still worked. Netflix addon doesn't work because of some weird login issue unfortunately (but that has nothing to do with this issue).
I confirm this hdr10+ fix. I have testet this on fire tv cube. Kodi 21.0 (2023.05.04) But another bug crept in. I tested it against official v21.1.0
Fast forward = wait max 2sec = no sound! Back forward = wait max 20sec = sound is back
Primevideo, Serie The Boys, Season 3
But another bug crept in. I tested it against official v21.1.0
please open another issue for other type bugs and provide issue template info
I have to agree with @Kampfader audio is lost for quite a bit of time after seeking in this test version. Eventually it fixes itself, but it seems to have started with this test version.
the last kodi 21 ISA release version has old code without all the new reworks then there are ton of changes included with the "test" version, so please open a new separate Issue for audio problem and provide logs as usual
try test this new build for choppy problem: https://jenkins.kodi.tv/blue/organizations/jenkins/xbmc%2Finputstream.adaptive/detail/PR-1253/1/artifacts let me know how works
@CastagnaIT No choppy problem here, thanks
I've tested it more now. The last version of @CastagnaIT also hangs and completely crashes kodi. After restarting the device (not kodi) it works again a few times.
Vielen Dank für den Test. Ich habe den Absturz teilweise reproduziert und einen Fix in die Test-PR übernommen.
Könnten Sie bei Gelegenheit einen Build von hier aus ausprobieren? - https://jenkins.kodi.tv/blue/organizations/jenkins/xbmc%2Finputstream.adaptive/detail/PR-1251/2/artifacts/
I would have liked to test this PR version of Inpustream Adaptive...unfortunately it can no longer be downloaded.
Hardware: Nvidia Shield TV Pro 2019
I have problems with the other newer versions.
Here, the is from @glennguy https://mega.nz/file/XU9ywD5R#cf0CHxr3nbdyfLD67vN2sBPezQ7wTsOjxm8UNJQSHIo
i am trying testing amazon vod on a 30 days trial account on a shield i have login and enabled 4k and hdr from amazon addon settings playback works but i dont have nor 4k and nor hdr available, some suggest?
@CastagnaIT Did you also enable the option "Register device for 4K playback" in the Connection menu of the addon?
If you did and it worked, you should see a device being added in your account settings page on the Prime Video website.
I see that the possible fix for the choppiness didn't make it into the new 21.1.1 release :)
@CastagnaIT Did you already manage to get 4K working in the Amazon VOD addon? If not, you could try to set the region in the addon to UK. That used to work for me with older versions of the addon, although it's not required anymore since versio 0.98 (at least for my Dutch account).
If you need any new logs or something, let me know.
Did you also enable the option "Register device for 4K playback" in the Connection menu of the addon?
i think forgot it, i will need to relogin when i will have the next opportunity to test on a hdr tv in hoping to catch the crash unfurnately logs are not so useful when kodi crashes
I understand. But please note that the second fix that @glennguy posted here:
https://github.com/xbmc/inputstream.adaptive/issues/1197#issuecomment-1537434428
Did not crash Kodi and fixed the choppiness (for me at least).
yes i know but was a test, comment out just part of code and leaving half an implementation to chance is not a good solution
i make here one crash logcat from fire cube "adb shell logcat"
https://paste.sensio.no/TallerNoticing can you see something there?
i play The Boys S01E01
After a bit of hours i think to have found and fixed the problems, at the end are not related to current changes done here but that has been introduced with the many new previous code refactors, the crash is due to lost memory pointers where its possible "workaround" the crash bug by set a fixed video quality to ISA settings the crash also can happens on other operative systems but depends also on streams provided
Here android test builds: inputstream.adaptive-android-armv7-omega-70639db.zip inputstream.adaptive-android-aarch64-omega-70639db.zip
I was able to do the 4k HDR test successfully i hope it work well now please let me know
Thanks @CastagnaIT for you hard work.
Im testing on armv7 (cube) Everything works perfectly
I tested several series, there are no crashes. No Choppy problems. No Sound problems, after jump -10min (button down on the remote control)
I'm curious if it works for other people too.
since on two different android devices works there is good chance that fix works for all users thanks for your support
After a bit of hours i think to have found and fixed the problems, at the end are not related to current changes done here but that has been introduced with the many new previous code refactors, the crash is due to lost memory pointers where its possible "workaround" the crash bug by set a fixed video quality to ISA settings the crash also can happens on other operative systems but depends also on streams provided
Here android test builds: inputstream.adaptive-android-armv7-omega-70639db.zip inputstream.adaptive-android-aarch64-omega-70639db.zip
I was able to do the 4k HDR test successfully i hope it work well now please let me know
I'm using Kodi 19 and a Fire TV 4K Max, how can I satisfy kodi.binary.global.main and the other dependencies?
Forget it, kodi 19 still runs on python2.
From kodi20 everything is rewritten to python3.
You only have one option. Reinstall Kodi20 fresh, please do not update from 19 to 20.
Tested 64-bit on my Shield 2019 Pro and 32-bit on my Philips Android TV. Both play HDR from Amazon VOD without stuttering. Thanks for all the work you put in!
Forget it, kodi 19 still runs on python2. From kodi20 everything is rewritten to python3.
You only have one option. Reinstall Kodi20 fresh, please do not update from 19 to 20.
Two questions:
1 - Why can't I update? Why reinstall from scratch? 2 - I read somewhere that Fire TV wasn't powerful enough for Kodi 20. Can anyone here confirm that Kodi 20 works fine on a Fire TV 4K Max?
1: in any case its always discouraged make a direct upgrade to new Kodi major versions (e.g. v19 to v20 or v19 to v21), because can produce weirdness in to kodi db and settings, leading to possible hidden malfunctions. If you are lucky the upgrade could end with success, otherwise you will need to reinstall kodi from scratch... different thing if you want upgrade to new minor versions then there is no problems e.g. 19.0 to 19.2 2: This sounds strange, statement never reached here
I don't remember where, but sure, it wasn't here.
Bug report
Describe the bug
Here is a clear and concise description of what the problem is:
When playing 4K HDR10(+) video from the Amazon VOD addon, the video is very choppy. If I turn off the HDR10+ option in the addon, the 4K version plays fine in SDR HEVC. Tested with various episodes of The Boys Season 3 and Reacher Season 1.
Note 1: 4K Dolby Vision plays fine (tested with Lord of the Rings: The Rings of Power).
Note 2: This does not only happen on my Philips TV, but also on the Nvidia Shield Pro 2019. And it also happens on Kodi 20.1 Nexus, so not just on Kodi 21 master.
Note 3: @CastagnaIT asked if the debug info shows any corrections. The answer is no. During the choppy video the skip and audio correction counters don't increase. The audio does have some dropouts, but not at every video skip though.
Note 4: This issue was first created in the Amazon VOD GitHub, but @glennguy has requested me to create it here as well.
Expected Behavior
Here is a clear and concise description of what was expected to happen:
4K HDR10+ videos playing smoothly in the Amazon VOD addon.
Actual Behavior
4K HDR10+ videos play very choppily.
Possible Fix
To Reproduce
Steps to reproduce the behavior:
Debuglog
The debuglog can be found here: Debug log of 4K HDR10+ video playing: https://paste.kodi.tv/azeviduwov.kodi (part 1) and https://paste.kodi.tv/wojudozeko.kodi (part 2) Debug log of same episode playing in 4K SDR: https://paste.kodi.tv/bajihivozu.kodi
MPD/M3U8s/ISM
An example or copy of a manifest (or manifests for HLS - master and variants) can be found here: Manifest files were too big for Kodi pastebin, so I zipped them up here: https://drive.google.com/file/d/1KhVRliJaModP5-fGibdxO42N107iMBO1/view?usp=share_link
manifest_1679331240_hdr10.txt manifest_1679334649_sdr.txt
Screenshots
Here are some links or screenshots to help explain the problem:
Additional context or screenshots (if appropriate)
Here is some additional context or explanation that might help:
Your Environment
Used Operating system:
[X] Android
[ ] iOS
[ ] tvOS
[ ] Linux
[ ] OSX
[ ] Windows
[ ] Windows UWP
Operating system version/name: Android TV 11
Kodi version: 21.0-ALPHA1 (20.90.101) Git:20230319-0d43af8c62
inputstream.adaptive version: 20.3.5
note: Once the issue is made we require you to update it with new information should that be required. Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.