From 944de60b3215fc15e8829ab7ecfbf4653c09fba8 Mon Sep 17 00:00:00 2001 From: hzwer <598460606@163.com> Date: Sun, 15 Nov 2020 18:15:06 +0800 Subject: [PATCH] Fix bug --- inference_mp4_2x.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/inference_mp4_2x.py b/inference_mp4_2x.py index 166cebc..15442ec 100644 --- a/inference_mp4_2x.py +++ b/inference_mp4_2x.py @@ -35,9 +35,9 @@ tot_frame = videoCapture.get(cv2.CAP_PROP_FRAME_COUNT) print('{}.mp4, {} frames in total, {}FPS to {}FPS'.format(args.video[:-4], tot_frame, fps, 2*fps)) pbar = tqdm(total=tot_frame) if args.montage: - output = cv2.VideoWriter('{}_2x.mp4'.format(args.video[:-4]), fourcc, fps*3, (2*w, h)) + output = cv2.VideoWriter('{}_2x.mp4'.format(args.video[:-4]), fourcc, fps*2, (2*w, h)) else: - output = cv2.VideoWriter('{}_2x.mp4'.format(args.video[:-4]), fourcc, fps*3, (w, h)) + output = cv2.VideoWriter('{}_2x.mp4'.format(args.video[:-4]), fourcc, fps*2, (w, h)) frame = frame while success: lastframe = frame @@ -60,9 +60,9 @@ while success: output.write(lastframe) output.write(mid[:h, :w]) pbar.update(1) - if args.montage: - output.write(np.concatenate((lastframe, lastframe), 1)) - else: - output.write(lastframe) +if args.montage: + output.write(np.concatenate((lastframe, lastframe), 1)) +else: + output.write(lastframe) pbar.close() output.release()