[FFmpeg-devel] [PATCH] avfilter/vf_pad: add aspect option

Ricardo Constantino wiiaboo at gmail.com
Mon Apr 3 22:23:34 EEST 2017


On 3 April 2017 at 20:04, Paul B Mahol <onemda at gmail.com> wrote:

> On 4/3/17, Ricardo Constantino <wiiaboo at gmail.com> wrote:
> > On 3 April 2017 at 19:58, Paul B Mahol <onemda at gmail.com> wrote:
> >
> >>
> >> Yes, but that conflict with expand behaviour.
> >>
> >>
> > How so? Still works fine with squared pixels:
> > $ ffmpeg -f lavfi -i "color=s=hd720" -vf pad=aspect=4/3 -vframes 1 -f
> null
> > - -v verbose 2>&1 | grep Parsed_pad
> > [Parsed_pad_0 @ 000001c953343940] w:1280 h:720 -> w:1280 h:960 x:0 y:0
> > color:0x000000FF
>
> I mean this:
>
> mpv ~/Videos/derf/akiyo_cif.y4m -vf lavfi="[setsar=40/33],expand=
> aspect=16/9"
>
> mpv ~/Videos/derf/akiyo_cif.y4m -vf
> lavfi="[setsar=40/33,pad=x=(ow-iw)/2:y=(oh-ih)/2:aspect=16/9]"
>
> Gives different padding when using div instead of mul.
>
>
Oh, correct. mpv's expand also worked wrong with non-square pixels.
That's exactly why I had the idea to experiment with div instead of mul and
that did the proper expand/pad.


More information about the ffmpeg-devel mailing list