[mythtv] Video playback framerate

Mark Kendall mark.kendall at gmail.com
Mon Jan 7 14:25:11 UTC 2019


On Fri, Jan 4, 2019, 8:48 PM Peter Bennett <pb.mythtv at gmail.com wrote:

> Hi Mark
>
> Since you are getting deeply involved in video playback, I would like to
> mention a couple of things I have done and what I would like to do.
>
> 1. AVSYNC
>
> Everybody who has tried AVSYNC2 has give favorable feedback..
>

To be honest, I've never really touched the a/v sync code because I never
had any issues with it and it seemed fragile (judging by the lengthy
discussions and number of tweaks and patches).

I have no issue with anything that is simpler and easier to maintain.

I assume you've tested it with all of the worst case scenarios - stream
change, broken audio, broken video, DVD, BD etc etc

The only request I'd make is - can it be moved/is it worth moving it into a
class of its own?

At the moment, MythPlayer is some 6000 lines of code - anything we can do
to farm out logic will help going forward.

If we get rid of AVSYNC there is a lot of other code that can be
> removed. The classes in vsync, the avsync predictor can probably be
> trashed.
>

Just remember that some of those vsync classes are - as the name suggests -
also performing sync to vblank to prevent tearing - though I'm not sure how
many playback methods actually need that these days.


> 2. Elapsed Time
>
> I would like to change it throughout to use timestamp instead of frame
> number for keeping track of the position. (I am not sure whether
> timestamps ever get reset in the middle of a video and what to do about
> that).
>

Again, this is not something I've ever really touched and haven't had any
issues with. But from experience, I don't believe it is an either/or
choice. Timestamps and frame number/key frame each have their advantages
and disadvantages - though I think timestamps are more universally useful
(audio only streams etc).

For recorded content, we really have no reason to get this wrong. We have
all of the information available at recording time.

I have no real understanding of the recorder classes and/or markup database
tables. Is there a simple way of adding time stamps as well? Would that
impact performance? How big are peoples databases currently running...

Presumably if we were to switch over to timestamps, we would need to run
duplicate/parallel tables for a release or 2 before switching over? So that
existing recordings would still work.

Or maybe write something to convert existing recordings over...

So many possibilities.

Regards
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-dev/attachments/20190107/e690007f/attachment.html>


More information about the mythtv-dev mailing list