aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2023-11-22 17:31:18 +0100
committerdec05eba <dec05eba@protonmail.com>2023-11-22 17:31:18 +0100
commit2f60f4c109f1bcc748d5f0d937476e8708a4073b (patch)
treeabbb2f6e8502c850e02b3c424468d9588831321e /src/main.cpp
parent6ace5405e4d5838a19f10cf11401df2016ce4645 (diff)
h264 vaapi quality 5
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 797c290..6ab0ef1 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -417,6 +417,8 @@ 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 / 10;
+ // TODO: Do this when not using cqp
+ //codec_context->rc_initial_buffer_occupancy = codec_context->bit_rate * 1000;
codec_context->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
@@ -735,7 +737,7 @@ static void open_video(AVCodecContext *codec_context, VideoQuality video_quality
if(codec_context->codec_id == AV_CODEC_ID_H264) {
av_dict_set(&options, "profile", "high", 0);
- av_dict_set_int(&options, "quality", 7, 0);
+ av_dict_set_int(&options, "quality", 5, 0); // quality preset
} else if(codec_context->codec_id == AV_CODEC_ID_AV1) {
av_dict_set(&options, "profile", "main", 0); // TODO: use professional instead?
av_dict_set(&options, "tier", "main", 0);