From a7259c6ff5a08a8d3ca4c541abfcd2aa98ae93a7 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 31 Aug 2020 23:22:14 +0200 Subject: Add medium quality and set quality to medium by default --- src/main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 3121044..f9f0ea4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -452,8 +452,8 @@ static AVStream *add_video_stream(AVFormatContext *av_format_context, AVCodec ** switch(video_quality) { case VideoQuality::MEDIUM: codec_context->bit_rate = 5000000 + (codec_context->width * codec_context->height) / 2; - codec_context->qmin = 16; - codec_context->qmax = 23; + codec_context->qmin = 17; + codec_context->qmax = 25; //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; @@ -616,7 +616,7 @@ static void usage() { fprintf(stderr, " -c Container format for output file, for example mp4, or flv.\n"); fprintf(stderr, " -f Framerate to record at.\n"); fprintf(stderr, " -a Audio device to record from (pulse audio device). Optional, disabled by default.\n"); - fprintf(stderr, " -q Video quality. Should either be 'high' or 'ultra'. Optional, set to 'high' be default.\n"); + fprintf(stderr, " -q Video quality. Should either be 'medium', 'high' or 'ultra'. Optional, set to 'medium' be default.\n"); fprintf(stderr, " -r Replay buffer size in seconds. If this is set, then only the last seconds as set by this option will be stored" " and the video will only be saved when the gpu-screen-recorder is closed. This feature is similar to Nvidia's instant replay feature." " This option has be between 5 and 1200. Note that the replay buffer size will not always be precise, because of keyframes. Optional, disabled by default.\n"); @@ -674,7 +674,7 @@ int main(int argc, char **argv) { const char *quality_str = args["-q"].value; if(!quality_str) - quality_str = "high"; + quality_str = "medium"; VideoQuality quality; if(strcmp(quality_str, "medium") == 0) { -- cgit v1.2.3