diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp index 39a1b08..0366b3e 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) @@ -810,9 +812,9 @@ static void open_video_software(AVCodecContext *codec_context, VideoQuality vide if(bitrate_mode == BitrateMode::QP) video_software_set_qp(codec_context, video_quality, hdr, &options); - av_dict_set(&options, "preset", "fast", 0); + av_dict_set(&options, "preset", "veryfast", 0); + av_dict_set(&options, "tune", "film", 0); dict_set_profile(codec_context, GSR_GPU_VENDOR_INTEL, color_depth, &options); - av_dict_set(&options, "tune", "zerolatency", 0); if(codec_context->codec_id == AV_CODEC_ID_H264) { av_dict_set(&options, "coder", "cabac", 0); // TODO: cavlc is faster than cabac but worse compression. Which to use? |