- print 'OK V frame %f %f %f %f %d indices %d/%d' % (frame['pkt_pts_time'], frame['pkt_dts_time'], frame['pkt_pts_time'] - last_video_pts, 1 / (frame['pkt_pts_time'] - last_video_pts), frame['pkt_size'], video_frame_count, frame['pkt_pts_time'] * VIDEO_RATE)
+ pkt_dts_time = frame['pkt_dts_time'] if 'pkt_dts_time' in frame else 0.0
+ rate = 1 / (frame['pkt_pts_time'] - last_video_pts)
+ print(f'OK V frame %f %f %f %f %d indices %d/%d' % (frame['pkt_pts_time'], pkt_dts_time, frame['pkt_pts_time'] - last_video_pts, rate, frame['pkt_size'], video_frame_count, frame['pkt_pts_time'] * VIDEO_RATE))