With either imagemagick or ffmpeg is there a way to crop a single image into separate images (put into an output folder) which are of same area (say 2000x500) but at say 20 pixel intervals down the y-axis? I will post an image explanation of what I am trying to achieve:
1 Answer
Let's say your input image is 1000x3000 and crop size is 1000x500. So we start from y=0 and end at y=2500. With a step of 10 px, we need 250 frames.
With ffmpeg,
ffmpeg -loop 1 -i input -vf crop=w=1000:h=500:x=0:y=n*10 -vframes 250 out%d.pngn is the frame index, starting from 0.