Zend certified PHP/Magento developer

Using different output size for ffmpeg “geq”

I am trying to use ffmpeg to create a video zooming in on part of a large (7074×7056) still image.

The “zoompan” filter does more or less the right thing, but can’t zoom in far enough.

So I’m taking an approach from Use of “geq” as a “zoompan” alternative, where I select pixels from the source image for each pixel of the output. Currently I have a command like this:

ffmpeg -i bigimage.png -filter_complex "
loop=loop=-1:size=2,
geq='p(5283/250*N+X/7074*(7074-7038/250*N),118/250*N+Y/7056*(7056-7020/250*N))',
scale=1024x1024
" -t 10 -c:v libx264 out.mp4

This more-or-less works, but “geq” is setting all the pixels in a 7074×7056 pixel video, which then gets scaled down to 1024×1024, and the scaling is suboptimal.

It would be much better if I could just use “geq” to set the 1024×1024 pixels I actually want.

Is there any way I can set the output size, so that X and Y range from 0 to 1024 within the “geq” equation, but without scaling the input, so I can still refer to coordinates from 0 to 7074 or 0 to 7056 within p(x,y)?