diff --git a/inference_video.py b/inference_video.py index 7cd55cc..ad2f21a 100644 --- a/inference_video.py +++ b/inference_video.py @@ -42,7 +42,7 @@ if args.png: os.mkdir('output') else: video_path_wo_ext, ext = os.path.splitext(args.video) - output = cv2.VideoWriter('{}_{}X_{}fps.{}'.format(video_path_wo_ext, args.times, args.fps, args.ext), fourcc, args.fps, (w, h)) + output = cv2.VideoWriter('{}_{}X_{}fps.{}'.format(video_path_wo_ext, args.times, int(np.round(args.fps)), args.ext), fourcc, args.fps, (w, h)) cnt = 0 def writeframe(frame): diff --git a/inference_video_parallel.py b/inference_video_parallel.py index 45d4036..6af2a64 100644 --- a/inference_video_parallel.py +++ b/inference_video_parallel.py @@ -41,7 +41,7 @@ if args.png: os.mkdir('output') else: video_path_wo_ext, ext = os.path.splitext(args.video) - output = cv2.VideoWriter('{}_{}X_{}fps.{}'.format(video_path_wo_ext, args.times, args.fps, args.ext), fourcc, args.fps, (w, h)) + output = cv2.VideoWriter('{}_{}X_{}fps.{}'.format(video_path_wo_ext, args.times, int(np.round(args.fps)), args.ext), fourcc, args.fps, (w, h)) cnt = 0 skip_frame = 1