[FFmpeg-devel] [PATCH] avcodec/nvenc: Reconfigure resolution on-the-fly

Carl Eugen Hoyos ceffmpeg at gmail.com
Fri Mar 8 01:57:01 EET 2019


2019-03-06 15:57 GMT+01:00, Oliver Collyer <ovcollyer at mac.com>:
> Hi
>
> I needed the dynamic resolution changing feature of NVENC to be accessible
> through the ffmpeg libraries for a hobby project, so I added support and
> here is a patch.
>
> I will format this as a proper patch after any changes necessary following
> feedback.
>
> To use this feature you would need to:
>
> 1. Specify max_width and max_height before opening the encoder

Can't they be set to a maximum number to be as flexible as possible?


> +            av_log(avctx, AV_LOG_VERBOSE,
> +                "resolution change: %d x %d -> %d x %d\n",
> +                params.reInitEncodeParams.encodeWidth,
> +                params.reInitEncodeParams.encodeHeight,

> +                (uint32_t)avctx->width,
> +                (uint32_t)avctx->height);

These casts look strange and should be unneeded.

Carl Eugen


More information about the ffmpeg-devel mailing list