summaryrefslogtreecommitdiff
path: root/libavcodec/nvenc.c
diff options
context:
space:
mode:
authorTimo Rothenpieler <timo@rothenpieler.org>2016-05-11 10:34:31 +0200
committerTimo Rothenpieler <timo@rothenpieler.org>2016-05-11 10:34:31 +0200
commit3a9df7dfec89fadfee9e814e6adb2706908dffa4 (patch)
tree74e7561afe5eb05869fabc31855b42f9017e3e73 /libavcodec/nvenc.c
parentc8c14d0ffc51c52847899a8a473495e7112a87aa (diff)
avcodec/nvenc: Generate bufferingPeriod/pictureTiming SEI
For some unknown reason enabling these causes propper CBR padding, so as there are no known downsides just always enable them in CBR mode.
Diffstat (limited to 'libavcodec/nvenc.c')
-rw-r--r--libavcodec/nvenc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index bcafc20c03..4d4a647bb7 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -796,6 +796,11 @@ static av_cold int nvenc_encode_init(AVCodecContext *avctx)
if (avctx->codec->id == AV_CODEC_ID_H264) {
ctx->encode_config.encodeCodecConfig.h264Config.adaptiveTransformMode = NV_ENC_H264_ADAPTIVE_TRANSFORM_ENABLE;
ctx->encode_config.encodeCodecConfig.h264Config.fmoMode = NV_ENC_H264_FMO_DISABLE;
+ 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) {