[FFmpeg-devel] nvenc/cuda force IDR

Grant Brownewell gbrownewell at InXpo.com
Wed Oct 12 17:15:36 EEST 2016


I've been experimenting with encoding with a  cuda card, and I noticed that setting the pict_type member of the AVFrame structure to AV_PICTURE_TYPE_I does not trigger it to encode the next frame as an IDR frame as libx264 does. I looked at the nvidia docs and it appears there is a mechanism for this behavior.

To force the current frame to be encoded as IDR frame, set

Nvenc_encode_frame in nvenc.c doesn't inspect the pict_type member of the incoming AVFrame and set the corresponding NV_ENC_PIC_FLAG_* values.

Is this functionality not present because it doesn't work or just an unintentional omission? I understand patches are always welcome but I wanted to connect with you all before attempting such a patch. Am I on the right track?

Thanks for all your work, ffmpeg is truly amazing.

More information about the ffmpeg-devel mailing list