Apr 21

Ffmpeg incorrect top pad size

Category: Linux,multimedia   — Published by tengo on April 21, 2008 at 5:11 am

If you do letterboxing or cropping on your video with ffmpeg, you might get this error:

"incorrect top pad size"

In this case you managed to somehow screw up the values passed to ffmpeg for resizing/padding. Have a look at your command. If you are using a script to call ffmpeg, check the algorithm that computes the values. In my case, I was passing a negative value as padding - no surprise ffmpeg complained...

(I discovered this while developing the code to transcode any video with letterboxing/pillarboxing with ffmpeg.)