Fixed incorrect ffmpeg command construction (#1645)

Co-authored-by: jackson-waschura <jwaschur@calpoly.edu>
This commit is contained in:
Jackson Waschuraandjackson-waschura authored and GitHub committed 2023-03-21 11:48:43 -07:00
1 parent 81e39cb276
commit c65760121f
1 file changed
+3 -1
@@ -159,7 +159,9 @@ def convert_video_to_images(
ffmpeg_cmd += f" -vf thumbnail={spacing},setpts=N/TB{crop_cmd} -r 1"
else:
CONSOLE.print("[bold red]Can't satisfy requested number of frames. Extracting all frames.")
ffmpeg_cmd += f" -pix_fmt bgr8 -vf {crop_cmd[1:]}"
ffmpeg_cmd += " -pix_fmt bgr8"
if crop_cmd != "":
ffmpeg_cmd += f" -vf {crop_cmd[1:]}"
ffmpeg_cmd += f" {out_filename}"
run_command(ffmpeg_cmd, verbose=verbose)