[mythtv-users] Live TV stutter

Stephen Worthington stephen_agent at jsw.gen.nz
Tue Jan 30 12:41:21 UTC 2018


On Tue, 30 Jan 2018 07:10:14 -0500, you wrote:

>90% of my Mythtv viewing has been recorded tv so I could skip over 
>commercials.  However, in the morning I sometimes watch the local and 
>national news live with mythtv.  I've noticed that if I select Watch TV 
>it will come up on the last station viewed and there is a stutter in the 
>picture. It's very noticeable particularly if they have a text scroll at 
>the bottom of the screen.  I've fixed this by using the left arrow to 
>backup 10 seconds. At that point it's a perfect picture.  To me this is 
>understandable and it sort of explains why DirecTV's picture is always 
>delayed when view live tv using their DVR versus a standard receiver.
>
>However, I noticed today which playing with mythtv live that if I switch 
>to a new channel I do NOT get the stuttering and do not need to backup a 
>few seconds.
>
>Is this behavior normal? Does the stuttering point to a setting I should 
>change?
>
>Jim A

It works just as you suspect - the default delay on starting live TV
is too small on many channels, and stuttering happens when either the
audio or video that has been buffered runs out and mythfrontend has to
wait for more data to arrive.  So pausing for a couple of seconds
fixes that.  Changing channels takes a while, and seems to introduce
sufficient delay that there is enough buffered data and stuttering
normally does not occur.  There is no setting available to set the
delay before live TV will start playing.

Part of the problem is that the data for the video and audio (and
other) streams are not completely synchronised.  There is always a
small offset between the arrival of data for a given frame in one
stream versus the arrival of the data for the same frame in another
stream, as they arrive in different packets.  Sync is maintained
between the packets for each stream using timecodes in the headers.

What is really needed is some code that actually analyses the data
coming in and works out the offset between the audio and video data
and selects the correct buffer size for minimal delay but no stutter.
If there are subtitles and alternate audio streams they would need to
be included in the calculation.  It would be possible to have the
video start as soon as it arrives, then later when the buffering
requirement was known, introduce the correct size of short pause to
fix the stutter, or alternatively just not start playing until the
buffering was known and working on all streams.


More information about the mythtv-users mailing list