From c4d3a466b148dbba0cbe53643c069d00c573a83b Mon Sep 17 00:00:00 2001 From: celso Date: Fri, 10 May 2024 18:31:13 -0300 Subject: [PATCH] updated screenrecord.sh to use 1080p, more buffering and alsa loopback audio --- screc/screenrecord.sh | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/screc/screenrecord.sh b/screc/screenrecord.sh index 4bf5742..0ec41cd 100755 --- a/screc/screenrecord.sh +++ b/screc/screenrecord.sh @@ -1,14 +1,12 @@ #!/bin/bash -inres="1366x768" -fps="25" -bitrate="3000k" -read -p 'type in filename >' filename -if [ -z "$filename" ]; -then -filename="test" -fi +inres="1920x1080" +fps="30" +bitrate="6000k" +[ ! -z "${1}" ] && filename="${1}" || read -p 'type in filename >' filename && [ -z "$filename" ] && filename="test" ffmpeg -threads:0 3 -threads:1 1 \ --f x11grab -probesize 42M -video_size $inres -framerate $fps -thread_queue_size 1024 -i :0.0 \ --f alsa -probesize 10M -channels 2 -sample_rate 48000 -thread_queue_size 1024 -i default \ --c:v libopenh264 -allow_skip_frames true -b:v $bitrate \ +-f x11grab -probesize 42M -video_size $inres -framerate $fps -thread_queue_size 4096 -i :0.0 \ +-f alsa -probesize 80M -channels 2 -sample_rate 48000 -thread_queue_size 16384 -i loopout \ +-c:v libx264 -b:v $bitrate \ -c:a aac -af asetpts=N/SR/TB /tmp/$filename.mp4 + +#-allow_skip_frames true