[mythtv] AVSync2 Refinements

Mark Kendall mark.kendall at gmail.com
Mon Dec 9 14:03:47 UTC 2019


On Mon, 9 Dec 2019 at 00:32, Tim Pletcher <pletchtd at gmail.com> wrote:

> Thank you for your insights Peter.  I have been testing and debating whether to actually include any filtering or not. I do think true proportional control with gain settings less than 1 is better as this minimizes the control oscillation once near setpoint while still giving somewhat faster initial sync. I do notice a significant difference in the amount of variability from my two intel apollo lake based front-ends using VAAPI versus my combined i5 frontend/backend using an NVidia GT1030 with NVDEC so I think the proposed change is more impactful on low end hardware.
>
> As David suggests, I will create a ticket and submit a patch.

Tim

Many thanks for this - very handy:)

I recently got caught out by the fluctuating av sync on the raspberry
pi. I've taken the liberty of producing a more extensive patch
(attached). This adds your filtering as well as removing all of the
the old a/v sync code and the settings for AVSync2 - i.e. it moves
over completely to the new av sync code and removes the audio
correction adjustment. (N.B. the patch is against today's  latest
master - I pushed some cleanup of  MythDVDPlayer and the patch won't
apply cleanly before that).

It appears to work very well. On two (linux) desktop dev machines and
a pi 4 I can't see any issues - playback is nice and smooth. As you
say, initial sync seems to be much better as well.

Certainly gets my seal of approval!

One question - last_fix - should that be carried over between calls to
AVSync()? At the moment it is a local that gets reset between each
call - which I'm not sure is the intended behaviour.

Thanks again and regards
Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avsync.diff
Type: text/x-patch
Size: 25288 bytes
Desc: not available
URL: <http://lists.mythtv.org/pipermail/mythtv-dev/attachments/20191209/887352f8/attachment.bin>


More information about the mythtv-dev mailing list