diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-11-05 17:49:49 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-11-05 17:49:49 +0100 |
commit | 74d30f16adb6debe1fa131bf20f1eaad16936af0 (patch) | |
tree | b8d4f22c48c60c17bafebf63e587d3e3eba38892 /src/main.cpp | |
parent | 030947e33ae609368c9ff2101dd2aa77009f4f92 (diff) |
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index 39a1b08..e98cf13 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -537,7 +537,7 @@ static AVCodecContext *create_video_codec_context(AVPixelFormat pix_fmt, codec_context->bit_rate = bitrate; codec_context->rc_max_rate = codec_context->bit_rate; //codec_context->rc_min_rate = codec_context->bit_rate; - //codec_context->rc_buffer_size = codec_context->bit_rate;//codec_context->bit_rate / 10; + codec_context->rc_buffer_size = codec_context->bit_rate;//codec_context->bit_rate / 10; codec_context->rc_initial_buffer_occupancy = 0;//codec_context->bit_rate;//codec_context->bit_rate * 1000; } else if(bitrate_mode == BitrateMode::VBR) { const int quality = vbr_get_quality_parameter(codec_context, video_quality, hdr); @@ -566,8 +566,10 @@ static AVCodecContext *create_video_codec_context(AVPixelFormat pix_fmt, codec_context->rc_max_rate = codec_context->bit_rate; //codec_context->rc_min_rate = codec_context->bit_rate; - //codec_context->rc_buffer_size = codec_context->bit_rate;//codec_context->bit_rate / 10; + codec_context->rc_buffer_size = codec_context->bit_rate;//codec_context->bit_rate / 10; codec_context->rc_initial_buffer_occupancy = codec_context->bit_rate;//codec_context->bit_rate * 1000; + } else { + //codec_context->rc_buffer_size = 50000 * 1000; } //codec_context->profile = FF_PROFILE_H264_MAIN; if (codec_context->codec_id == AV_CODEC_ID_MPEG1VIDEO) |