[FFmpeg-devel] [PATCH v4]avocdec/nvenc: Reconfigure bitrate on the fly

pkv.stream pkv.stream at gmail.com
Thu May 3 22:52:25 EEST 2018


Le 03/05/2018 à 7:43 PM, Timo Rothenpieler a écrit :
> Am 03.05.2018 um 09:51 schrieb pkv.stream:
>> Hi,
>> in previous versions ReconfigureEncoder was called at each frame once 
>> bitrate was changed.
>> Fixed that.
>> The patch was rebased against 
>> https://github.com/BtbN/FFmpeg/commit/4e8265e3a63a71a40730e8eb575d8aa760bdcddc 
>
>
> Slightly modified the approach and pushed it here:
> https://github.com/BtbN/FFmpeg/commit/660a137b4dad03e6b9f5f87b5ff946ced297a7f2 
>

thanks a lot for the marked improvements !

for dynamic resolution, maybe add a check ?

ctx->support_dyn_res = nvenc_check_cap(avctx, 
NV_ENC_CAPS_SUPPORT_DYN_RES_CHANGE);

and:
if (dw != ctx->init_encode_params.darWidth || dh != 
ctx->init_encode_params.darHeight)

==>
if ( (dw != ctx->init_encode_params.darWidth || dh != 
ctx->init_encode_params.darHeight) && ctx->support_dyn_res)

Regards



More information about the ffmpeg-devel mailing list