File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -188,7 +188,12 @@ def convert_video_to_images(
188188 for dir in downscale_dirs :
189189 dir .mkdir (parents = True , exist_ok = True )
190190
191- # We will construct the split size and outputs later per-frame based on whether [out0] is needed
191+ downscale_chain = (
192+ f"split={ num_downscales + 1 } "
193+ + "" .join ([f"[t{ i } ]" for i in range (num_downscales + 1 )])
194+ + ";"
195+ + ";" .join (downscale_chains )
196+ )
192197
193198 ffmpeg_cmd += " -vsync vfr"
194199
@@ -207,7 +212,7 @@ def convert_video_to_images(
207212 ffmpeg_cmd += " -pix_fmt bgr8"
208213 select_cmd = ""
209214
210- downscale_cmd = f' -filter_complex "{ select_cmd } { crop_cmd } "' + "" .join (
215+ downscale_cmd = f' -filter_complex "{ select_cmd } { crop_cmd } { downscale_chain } "' + "" .join (
211216 [f' -map "[out{ i } ]" "{ downscale_paths [i ]} "' for i in range (num_downscales + 1 )]
212217 )
213218
You can’t perform that action at this time.
0 commit comments