Bug fix: video write failure on $pred_only == True (#4)
Browse files- Bug fix: video write failure on $pred_only == True (a1546aee4023ac3fbde9d69ac11b6094e8d57764)
Co-authored-by: Daniel Panfili <danpanfili@users.noreply.huggingface.co>
58 unmodified lines59606162636458 unmodified linesframe_rate = int(raw_video.get(cv2.CAP_PROP_FPS))output_width = frame_width * 2 + margin_widthoutput_path = os.path.join(args.outdir, os.path.splitext(os.path.basename(filename))[0] + '.mp4')out = cv2.VideoWriter(output_path, cv2.VideoWriter_fourcc(*"mp4v"), frame_rate, (output_width, frame_height))58 unmodified lines596061626364656667686958 unmodified linesframe_rate = int(raw_video.get(cv2.CAP_PROP_FPS))output_width = frame_width * 2 + margin_widthif args.pred_only:output_width = frame_widthelse:output_width = frame_width * 2 + margin_widthoutput_path = os.path.join(args.outdir, os.path.splitext(os.path.basename(filename))[0] + '.mp4')out = cv2.VideoWriter(output_path, cv2.VideoWriter_fourcc(*"mp4v"), frame_rate, (output_width, frame_height))
run_video.py+5