This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

[Feature Request] FFMpeg 'pad' command
#1
I would like to request the implementation of the equivalent of FFMpeg's 'pad' filter (https://ffmpeg.org/ffmpeg-filters.html#pad-1).  Pad is a valuable tool for use in cropping and repositioning a video stream within a frame.  Most often it is used in conjunction with crop and letterbox.

Pad is essentially a combination 2D translation and padding tool in one.  The user specifies the dimensions of an empty frame, then places (translates) the cropped video into the empty frame at a specified position (using the coordinate of the upper left corner of the video as the origin).  The remaining empty space is set to black by default, but can be any specified color.  The end result is a video with letterboxing.  Most useful for cases where the cropping of the video is assymetrical, or the results of cropping produces a dimension that is incompatible with the output resolution and you cannot resize/scale the cropped video to fit the output resolution.

Example:

A 720 x 480 video is cropped to 696 x 472 because of garbage/noise on the perimeter.  Resizing the cropped video would introduce too much distortion.  Pad would define a new empty 720 x 480 frame, then position the 696 x 472 video within that frame leaving black borders on all sides where the video does not fill it.  The result is the cropped video is centered vertically and horizontally (by default, but can be overriden with parameter adjustments) leaving a nice clean presentation with minimal hassle to the user as they don't have to do complicated math to figure out the DAR, SAR, PAR, and all the other settings.  Significantly easier to use than Hybrid's current letterboxing solution.

I don't use FFMpeg for much these days, but when I do, 'pad' is heavily involved.  This is one area Hybrid could use improvement.
Reply


Messages In This Thread
[Feature Request] FFMpeg 'pad' command - by mantom - Today, 02:20

Forum Jump:


Users browsing this thread: 1 Guest(s)