Problems with LiveTV stuttering on Vero 4k+

I currently record to .ts files (pass-through profile) as I know that MKV recordings in tvheadend can be problematic (based on what I’ve read on various forums).

I can try to capture the issue to a MKV file, and see whether I see the same frame skips (if providing you with such a file would aid debugging)?

Yes – it would help.

From what I’ve seen, at least on tvheadend 4.2, recording to ts is the only way to watch a recording as it is recording. With a mkv, it plays until where it was when the playback started.

Hi Sam,

This morning I encountered the frame skipping in livetv, again on CBeeBies HD (over DVB-T2).

Log File here: https://paste.osmc.tv/rogecuxoce

2019-09-27 07:59:53.941 T:3467637472    INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 50.000000 fps
2019-09-27 07:59:53.942 T:3467637472    INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
2019-09-27 07:59:58.002 T:4070170624   DEBUG: ------ Window Deinit (DialogNotification.xml) ------
2019-09-27 07:59:58.444 T:3467637472   DEBUG: CPtsTracker: detected pattern of length 1: 40000.00, frameduration: 40000.000000
2019-09-27 08:00:06.901 T:3467637472    INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 50.000000 fps
2019-09-27 08:00:06.901 T:3467637472   DEBUG: CPtsTracker: pattern lost on diff 100000.000000, number of losses 3
2019-09-27 08:00:06.902 T:3467637472    INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
2019-09-27 08:00:08.901 T:3467637472    INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 50.000000 fps
2019-09-27 08:00:08.901 T:3467637472    INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
2019-09-27 08:00:10.541 T:3467637472    INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 50.000000 fps
2019-09-27 08:00:10.541 T:3467637472    INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
2019-09-27 08:00:11.680 T:3467637472   DEBUG: CPtsTracker: detected pattern of length 42: -60000.00 40000.00 40000.00 40000.00 40000.00 40000.00 40000.00 40000.00 40000.00 40000.00 40000.00 40000.00 40000.00 40000.00 40000.00 40000.00 40000.00 40000.00 40000.00 40000.00 40000.00 40000.00 40000.00 40000.00 40000.00 40000.00 40000.00 40000.00 40000.00 40000.00 40000.00 40000.00 40000.00 40000.00 40000.00 40000.00 40000.00 40000.00 40000.00 40000.00 40000.00 100000.00, frameduration: 39047.619048
2019-09-27 08:00:11.843 T:3467637472   DEBUG: CPtsTracker: pattern lost on diff 40000.000000, number of losses 4
2019-09-27 08:00:16.720 T:3467637472   DEBUG: CPtsTracker: detected pattern of length 1: 40000.00, frameduration: 40000.000000
2019-09-27 08:00:22.581 T:3719414496   DEBUG: Thread JobWorker 3719414496 terminating (autodelete)
2019-09-27 08:00:26.341 T:3467637472    INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 50.000000 fps
2019-09-27 08:00:26.341 T:3467637472   DEBUG: CPtsTracker: pattern lost on diff 100000.000000, number of losses 5
2019-09-27 08:00:26.342 T:3467637472    INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
2019-09-27 08:00:30.840 T:3467637472   DEBUG: CPtsTracker: detected pattern of length 1: 40000.00, frameduration: 40000.000000
2019-09-27 08:00:38.541 T:3467637472    INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 50.000000 fps
2019-09-27 08:00:38.541 T:3467637472   DEBUG: CPtsTracker: pattern lost on diff 100000.000000, number of losses 6
2019-09-27 08:00:38.542 T:3467637472    INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
2019-09-27 08:00:40.381 T:3467637472    INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 50.000000 fps
2019-09-27 08:00:40.381 T:3467637472    INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
2019-09-27 08:00:44.879 T:3467637472   DEBUG: CPtsTracker: detected pattern of length 1: 40000.00, frameduration: 40000.000000
...

I captured this to an mkv recording, but unfortunately there were no frame skips when I played back the mkv file :frowning:

I was tailing the logfile at the time of seeing the skips in livetv, and the frame skips occur exactly at the time of each “Stillframe detected” debug message.

I took a quick look at the code in this area and do wonder whether vero3-153-fix-timeout-calculation.patch (included in the may release onwards) may be causing this ?

I’ll create a build with that patch excluded to see if this makes any difference…

Initial signs are that removing that patch has a positive effect. Will continue to monitor to be sure.

@sam_nazarko I’ve been running for a whole week on my custom build (based on af5f276 of osmc master, with patch 153 removed); and haven’t yet seen a single skipped frame in livetv.

Yes – I think this patch can be safely removed and isn’t necessary. It will be removed from the next update.

Thanks for confirming.

1 Like

@sam_nazarko
Not sure whether you intended to remove this in the following commit:

[package] [mediacenter-osmc] Vero 4K/4K+: deprecate AVLevel patch

However that commit removes patch 152 rather than 153.

Thought i would mention it as i noticed in a related thread “LiveTV stuttering after May update” that you’d said the fix was available in staging.

As per above, the fix for me was removing
vero3-153-fix-timeout-calculation.patch

Thanks – I’ll change that now.
Don’t update to staging though – it’s WIP with 4.9 stuff.

Thanks for the heads-up - wasn’t planning to as I’m currently sitting pretty on my custom build with patch 153 excluded.