diff options
author | dec05eba <dec05eba@protonmail.com> | 2022-04-06 01:47:42 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2022-04-06 01:47:42 +0200 |
commit | 94af0aeec41dcb60663d3c0448ef1caa7fbeebe2 (patch) | |
tree | a11353af5386ee3585a928fdb2609445d6f48cff /src | |
parent | ed15405d2fb1ea651cae238f2c339f91bfed32b5 (diff) |
Reduce bitrate. It was way too high
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/main.cpp b/src/main.cpp index 469e779..e76f60b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -441,29 +441,29 @@ static AVCodecContext *create_video_codec_context(AVFormatContext *av_format_con switch(video_quality) { case VideoQuality::MEDIUM: codec_context->bit_rate = 5000000 + (codec_context->width * codec_context->height) / 2; - codec_context->qmin = 17; - codec_context->qmax = 25; + codec_context->qmin = 30; + codec_context->qmax = 51; //av_opt_set(codec_context->priv_data, "preset", "slow", 0); //av_opt_set(codec_context->priv_data, "profile", "high", 0); //codec_context->profile = FF_PROFILE_H264_HIGH; - av_opt_set(codec_context->priv_data, "preset", "p4", 0); + //av_opt_set(codec_context->priv_data, "preset", "p4", 0); break; case VideoQuality::HIGH: - codec_context->qmin = 12; - codec_context->qmax = 18; + codec_context->qmin = 20; + codec_context->qmax = 40; //av_opt_set(codec_context->priv_data, "preset", "slow", 0); //av_opt_set(codec_context->priv_data, "profile", "high", 0); //codec_context->profile = FF_PROFILE_H264_HIGH; - av_opt_set(codec_context->priv_data, "preset", "p5", 0); + //av_opt_set(codec_context->priv_data, "preset", "p5", 0); break; case VideoQuality::ULTRA: codec_context->bit_rate = 10000000 + (codec_context->width * codec_context->height) / 2; - codec_context->qmin = 12; - codec_context->qmax = 18; + codec_context->qmin = 16; + codec_context->qmax = 30; //av_opt_set(codec_context->priv_data, "preset", "veryslow", 0); //av_opt_set(codec_context->priv_data, "profile", "high", 0); //codec_context->profile = FF_PROFILE_H264_HIGH; - av_opt_set(codec_context->priv_data, "preset", "p7", 0); + //av_opt_set(codec_context->priv_data, "preset", "p7", 0); break; } if (codec_context->codec_id == AV_CODEC_ID_MPEG1VIDEO) @@ -471,7 +471,7 @@ static AVCodecContext *create_video_codec_context(AVFormatContext *av_format_con // stream->time_base = codec_context->time_base; // codec_context->ticks_per_frame = 30; - av_opt_set(codec_context->priv_data, "tune", "hq", 0); + //av_opt_set(codec_context->priv_data, "tune", "hq", 0); //av_opt_set(codec_context->priv_data, "rc", "vbr", 0); // Some formats want stream headers to be seperate |