[FFmpeg-devel] [PATCH v2 1/3] ffmpeg_opt: pass output framerate as a hint to the encoder

Tobias Rapp t.rapp at noa-archive.com
Mon Feb 20 15:40:10 EET 2017


On 13.02.2017 08:51, Tobias Rapp wrote:
> On 06.02.2017 13:33, Tobias Rapp wrote:
>> Sets framerate field in output codec context if explicitly specified on
>> the command-line.
>>
>> Signed-off-by: Tobias Rapp <t.rapp at noa-archive.com>
>> ---
>>  ffmpeg_opt.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
>> index 6a47d32..3b532da 100644
>> --- a/ffmpeg_opt.c
>> +++ b/ffmpeg_opt.c
>> @@ -1535,6 +1535,8 @@ static OutputStream
>> *new_video_stream(OptionsContext *o, AVFormatContext *oc, in
>>          av_log(NULL, AV_LOG_FATAL, "Invalid framerate value: %s\n",
>> frame_rate);
>>          exit_program(1);
>>      }
>> +    if (frame_rate && ost->frame_rate.num && ost->frame_rate.den)
>> +        video_enc->framerate = ost->frame_rate;
>>      if (frame_rate && video_sync_method == VSYNC_PASSTHROUGH)
>>          av_log(NULL, AV_LOG_ERROR, "Using -vsync 0 and -r can produce
>> invalid output files\n");
>>
>
> Ping on the patch series.

Ping. Having better bitrate estimation improves automatic AVI index 
space reservation (commit e65db4ce5966506d957032ef30545419801ae7dc) for 
non-constant bitrate use-cases.

Regards,
Tobias



More information about the ffmpeg-devel mailing list