[FFmpeg-user] Crop, Scale, Pad without distortion

Devin Heitmueller dheitmueller at kernellabs.com
Tue Jan 28 01:14:36 EET 2020

On Mon, Jan 27, 2020, 5:05 PM Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:

> Hans wants to crop black bars so above will not (completely) work for
> him...
> Carl Eugen

FWIW, I've done a bunch of aspect ratio conversion based on AFD (including
cropping out letterbox/pillarbars and dealing with nonsquare pixels), and
I've had the best success with crop->pad->scale.  There is also at least
one bug in the scale filter where it doesn't properly handle upstream
filters changing the properties of the the scaler input link, which causes
incorrect scaling.

I've got a tree which addresses those issues.  Let me know if you want a

Almost all of those issues come down to sar/dar problems, so you should
turn up the logging and look at the sar for each link in the filter graph
to debug.



More information about the ffmpeg-user mailing list