aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/main.cpp b/src/main.cpp
index a628599..39a1b08 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -585,7 +585,7 @@ static AVCodecContext *create_video_codec_context(AVPixelFormat pix_fmt,
codec_context->global_quality = 120 * quality_multiply;
break;
case VideoQuality::VERY_HIGH:
- codec_context->global_quality = 100 * quality_multiply;
+ codec_context->global_quality = 115 * quality_multiply;
break;
case VideoQuality::ULTRA:
codec_context->global_quality = 90 * quality_multiply;
@@ -600,7 +600,7 @@ static AVCodecContext *create_video_codec_context(AVPixelFormat pix_fmt,
codec_context->global_quality = 30 * quality_multiply;
break;
case VideoQuality::VERY_HIGH:
- codec_context->global_quality = 20 * quality_multiply;
+ codec_context->global_quality = 25 * quality_multiply;
break;
case VideoQuality::ULTRA:
codec_context->global_quality = 10 * quality_multiply;
@@ -615,7 +615,7 @@ static AVCodecContext *create_video_codec_context(AVPixelFormat pix_fmt,
codec_context->global_quality = 30 * quality_multiply;
break;
case VideoQuality::VERY_HIGH:
- codec_context->global_quality = 20 * quality_multiply;
+ codec_context->global_quality = 25 * quality_multiply;
break;
case VideoQuality::ULTRA:
codec_context->global_quality = 10 * quality_multiply;
@@ -779,10 +779,10 @@ static void video_software_set_qp(AVCodecContext *codec_context, VideoQuality vi
av_dict_set_int(options, "qp", 30 * qp_multiply, 0);
break;
case VideoQuality::VERY_HIGH:
- av_dict_set_int(options, "qp", 23 * qp_multiply, 0);
+ av_dict_set_int(options, "qp", 25 * qp_multiply, 0);
break;
case VideoQuality::ULTRA:
- av_dict_set_int(options, "qp", 20 * qp_multiply, 0);
+ av_dict_set_int(options, "qp", 22 * qp_multiply, 0);
break;
}
} else {
@@ -873,7 +873,7 @@ static void video_hardware_set_qp(AVCodecContext *codec_context, VideoQuality vi
av_dict_set_int(options, "qp", 30 * qp_multiply, 0);
break;
case VideoQuality::VERY_HIGH:
- av_dict_set_int(options, "qp", 25 * qp_multiply, 0);
+ av_dict_set_int(options, "qp", 27 * qp_multiply, 0);
break;
case VideoQuality::ULTRA:
av_dict_set_int(options, "qp", 22 * qp_multiply, 0);
@@ -882,16 +882,16 @@ static void video_hardware_set_qp(AVCodecContext *codec_context, VideoQuality vi
} else if(codec_context->codec_id == AV_CODEC_ID_H264) {
switch(video_quality) {
case VideoQuality::MEDIUM:
- av_dict_set_int(options, "qp", 34 * qp_multiply, 0);
+ av_dict_set_int(options, "qp", 35 * qp_multiply, 0);
break;
case VideoQuality::HIGH:
av_dict_set_int(options, "qp", 30 * qp_multiply, 0);
break;
case VideoQuality::VERY_HIGH:
- av_dict_set_int(options, "qp", 23 * qp_multiply, 0);
+ av_dict_set_int(options, "qp", 27 * qp_multiply, 0);
break;
case VideoQuality::ULTRA:
- av_dict_set_int(options, "qp", 20 * qp_multiply, 0);
+ av_dict_set_int(options, "qp", 22 * qp_multiply, 0);
break;
}
} else if(codec_context->codec_id == AV_CODEC_ID_HEVC) {
@@ -903,7 +903,7 @@ static void video_hardware_set_qp(AVCodecContext *codec_context, VideoQuality vi
av_dict_set_int(options, "qp", 30 * qp_multiply, 0);
break;
case VideoQuality::VERY_HIGH:
- av_dict_set_int(options, "qp", 25 * qp_multiply, 0);
+ av_dict_set_int(options, "qp", 27 * qp_multiply, 0);
break;
case VideoQuality::ULTRA:
av_dict_set_int(options, "qp", 22 * qp_multiply, 0);
@@ -918,7 +918,7 @@ static void video_hardware_set_qp(AVCodecContext *codec_context, VideoQuality vi
av_dict_set_int(options, "qp", 30 * qp_multiply, 0);
break;
case VideoQuality::VERY_HIGH:
- av_dict_set_int(options, "qp", 25 * qp_multiply, 0);
+ av_dict_set_int(options, "qp", 27 * qp_multiply, 0);
break;
case VideoQuality::ULTRA:
av_dict_set_int(options, "qp", 22 * qp_multiply, 0);
@@ -931,16 +931,16 @@ static void video_hardware_set_qp(AVCodecContext *codec_context, VideoQuality vi
} else if(codec_context->codec_id == AV_CODEC_ID_H264) {
switch(video_quality) {
case VideoQuality::MEDIUM:
- av_dict_set_int(options, "qp", 34 * qp_multiply, 0);
+ av_dict_set_int(options, "qp", 35 * qp_multiply, 0);
break;
case VideoQuality::HIGH:
av_dict_set_int(options, "qp", 30 * qp_multiply, 0);
break;
case VideoQuality::VERY_HIGH:
- av_dict_set_int(options, "qp", 23 * qp_multiply, 0);
+ av_dict_set_int(options, "qp", 27 * qp_multiply, 0);
break;
case VideoQuality::ULTRA:
- av_dict_set_int(options, "qp", 20 * qp_multiply, 0);
+ av_dict_set_int(options, "qp", 22 * qp_multiply, 0);
break;
}
} else if(codec_context->codec_id == AV_CODEC_ID_HEVC) {
@@ -952,7 +952,7 @@ static void video_hardware_set_qp(AVCodecContext *codec_context, VideoQuality vi
av_dict_set_int(options, "qp", 30 * qp_multiply, 0);
break;
case VideoQuality::VERY_HIGH:
- av_dict_set_int(options, "qp", 25 * qp_multiply, 0);
+ av_dict_set_int(options, "qp", 27 * qp_multiply, 0);
break;
case VideoQuality::ULTRA:
av_dict_set_int(options, "qp", 22 * qp_multiply, 0);
@@ -967,7 +967,7 @@ static void video_hardware_set_qp(AVCodecContext *codec_context, VideoQuality vi
av_dict_set_int(options, "qp", 30 * qp_multiply, 0);
break;
case VideoQuality::VERY_HIGH:
- av_dict_set_int(options, "qp", 25 * qp_multiply, 0);
+ av_dict_set_int(options, "qp", 27 * qp_multiply, 0);
break;
case VideoQuality::ULTRA:
av_dict_set_int(options, "qp", 22 * qp_multiply, 0);
@@ -1205,7 +1205,7 @@ static void usage_full() {
fprintf(stderr, " %s -w screen -f 60 -a default_output -c mkv -r 60 -o \"$HOME/Videos\"\n", program_name);
fprintf(stderr, " %s -w screen -f 60 -a default_output -c mkv -sc script.sh -r 60 -o \"$HOME/Videos\"\n", program_name);
fprintf(stderr, " %s -w portal -f 60 -a default_output -restore-portal-session yes -o \"$HOME/Videos/video.mp4\"\n", program_name);
- fprintf(stderr, " %s -w screen -f 60 -a default_output -bm cbr -q 5000 -o \"$HOME/Videos/video.mp4\"\n", program_name);
+ fprintf(stderr, " %s -w screen -f 60 -a default_output -bm cbr -q 15000 -o \"$HOME/Videos/video.mp4\"\n", program_name);
//fprintf(stderr, " gpu-screen-recorder -w screen -f 60 -q ultra -pixfmt yuv444 -o video.mp4\n");
_exit(1);
}
@@ -3823,7 +3823,7 @@ int main(int argc, char **argv) {
const double frame_time = frame_end - frame_start;
const bool frame_deadline_missed = frame_time > target_fps;
- if(time_to_next_frame > 0.0 && !frame_deadline_missed && frame_captured)
+ if(time_to_next_frame >= 0.0 && !frame_deadline_missed && frame_captured)
av_usleep(time_to_next_frame * 1000.0 * 1000.0);
else {
if(paused)