[FFmpeg-devel] [PATCH] avfilter: add setfps filter

Moritz Barsnick barsnick at gmx.net
Wed Oct 14 14:14:58 CEST 2015


On Tue, Sep 29, 2015 at 23:39:10 +0200, Paul B Mahol wrote:
> +static const AVOption setfps_options[] = {
> +    { "fps", "A string describing desired output framerate", OFFSET(framerate), AV_OPT_TYPE_VIDEO_RATE, { .str = "25" }, .flags = V|F },

I know this is taken 1:1 from the fps filter, but it seems more verbose
than what other filters care to say about this. The longer I think
about it, this is probably better than what the others say. :-)

General grudge: Not a single filter's documentation points to section
"Video rate", which describes the strings and ratios, while "Video
size" is referenced very often:
@ref{video size syntax,,"Video size" section in the ffmpeg-utils manual,ffmpeg-utils}. 
I think this calls for some improvement. (OT, sorry.)

> +    .description = NULL_IF_CONFIG_SMALL("Set framerate for video output link."),

Also perhaps too verbose here. Don't video filters (x->V) always do
something for the video output link? Seems redundant.

At least an entry in doc/filters.texi would be needed, saying
approximately what you told me in the thread (i.e. what's the use and
what's the difference to the fps filter).

Otherwise: Works fine for me on CFR input, nice way of speeding up or
slowing down without doing PTS math. Not tested on VFR input (where it
probably makes even more sense in many cases).

Moritz


More information about the ffmpeg-devel mailing list