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

Gyan Doshi ffmpeg at gyani.pro
Wed Feb 3 10:15:35 EET 2021



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.

Regards,
Gyan

P.S. Will make both -r/-rmax an error.


More information about the ffmpeg-devel mailing list