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

pkv.stream pkv.stream at gmail.com
Thu May 3 01:09:38 EEST 2018

Le 02/05/2018 à 11:58 PM, Timo Rothenpieler a écrit :
> Am 02.05.2018 um 23:18 schrieb pkv.stream:
>> Hello,
>> The patch enables dynamic bitrate through ReconfigureEncoder method 
>> from nvenc API.
>> This is useful for live streaming in case of network congestion.
>> A similar patch for changing aspect ratio dynamically was previously 
>> submitted by Miroslav Slugen:
>> https://patchwork.ffmpeg.org/patch/2523/
>> but apparently was forgotten.
>> Thanks.
> I indeed forgot that old patch. I will rebase and apply it first, so 
> this patch will need some rebasing as well.
> One note about the patch: doing the capability check on every single 
> frame seems wasteful. I'm not sure how slow it is, but I'd expect it 
> to be not free.
> So doing that check once in the beginning with all the other cap 
> checks and storing it somewhere would be better.
thanks for your feedback.
I was not sure of whether to put the capability check with the others in 
nvenc_check_capabilities because if the cap is missing this would remove 
the encoder altogether:

ex: ln. 453 :     if ((ret = nvenc_check_capabilities(avctx)) < 0)
                         goto fail3;

I'll move it there then or if you think it's preferrable, I can move it 
to ff_nvenc_encode_init and store it.
Which option do you prefer ? I'll resubmit and rebase once the other 
patch is committed.


> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

More information about the ffmpeg-devel mailing list