[mythtv] pts values

Peter Bennett pb.mythtv at gmail.com
Fri Sep 7 21:40:22 UTC 2018


Regarding the clip that I recorded from ABC.

https://www.dropbox.com/s/18psskmw79ujavf/interlace.mkv?dl=0

Once the show gets underway, the predictor is regularly dropping frames, 
although the frame rate is 50 (25 doubled) and the monitor refresh rate 
is 60. If I turn off the predictor by commenting the line where it is 
enabled, the clip plays fine without dropping any frames.

I captured the PTS values (before deinterlace) from the first 30 
seconds. In 30 seconds, the FPS does this:

201 frames at 25 fps
15 frames at 30fps
80 frames at 25fps
25 frames at 30fps
36 frames at 25fps
159 frames at 30fps
21 frames that seem to jiggle between 25 and 30 fps
29 frames at 25fps
29 frames at 30fps
12 frames at 25fps
40 frames at 30fps
10 frames at 25fps
18 frames at 30fps

and so on.

Eventually the main show starts and it goes to 25fps consistently.

When it is 30fps the pts values go up by 33 or 34 milliseconds for each 
frame - which is perfectly correct

When it is 25fps the pts values go up by 33 or 34 milliseconds 
alternating with 50 milliseconds - this makes no sense to me at all, but 
that does average out to 25fps.

The fps value that is indicated by ffmpeg is 29.97, however the main 
show is actually at 25 fps.

How do we sort this out? The avsync predictor is not really doing a good 
job (it thinks everything is 29.97fps).

Add to this that there is a frame doubling deinterlacer. The vaapi frame 
doubling interlacer gives garbage for pts values so I am trying to 
insert appropriate values, but not doing very well with the 33 and 50 
millisecond alternating pts values. I don't know if I can rely on this 
being a normal occurrence and try to compensate.

Note - I ran this with vaapi2 and with software decoding - the PTS 
values are identical so vaapi2 is not corrupting them.


Peter






More information about the mythtv-dev mailing list