Would it be possible to add two new filters, from latest avfilter?
They are, fieldorder and fillborders.
From the official documentation:
Transform the field order of the input video.
It accepts the following parameters:
The output field order. Valid values are tff for top field first or bff for bottom field first.
The default value is ‘tff’.
The transformation is done by shifting the picture content up or down by one line,
and filling the remaining line with appropriate picture content.
This method is consistent with most broadcast field order converters.
If the input video is not flagged as being interlaced,
or it is already flagged as being of the required output field order,
then this filter does not alter the incoming video.
It is very useful when converting to or from PAL DV material, which is bottom field first.
Fill borders of the input video, without changing video stream dimensions. Sometimes video can have garbage at the four edges and you may not want to crop video input to keep size multiple of some number.
This filter accepts the following options:
left: Number of pixels to fill from left border.
right: Number of pixels to fill from right border.
top: Number of pixels to fill from top border.
bottom: Number of pixels to fill from bottom border.
Set fill mode.
It accepts the following values:
‘smear’: fill pixels using outermost pixels
‘mirror’: fill pixels using mirroring
‘fixed’: fill pixels with constant value
Default is smear.
Set color for pixels in fixed mode. Default is black.
This has several uses:
Sometimes the video has rubbish on the edges, we want to get rid of it but keep the video’s dimensions unchanged so cropping is not an option.
We even have an option of “mode”, i.e. a solid border or filling with copies of the outermost pixels.
When using the BLUR filter, it adds a strange effect on the edges, not always acceptable.
The fillborders filter can then be used to hide/mask this.
Create a simple “drop shadow” effect.
Can in it’s self be used as an extra blur/smear effect. Set top,bottom,left and right each to half of video’s dimensions and we get a strange blur/smear effect.
Create a border on any (or all 4) sides of a video of any colour and width.
Hoping you give some consideration to these two filters, as I believe they could be useful.