diff options
author | rafa_99 <rafa99@protonmail.com> | 2021-02-04 00:23:02 +0000 |
---|---|---|
committer | rafa_99 <rafa99@protonmail.com> | 2021-02-04 00:23:02 +0000 |
commit | 4048dedbf2677391d300c8eeff941e58a03d2368 (patch) | |
tree | 351e1ac805253370fc801e3aa340bb759f99e4d3 /scripts/.local/bin/screenrecord | |
parent | b5ef83032af34a52bab844c5a3e94a82e9602df5 (diff) |
Upgraded Screen Recorder
Diffstat (limited to 'scripts/.local/bin/screenrecord')
-rwxr-xr-x | scripts/.local/bin/screenrecord | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/scripts/.local/bin/screenrecord b/scripts/.local/bin/screenrecord index 0a4d72d..62c1a34 100755 --- a/scripts/.local/bin/screenrecord +++ b/scripts/.local/bin/screenrecord @@ -1,5 +1,13 @@ #!/bin/sh #FFMPEG Grabs X11 Screen Puts it into a file inside Videos Folder -ffmpeg -y -f x11grab -framerate 60 -s "$(xdpyinfo | grep dimensions | awk '{print $2;}')" -i :0.0 \ - -f pulse -i default ~/Videos/Recordings/recording-"$(date '+%Y%m%d_%H%M%S')".mkv +INPUT=$(printf "Screen Record\nScreen Cast" | dmenu -i -c -l 15 -p "Record Type: ") +case "$INPUT" in + "Screen Record") + SOURCE=$(pamixer --list-sources | grep -vi "Sources:" | awk '{print $2}' | grep output | sed s:\"::g) + ffmpeg -y -f x11grab -framerate 60 -s $(xdpyinfo | grep dimensions | awk '{print $2}') -i :0.0 -f pulse -i $SOURCE -c:v libx264rgb -r 30 -c:a flac ~/Videos/Recordings/recording-"$(date '+%Y%m%d_%H%M%S')".mkv + ;; + "Screen Cast") + SOURCE=$(pamixer --list-sources | grep -vi "Sources:" | awk '{print $2}' | grep input | sed s:\"::g) + ffmpeg -y -f x11grab -framerate 60 -s $(xdpyinfo | grep dimensions | awk '{print $2}') -i :0.0 -f pulse -i $SOURCE -c:v libx264rgb -r 30 -c:a flac ~/Videos/Recordings/recording-"$(date '+%Y%m%d_%H%M%S')".mkv +esac |