Ever since I updated OSMC to a version with Kodi Matrix (v19) I’ve been getting player freezes when I seek inside a video. Both audio and video freeze on either the frame before the seek action, or the “destination” frame. It definitely started occurring with Matrix, since it never once exhibited this behaviour on older versions of Kodi. You can find quite a lot about this in regards to other platforms and AAC streams but it doesn’t seem to be limited to just AAC, it also happens for AC3 and HE-AAC (which is quite different from “standard” AAC). Plus, audio actually sometimes starts playing again if I wait long enough (20+ seconds) while video keeps being frozen pretty much indefinitely. All my videos are h264 because my particular Pi (2B) doesn’t handle h265 very well. You don’t even have to seek with a remote, even with a physical keyboard (pressing arrow left/right once) this frequently occurs. When it does, CPU usage goes through the roof and usually I just force kill Kodi. Sometimes seeking again a couple of times, or pausing/playing about a dozen times might work too. In those cases the initial seek is usually ignored and I’m back at the previous position plus/minus any additional seeks I might’ve done. The problem doesn’t always happen, but I’d say it’s about 90% of the time.
I’m not using any video plugins besides the ones that already come with Kodi, I actually barely use any custom plugins at all. I don’t know how to get a list of only user-installed plugins but if I remember correctly it’s just some auto-subtitles, screensaver and web interface stuff. I’m also using the default skin. All my videos are hosted on good old SMB shares, automatically mounted through /etc/fstab
because doing it directly from within Kodi gave me some issues (but I don’t quite remember what).
Since the RPI runs off an SD card it doesn’t survive for very long under the massive amount of logging (I’ve actually had to replace 2 SD cards within a few weeks before I turned off logging altogether and it never died again), so I used a bind mount to redirect the 2 log files (current and old) to another SMB share. I set the loglevel to 1 because I don’t see the point in also showing it on-screen (which is the only difference between 1 and 2 afaik) and 1 should already be debug-level.
The relevant messages seem to be:
2021-11-30 16:28:18.385 T:4326 DEBUG <general>: CDVDAudio::Resume - resume audio stream
2021-11-30 16:28:18.386 T:4092 WARNING <general>: ActiveAE - large audio sync error: 120123.020676
2021-11-30 16:28:18.386 T:4092 DEBUG <general>: ActiveAE - start sync of audio stream
2021-11-30 16:28:18.389 T:4092 WARNING <general>: ActiveAE - large audio sync error: 120123.022864
2021-11-30 16:28:18.393 T:4092 WARNING <general>: ActiveAE - large audio sync error: 120123.023229
2021-11-30 16:28:18.395 T:4092 WARNING <general>: ActiveAE - large audio sync error: 120123.022187
2021-11-30 16:28:18.402 T:4325 DEBUG <general>: CVideoPlayerVideo - CDVDMsg::GENERAL_RESYNC(236720000.000000)
2021-11-30 16:28:18.468 T:4092 WARNING <general>: ActiveAE - large audio sync error: 120073.074427
2021-11-30 16:28:18.518 T:4092 WARNING <general>: ActiveAE - large audio sync error: 120073.078750
2021-11-30 16:28:18.518 T:4092 DEBUG <general>: ActiveAE::SyncStream - average error of 5000.000000, start adjusting
2021-11-30 16:28:18.569 T:4092 WARNING <general>: ActiveAE - large audio sync error: 120022.998125
2021-11-30 16:28:18.618 T:4092 WARNING <general>: ActiveAE - large audio sync error: 119973.058958
2021-11-30 16:28:18.668 T:4092 WARNING <general>: ActiveAE - large audio sync error: 119923.047864
2021-11-30 16:28:18.720 T:4092 WARNING <general>: ActiveAE - large audio sync error: 119873.058020
2021-11-30 16:28:18.768 T:4092 WARNING <general>: ActiveAE - large audio sync error: 119823.082969
2021-11-30 16:28:18.818 T:4092 WARNING <general>: ActiveAE - large audio sync error: 119773.066927
2021-11-30 16:28:18.869 T:4092 WARNING <general>: ActiveAE - large audio sync error: 119723.084219
2021-11-30 16:28:18.918 T:4092 WARNING <general>: ActiveAE - large audio sync error: 119673.028073
2021-11-30 16:28:18.968 T:4092 WARNING <general>: ActiveAE - large audio sync error: 119623.069843
2021-11-30 16:28:19.018 T:4092 WARNING <general>: ActiveAE - large audio sync error: 119573.051250
2021-11-30 16:28:19.068 T:4092 WARNING <general>: ActiveAE - large audio sync error: 119523.033542
2021-11-30 16:28:19.073 T:4325 WARNING <general>: OutputPicture - timeout waiting for buffer
The large audio sync error
line keeps occurring with a decrementing number until I get it unstuck, or if I kill Kodi. The same goes for timeout waiting for buffer
although it’s much less frequent. The full debug log can be found here (the particular video has an AC3 audio stream). I don’t see anything related to this particular issue in the November release so I don’t think it’s been fixed yet.