2

I am trying to pan a video with FFMPEG using the crop filter. I am using the x and y parameters along with the input frame number, n, to change the position of the cropped region on a per-frame basis.

Using ffmpeg 4.2 on Windows 10, for example:

.\ffmpeg.exe -i .\trim.mp4 -filter_complex "[0:v]crop=x=0.5*n:y=0.25*n:w=1280:h=720[v]" -map "[v]" out.mp4

I am running into an issue where the output video appears to "jitter"/"shake". I would like to be able to perform a "smooth" pan on the video.

I have seen others suggest a workaround entailing first upscaling the video, performing the crop in the upscaled coordinate space, and then downscaling at the end. This does seem to work (depending on how much I upscale prior), but I have speed/memory concerns, especially for 4k videos.

Is there currently another way I can achieve a "smooth" pan using FFMPEG?

0

You must log in to answer this question.

Browse other questions tagged .