Going back to the LiveTV stuttering - I have some further findings.
I did manage to leave a channel playing for several hours overnight over the weekend without any stuttering, and it seems that I can “encourage” the stuttering by channel hopping (i.e. using ChannelUp/ChannelDown)
When it’s going to occur I can see in the logfile that “Stillframes” were detected when I performed the previous channel switch. Here are some pertinent lines trimmed from a logfile today:
14:39:43.562 T:3495949056 NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire HD'
14:39:44.334 T:4075364944 NOTICE: Display resolution ADJUST : 1920x1080 @ 50.00 - Full Screen (26) (weight: 0.000)
14:39:44.338 T:4075364944 NOTICE: Display resolution ADJUST : 1920x1080 @ 50.00 - Full Screen (26) (weight: 0.000)
14:39:44.343 T:3415200512 INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
14:39:44.856 T:3415200512 INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 25.000000 fps
14:39:44.876 T:4075364944 NOTICE: Display resolution ADJUST : 1920x1080 @ 50.00 - Full Screen (26) (weight: 0.000)
14:39:44.917 T:3415200512 INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
14:39:49.315 T:4075364944 NOTICE: Display resolution ADJUST : 1920x1080 @ 50.00 - Full Screen (26) (weight: 0.000)
14:39:50.374 T:3415200512 INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 50.000000 fps
14:39:50.405 T:3415200512 DEBUG: CAMLCodec::Reset
14:39:50.469 T:3415200512 INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
14:39:51.012 T:3415200512 INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 50.000000 fps
14:39:51.591 T:3415200512 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
14:39:51.772 T:3415200512 INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
14:39:52.492 T:3415200512 INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 50.000000 fps
14:39:52.502 T:3415200512 INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
14:39:53.742 T:3415200512 INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 50.000000 fps
14:39:53.818 T:3415200512 INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
14:39:54.974 T:3415200512 INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 50.000000 fps
14:39:55.038 T:3415200512 DEBUG: CAMLCodec::Reset
14:39:55.086 T:3415200512 INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
14:39:55.892 T:3415200512 INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 50.000000 fps
14:39:55.988 T:3415200512 INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
14:43:55.657 T:3415200512 INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 50.000000 fps
14:43:55.701 T:3415200512 DEBUG: CAMLCodec::Reset
14:43:55.779 T:3415200512 INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
14:43:56.435 T:3415200512 INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 50.000000 fps
14:43:56.870 T:3415200512 INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
14:43:57.123 T:3415200512 INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 50.000000 fps
14:43:57.173 T:3415200512 INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
Full version of this logfile can be found here: https://paste.osmc.tv/mukadoyiyu
If it helps…to reproduce the problem I’ve been playing a channel, then firing off a shell script similar to this.
for x in $(seq 1 50); do
kodi-send -a "ChannelUp"
sleep 1
kodi-send -a "ChannelDown"
sleep 300
done
I then watch the logfile until I see CAMLCodec::Reset whilst playback of a broadcast is in progress.
If I set “Adjust refresh rate” to off, rather than “Always” or “On Start/Stop” then the problem goes away:
15:02:36.750 T:3526357760 DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire +1'
15:02:37.006 T:3526357760 NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire +1'
15:02:38.008 T:3467637504 DEBUG: CAMLCodec::Reset
15:02:38.039 T:3526357760 DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire HD'
15:02:38.170 T:3526357760 NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire HD'
15:02:41.434 T:3467637504 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
15:07:37.874 T:3467637504 DEBUG: CAMLCodec::Reset
15:07:37.923 T:3526357760 DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire +1'
15:07:38.187 T:3526357760 NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire +1'
15:07:39.189 T:3467637504 DEBUG: CAMLCodec::Reset
15:07:39.249 T:3526357760 DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire HD'
15:07:39.631 T:3526357760 NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire HD'
15:07:42.418 T:3467637504 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
15:12:39.100 T:3467637504 DEBUG: CAMLCodec::Reset
15:12:39.141 T:3526357760 DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire +1'
15:12:39.396 T:3526357760 NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire +1'
15:12:40.146 T:3467637504 DEBUG: CAMLCodec::Reset
15:12:40.188 T:3526357760 DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire HD'
15:12:40.495 T:3526357760 NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire HD'
15:12:44.523 T:3467637504 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
15:17:40.405 T:3467637504 DEBUG: CAMLCodec::Reset
15:17:40.440 T:3526357760 DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire +1'
15:17:40.707 T:3526357760 NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire +1'
15:17:41.389 T:3467637504 DEBUG: CAMLCodec::Reset
15:17:41.539 T:3526357760 DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire HD'
15:17:41.673 T:3526357760 NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire HD'
15:17:44.170 T:3467637504 INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 25.000000 fps
15:17:44.200 T:3467637504 INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
15:17:44.987 T:3467637504 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
15:22:41.593 T:3467637504 DEBUG: CAMLCodec::Reset
15:22:41.639 T:3526357760 DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire +1'
15:22:42.007 T:3526357760 NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire +1'
15:22:42.906 T:3467637504 DEBUG: CAMLCodec::Reset
15:22:42.906 T:3526357760 DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire HD'
15:22:43.364 T:3526357760 NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire HD'
15:22:46.031 T:3467637504 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
15:27:42.919 T:3467637504 DEBUG: CAMLCodec::Reset
15:27:42.960 T:3526357760 DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire +1'
15:27:43.326 T:3526357760 NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire +1'
15:27:44.267 T:3467637504 DEBUG: CAMLCodec::Reset
15:27:44.268 T:3526357760 DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire HD'
15:27:44.403 T:3526357760 NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire HD'
15:27:47.396 T:3467637504 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
15:32:44.084 T:3467637504 DEBUG: CAMLCodec::Reset
15:32:44.147 T:3526357760 DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire +1'
15:32:44.397 T:3526357760 NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire +1'
15:32:45.406 T:3467637504 DEBUG: CAMLCodec::Reset
15:32:45.461 T:3526357760 DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire HD'
15:32:45.841 T:3526357760 NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire HD'
15:32:48.900 T:3467637504 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
15:37:45.308 T:3467637504 DEBUG: CAMLCodec::Reset
15:37:45.374 T:3526357760 DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire +1'
15:37:45.736 T:3526357760 NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire +1'
15:37:46.738 T:3467637504 DEBUG: CAMLCodec::Reset
15:37:46.781 T:3526357760 DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire HD'
15:37:47.161 T:3526357760 NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire HD'
15:42:46.572 T:3467637504 DEBUG: CAMLCodec::Reset
15:42:46.630 T:3526357760 DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire +1'
15:42:46.996 T:3526357760 NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire +1'
15:42:48.017 T:3467637504 DEBUG: CAMLCodec::Reset
15:42:48.017 T:3526357760 DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire HD'
15:42:48.150 T:3526357760 NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire HD'
15:42:52.329 T:3467637504 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
15:47:47.757 T:3467637504 DEBUG: CAMLCodec::Reset
15:47:47.809 T:3526357760 DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire +1'
15:47:48.177 T:3526357760 NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire +1'
15:47:49.117 T:3467637504 DEBUG: CAMLCodec::Reset
15:47:49.182 T:3526357760 DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire HD'
15:47:49.312 T:3526357760 NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire HD'
15:47:53.094 T:3467637504 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
15:52:48.911 T:3467637504 DEBUG: CAMLCodec::Reset
15:52:48.984 T:3526357760 DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire +1'
15:52:49.176 T:3526357760 NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire +1'
15:52:50.096 T:3467637504 DEBUG: CAMLCodec::Reset
15:52:50.257 T:3526357760 DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire HD'
15:52:50.824 T:3526357760 NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire HD'
15:52:54.418 T:3467637504 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
15:57:50.301 T:3467637504 DEBUG: CAMLCodec::Reset
15:57:50.331 T:3526357760 DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire +1'
15:57:50.517 T:3526357760 NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire +1'
15:57:51.518 T:3467637504 DEBUG: CAMLCodec::Reset
15:57:51.568 T:3526357760 DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire HD'
15:57:51.942 T:3526357760 NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire HD'
15:57:55.123 T:3467637504 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
As you’ll see the codec only resets during channel switches and not during the middle of a broadcast.
This would be a solution, but I also use the machine for watching 4k films, so must have Auto-Adjust Refresh Rate set to either “Always” or “On Start-Stop” for that purpose.
I guess I have a workaround for now, but is there any way to make it use Adjust refresh rate=off during playback of livetv, and “On Start/Stop” or “Always” for everything else. The TV Channels I stream are all UK Freesat or Freeview, so it just needs to stick at 1080p@50Hz.
I’m happy to provide whatever logs etc, are needed to address the underlying problem.