13 if frame['media_type'] == 'video':
14 if last_video_pts is not None and frame['pkt_pts_time'] <= last_video_pts:
15 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)
17 print 'OK frame %f' % frame['pkt_pts_time']
18 last_video = frame['pkt_pts']
19 last_video_pts = frame['pkt_pts_time']
21 p = subprocess.Popen(shlex.split('ffprobe -show_frames %s' % sys.argv[1]), stdin=None, stdout=subprocess.PIPE)
24 l = p.stdout.readline()
33 elif l != '[FRAME]' and l != '[SIDE_DATA]' and l != '[/SIDE_DATA]':
35 if s[0] == 'pkt_pts_time':
36 frame[s[0]] = float(s[1])
37 elif s[0] == 'pkt_pts':
38 frame[s[0]] = float(s[1])