[FFmpeg-devel] Re: [PATCH v2] ffmpeg: add -rmax to clamp output framerate

Anton Khirnov anton at khirnov.net
Wed Feb 3 13:00:13 EET 2021


Quoting Gyan Doshi (2021-02-03 10:58:36)
> 
> 
> On 03-02-2021 03:20 pm, Anton Khirnov wrote:
> > Quoting Gyan Doshi (2021-02-03 09:15:35)
> >>
> >> On 03-02-2021 01:41 pm, Anton Khirnov wrote:
> >>> Quoting Gyan Doshi (2021-02-01 14:22:27)
> >>>> Useful when encoding in batch or with aberrant inputs.
> >>>> ---
> >>>>    doc/ffmpeg.texi      |  7 +++++++
> >>>>    fftools/ffmpeg.c     |  7 ++++++-
> >>>>    fftools/ffmpeg.h     |  3 +++
> >>>>    fftools/ffmpeg_opt.c | 24 +++++++++++++++++++++---
> >>>>    4 files changed, 37 insertions(+), 4 deletions(-)
> >>>>
> >>>> Forgot to nullify rmax with r set.
> >>>>
> >>>> diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi
> >>>> index 8eb012b7c0..7726f25082 100644
> >>>> --- a/doc/ffmpeg.texi
> >>>> +++ b/doc/ffmpeg.texi
> >>>> @@ -759,6 +759,13 @@ If in doubt use @option{-framerate} instead of the input option @option{-r}.
> >>>>    As an output option, duplicate or drop input frames to achieve constant output
> >>>>    frame rate @var{fps}.
> >>>>    
> >>>> + at item -rmax[:@var{stream_specifier}] @var{fps} (@emph{output,per-stream})
> >>> Name could be more descriptive, "rmax" does not tell you much. How about
> >>> -framerate_clamp or something along these lines?
> >>>
> >> We use -r for video framerate, so -rmax is intuitive. But -fpsmax can
> >> also work.
> > IIUC this option is useful only under quite specific circumstances. In
> > such a case, I think it's better to use longer more descriptive names.
> How about fpsmax? framerate_clamp is too long.

Fine with me.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list