[FFmpeg-devel] [PATCH] Ensure scaled video is divisible by n

Paul B Mahol onemda at gmail.com
Wed Jul 3 19:04:26 EEST 2019


On 7/3/19, Lars Kiesow <lkiesow at uos.de> wrote:
> Hi Paul,
>
>> >      { "force_original_aspect_ratio", "decrease or increase w/h if
>> > necessary to keep the original AR",
>> > OFFSET(force_original_aspect_ratio), AV_OPT_TYPE_INT, { .i64 = 0},
>> > 0, 2, FLAGS, "force_oar" },
>> > +    { "force_divisible_by", "enforce that the output resolution is
>> > divisible by a defined integer", OFFSET(force_divisible_by),
>> > AV_OPT_TYPE_INT, { .i64 = 1}, 0, 256, FLAGS, "force_oar" },
>>
>> Are you sure you need "force_oar" ?
>> If not, move it bellow 3 lines.
>
> I'm honestly not sure since I don't know what it's used for ;-)
>
> From the AVOption Struct docs, I assumed that this should have the same
> value as in force_original_aspect_ratio since it's used in the same
> context. But it does work without and I can remove it if you want me to.
> Should I?

Yes, Look at belllow 3 lines, they have "force_oar" at end, because
that gives special meaning to values.

Your option should not have these.

To confirm these, run "ffmpeg -h filter=scale" before and after you removed it.

>
> Best regards,
> Lars
>


More information about the ffmpeg-devel mailing list