[mythtv-users] Display weirdness

Stephen Worthington stephen_agent at jsw.gen.nz
Sun Oct 18 02:37:33 UTC 2020

On Sat, 17 Oct 2020 15:31:20 -0700, you wrote:

>Maybe there are no modes because I don't have ModeDebug set as suggested,
>but I'm not sure how to do that.

To turn on ModeDebug, you just add this to your /etc/X11/xorg.conf

Section "Screen"
   Option    "ModeDebug" "true"

If there is already a "Screen" section, just put:

   Option    "ModeDebug" "true"

in that section.

About the stuttering, I agree with Greg Oliver - the first thing to
try is to just pause live TV for a few seconds to allow the buffers to
fill.  This has been a very longstanding problem - MythTV does not
correctly calculate and adjust how much data needs to be buffered to
play a particular combination of video and audio streams for a
channel.  The streams are made up of packets of video and audio data
and when playing a video packet, the audio packet that matches that
video packet needs to be already available in the buffers.  If it is
not, then the playback stops until it becomes available.  The packets
are normally sent with a small delay between when the matching video
and audio packets arrive.  Since they are sent in the same stream of
data with packets from other channels, the packets for all the
channels are interleaved with each other.  Even if the matching audio
packet starts immediately after the video packet, it still will take a
short time to be received.  If there are packets for other channels in
between the video and audio packet (and there often are), the delay to
receive the audio packet will be a lot longer.  The delay can also be
a bit variable as it depends on the size of the packets, which can
change a bit if something is happening on another channel.  As can the
number of packets, if, for example, a new channel starts up on the
multiplex while you are watching a different channel.  When playing a
recording, the problems are much less - the recording file only has
the streams for the one channel stored in it, and MythTV gets the
buffering calculation right or adjusts the delay in the first second
or so of playback so that it becomes right.

Note that this description is a bit simplified - for example, I can
not remember if it is valid for the audio packets to be arriving
before the video packets, or not.

Also, you should check your mythfrontend.log file to see if it is
giving you any audio prealloc warning messages:

grep -a prealloc /var/log/mythtv/mythfrontend.log

If that finds any messages, do what they say to adjust the audio
prealloc buffer setting.

More information about the mythtv-users mailing list