]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/nvenc.c
Merge commit '74383def8f46805faf3391c98516b248108a9a6b'
[ffmpeg] / libavcodec / nvenc.c
index bcafc20c033e612a892b797435b32d3aae8251a1..104aea0fd493ae3633883e91f4f429a99422146d 100644 (file)
@@ -798,6 +798,14 @@ static av_cold int nvenc_encode_init(AVCodecContext *avctx)
                 ctx->encode_config.encodeCodecConfig.h264Config.fmoMode = NV_ENC_H264_FMO_DISABLE;
             }
         }
+
+        if (avctx->codec->id == AV_CODEC_ID_H264) {
+            ctx->encode_config.encodeCodecConfig.h264Config.outputBufferingPeriodSEI = 1;
+            ctx->encode_config.encodeCodecConfig.h264Config.outputPictureTimingSEI = 1;
+        } else if(avctx->codec->id == AV_CODEC_ID_H265) {
+            ctx->encode_config.encodeCodecConfig.hevcConfig.outputBufferingPeriodSEI = 1;
+            ctx->encode_config.encodeCodecConfig.hevcConfig.outputPictureTimingSEI = 1;
+        }
     } else if (avctx->global_quality > 0) {
         ctx->encode_config.rcParams.rateControlMode = NV_ENC_PARAMS_RC_CONSTQP;
         ctx->encode_config.rcParams.constQP.qpInterB = avctx->global_quality;