mirror of
https://repo.dec05eba.com/gpu-screen-recorder
synced 2026-04-04 02:26:36 +09:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
74d30f16ad | ||
|
|
030947e33a | ||
|
|
35390796cd | ||
|
|
70b9e3d6ff |
@@ -1,6 +1,5 @@
|
||||
WINDOW=screen
|
||||
CONTAINER=mp4
|
||||
QUALITY=very_high
|
||||
CODEC=h264
|
||||
AUDIO_CODEC=opus
|
||||
AUDIO_DEVICE=default_output
|
||||
|
||||
@@ -5,14 +5,14 @@ Description=GPU Screen Recorder Service
|
||||
EnvironmentFile=-%h/.config/gpu-screen-recorder.env
|
||||
Environment=WINDOW=screen
|
||||
Environment=CONTAINER=mp4
|
||||
Environment=QUALITY=very_high
|
||||
Environment=BITRATE_MODE=qp
|
||||
Environment=QUALITY=50000
|
||||
Environment=BITRATE_MODE=cbr
|
||||
Environment=CODEC=auto
|
||||
Environment=AUDIO_CODEC=opus
|
||||
Environment=AUDIO_DEVICE=default_output
|
||||
Environment=SECONDARY_AUDIO_DEVICE=
|
||||
Environment=FRAMERATE=60
|
||||
Environment=REPLAYDURATION=30
|
||||
Environment=REPLAYDURATION=60
|
||||
Environment=OUTPUTDIR=%h/Videos
|
||||
Environment=MAKEFOLDERS=no
|
||||
Environment=COLOR_RANGE=limited
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
project('gpu-screen-recorder', ['c', 'cpp'], version : '4.2.5', default_options : ['warning_level=2'])
|
||||
project('gpu-screen-recorder', ['c', 'cpp'], version : '4.2.6', default_options : ['warning_level=2'])
|
||||
|
||||
add_project_arguments('-Wshadow', language : ['c', 'cpp'])
|
||||
if get_option('buildtype') == 'debug'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "gpu-screen-recorder"
|
||||
type = "executable"
|
||||
version = "4.2.5"
|
||||
version = "4.2.6"
|
||||
platforms = ["posix"]
|
||||
|
||||
[config]
|
||||
|
||||
10
src/main.cpp
10
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)
|
||||
@@ -1205,7 +1207,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);
|
||||
}
|
||||
@@ -3108,7 +3110,7 @@ int main(int argc, char **argv) {
|
||||
usage();
|
||||
}
|
||||
|
||||
video_bitrate *= 1000LL * 8LL;
|
||||
video_bitrate *= 1000LL;
|
||||
} else {
|
||||
if(!quality_str)
|
||||
quality_str = "very_high";
|
||||
|
||||
Reference in New Issue
Block a user