v17 [AppleTV4] Playback issues for 24.0 fps videos only (other frame rates are okay)
#1
Device: Apple TV 4, tvOS 12.1
Kodi: 17.6 Git:2018-02-16-a9e439f-dirty
Log (video 1): https://paste.kodi.tv/iyadatezic.kodi
Log (video 2): https://paste.kodi.tv/ibasixetek.kodi

Adjust Display Refresh Rate: turned on
AVFoundation hardware decoder: turned on

Issue:
Issues with 24.0 fps frame rate video content on Kodi Apple TV. When the video starts the display refresh rate is (I think) correctly adjusted to 24Hz, but around 5-6 seconds into the clip the refresh rate is changed again in Kodi (but display is still kept at 24Hz). video freezes for around a second. The video will resume with a stutter in the audio/video after a few seconds and then continue with "normal" playback. There is a noticeable stutter in the video when this occurs and as the video continues the stutter will become more and more frequent, after 20 minutes the audio/video (video only) stutter is almost constant. The display is correctly reporting 24Hz during the playback.

Videos with frame rate 23.976 (24000/1001), 25.0, 29.970 and 30.0 are playing without any issues. The issue is only there for videos with 24.0 frame rate. I've tested different 24.0 fps videos with different encoding settings, and they all share the same playback issue.

All 24.0 fps videos print a lot more frame rate related debug logs compared to other videos, the 24.0 fps videos also print "NOTICE: Display resolution ADJUST : XXX" twice compared to other videos that only print it once (if that means anything) .


Not sure if this was introduce for me in tvOS 12.0 or 12.1 (I rarely watch 24.0 fps content), but I'm pretty sure I tested all different frame rate formats when adjust display refresh rate was introduced for AppleTV4 in tvOS and I had no issues back than. The Kodi version have stayed the same.

Edit: 
Tested some more. The freeze after 5-6 seconds was due to Kodi updating the display refresh rate a second time and "Pause during refresh change" was still set to "1 sec". When "Pause during refresh rate change" is changed I need to restart Kodi for the new value to be used. So Kodi was still using "1 sec" after I've changed the value to "0 sec". But after 5-6 seconds a second display refresh rate update occurs. The stutter occurs only in the video, no stutter in the audio.
Reply
#2
Been able to test some more, and my first report was a bit inaccurate. 

- Both 24.0 fps and 30.0 fps videos adjusts the playback frame rate a second time after around 5 seconds.
- The display frame rate is only changed once (correctly) at video start for all video frame rates.
- Adjusting playback frame rate a second time for 24.0 fps and 30.0 fps videos only happen when AVFoundation HW decoder is enabled.
- Both 24.0 fps and 30.0 fps videos have occasional video stutter that increases, after around 15 minutes the stutter is very frequent. 
- Skipping forward/backwards once will remove the frequent video stutter, but the stutter comes back after 5-15 minutes.
- Same behavior on another device that was running tvOS 11.3 (at least the second frame rate change, not sure about the stutter), so this was not introduced in tvOS 12.x.


While writing this I realized that I haven't tested if different values for "adjust display refresh rate" (always, on start/stop) changes anything, will test that. (Tested, didn't change anything).
Reply

Logout Mark Read Team Forum Stats Members Help
[AppleTV4] Playback issues for 24.0 fps videos only (other frame rates are okay)0