Some more pts timing analysis.
authorCarl Hetherington <cth@carlh.net>
Sat, 30 Nov 2019 21:18:44 +0000 (22:18 +0100)
committerCarl Hetherington <cth@carlh.net>
Sat, 30 Nov 2019 21:18:44 +0000 (22:18 +0100)
hacks/check_packets.py

index f8075db47f73aa3d91df632adec762099d1a727f..22d2aa434c25efac88c039328c5167f4f3851710 100644 (file)
@@ -13,8 +13,10 @@ def handle(frame):
     if frame['media_type'] == 'video':
         if last_video_pts is not None and frame['pkt_pts_time'] <= last_video_pts:
             print 'Out of order video frame %f (%d) is same as or behind %f (%d)' % (frame['pkt_pts_time'], frame['pkt_pts'], last_video_pts, last_video)
     if frame['media_type'] == 'video':
         if last_video_pts is not None and frame['pkt_pts_time'] <= last_video_pts:
             print 'Out of order video frame %f (%d) is same as or behind %f (%d)' % (frame['pkt_pts_time'], frame['pkt_pts'], last_video_pts, last_video)
-        else:
-            print 'OK frame %f' % frame['pkt_pts_time']
+        elif last_video_pts is not None:
+            print 'OK frame %f %f %f' % (frame['pkt_pts_time'], frame['pkt_pts_time'] - last_video_pts, 1 / (frame['pkt_pts_time'] - last_video_pts))
+       else:
+            print 'OK frame %f' % (frame['pkt_pts_time'])
         last_video = frame['pkt_pts']
         last_video_pts = frame['pkt_pts_time']
 
         last_video = frame['pkt_pts']
         last_video_pts = frame['pkt_pts_time']