[mythtv] AVSync2 Improvements

David Engel david at istwok.net
Sun Feb 17 19:03:01 UTC 2019


On Sat, Feb 16, 2019 at 04:00:45PM -0600, David Engel wrote:
> On Sat, Feb 16, 2019 at 03:28:14PM -0500, Peter Bennett wrote:
> > On 2/15/19 10:14 PM, David Engel wrote:
> > > I just tried today's changes with my theme and also with official,
> > > Blue Abstract.  With live TV wait set to 0, it works as expected.  If
> > > live TV wait is set to 1000ms or more, the video never jumps back to
> > > full size.  About 500ms seems to be the value where things break.  AT
> > > <= 400ms, it usually works and at >= 600ms, it usually doesn't.
> > > Again, this is with my Shield.  I just tested on my Linux desktop with
> > > OpenGL rendering and it did the same thing.
> > Today I do see the problem. Clearly this patch is not working as it should.
> > 
> > Is there a need to continue with this? The code that I have committed works
> > with Live TV and catches up over a minute or so. Mark K expressed that he
> > did not want the delay patch put in and you said it is only a temporary
> > thing.
> 
> I'll have to test without the patch to see how it is.  Before the all
> of the other, recent changes, I don't recall the live TV case being
> too bad.  A minute of very minor judder is probably okay.  If it's a
> minute of more noticeable stuttering, I still think we should do
> better.

I compared some live TV cases (entering and changing channels) with
and without avsync2.  Without avsync2, there were cases where the
audio and video would sync up fairly quickly.  Most of the time,
though, it would take a little while to sync up.  In those cases it
was comparable to avsync2.  Avsync2 was pretty constant in that it
always took dozens of secongs to sync up.

I noticed a couple of other issues caused by avsync2 that I hadn't
previously tied to it.  I have one, 1080i, h.264 channel that I watch
fairly regularly at >= 1.5x.

1. The avsync randomly goes out of phase for short periods (like Mark
Spieth mentioned).  I figured the CPU load on my Shield was on the
edge and just couldn't quite keep at those times.  The problem goes
away completely after I turn off avsync2.  I suspect the logs would
show the same inabiltiy to correct that other logs have shown.

2. I have my fast forward speeds set to 10x, 20x, 60x and 180x.  10x
and 20x work normally.  60x and 180x have problems.  A video frame is
displayed and then there is a very long pause before another video
frame is displayed.  Basically those speeds are useless.  Like above,
the problem goes away completely after I turn off avsync2.  I can
provide logs for this if you want.

I've been using/testing avsync for long enough that I guess I'd gotten
used to it's quirks.  After seeing the old avsync behavior again, I'm
inclined to go back.  Skips and jump (which I do a lot of) feel like
they are slower than with avsync2 but the lack of the other issues
more than makes up for it.

David
-- 
David Engel
david at istwok.net


More information about the mythtv-dev mailing list