[FFmpeg-devel] [PATCH 1/2] avfilter/vf_fps: add way to get CFR output without knowing input frame rate

Moritz Barsnick barsnick at gmx.net
Tue Oct 29 16:32:47 EET 2019


On Tue, Oct 29, 2019 at 14:47:43 +0100, Paul B Mahol wrote:
> +    { "input", "use input framerate is available", OFFSET(input), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, V|F },

I assume you meant:
is -> if

> -    av_log(ctx, AV_LOG_VERBOSE, "fps=%d/%d\n", s->framerate.num, s->framerate.den);
> +    if (!s->input)
> +        av_log(ctx, AV_LOG_VERBOSE, "fps=%d/%d\n", s->framerate.num, s->framerate.den);

Could it still be reported elsewhere? Like down there:

> +    if (s->input && inlink->frame_rate.num > 0 && inlink->frame_rate.den > 0) {
> +        outlink->time_base  = av_inv_q(inlink->frame_rate);
> +        outlink->frame_rate = inlink->frame_rate;
> +    } else {
>      outlink->time_base  = av_inv_q(s->framerate);
>      outlink->frame_rate = s->framerate;
> +    }

Now the used framerate is known, could be reported here?

Moritz


More information about the ffmpeg-devel mailing list