updated screenrecord.sh to use 1080p, more buffering and alsa loopback audio

This commit is contained in:
celso 2024-05-10 18:31:13 -03:00
parent 3d80d31214
commit c4d3a466b1
1 changed files with 9 additions and 11 deletions

View File

@ -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