11 if frame['media_type'] == 'video':
12 if last_video_pts is not None and frame['pkt_pts_time'] <= last_video_pts:
13 print 'Out of order video frame %f is ahead of %f' % (frame['pkt_pts_time'], last_video_pts)
15 print 'OK frame %f' % frame['pkt_pts_time']
16 last_video_pts = frame['pkt_pts_time']
18 p = subprocess.Popen(shlex.split('ffprobe -show_frames %s' % sys.argv[1]), stdin=None, stdout=subprocess.PIPE)
21 l = p.stdout.readline()
30 elif l != '[FRAME]' and l != '[SIDE_DATA]' and l != '[/SIDE_DATA]':
32 if s[0] == 'pkt_pts_time':
33 frame[s[0]] = float(s[1])