Crop image twice ffmpeg

0

I have an image 4000x4500, and I'm trying to crop this single image twice, both crops need to be 4000x2250, I want the first crop to be of the top half, and the second to be the bottom half

I've got these two commands to do what I want, but I need them to do it in one action, not two; because I'm trying to batch process multiple files.

Top script:

ffmpeg.exe -i "Input.png" -vf crop=w=4000:h=2050:x=0:y=0 "Output_Left.png"

Bottom script:

ffmpeg.exe -i "Input.png" -vf crop=w=4000:h=2050:x=4000:y=2250 "Output_Right.png"

MarcusJ

Posted 2014-12-30T23:23:15.293

Reputation: 1 947

Answers

0

This version handles wildcards properly

for %%a in ("*.png") do ("ffmpeg.exe" -i "%%a" -vf crop=w=4000:h=2050:x=0:y=0  "%%~na_Left.png" -i "%%a" -vf crop=w=4000:h=2050:x=4000:y=2250 "%%~na_Right.png")

MarcusJ

Posted 2014-12-30T23:23:15.293

Reputation: 1 947