11 hours ago
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.
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.