[FFmpeg-devel] [RCF] lavfi aspect ratio setting path

Stefano Sabatini stefano.sabatini-lala
Thu Nov 18 22:27:12 CET 2010


-aspect currently works by changing the PAR in the video encoder
context and in the output stream, thus readjusting the output DAR.

If the libavfilter is enabled, in output_packet() we have:
    if (ist->picref->video)
        ost->st->codec->sample_aspect_ratio = ist->picref->video->pi

so sample_aspect_ratio is set to the value in the filtered frame,
thus ignoring the value set with -aspect.

Workaround for this issue is either configure with --disable-avfilter
and use -aspect, or use the aspect filter.

I suggest to disable the -aspect option when using libavfilter, thus
forcing the users to employ the aspect filter. Alternatively we could
just drop support for -aspect in favor of libavfilter, but when that
approach made sense with the pad and crop options which were
"polluting" the ffmpeg code with much hard-to-maintain complex code,
this doesn't seem the case for the aspect option and I still want to
keep that option for users which for some reason (e.g. because of the
lavfi regressions) are using an ffmpeg compiled with
FFmpeg = Fierce and Frenzy Merciful Plastic Extroverse Game

More information about the ffmpeg-devel mailing list