diff options
author | rafa_99 <rafa99@protonmail.com> | 2021-05-31 05:29:26 +0100 |
---|---|---|
committer | rafa_99 <rafa99@protonmail.com> | 2021-05-31 05:29:26 +0100 |
commit | 9f4909cc2a998a2f97feef2174804e4ef01c6b78 (patch) | |
tree | 6b2b0696a89f4635ee1d512c8eb12f59bc97d5c2 /scripts/.local/bin/screenrecord | |
parent | 648200d664114b27980dd06b02b846d36824f798 (diff) |
Updated Screerecord Script
Diffstat (limited to 'scripts/.local/bin/screenrecord')
-rwxr-xr-x | scripts/.local/bin/screenrecord | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/scripts/.local/bin/screenrecord b/scripts/.local/bin/screenrecord index c176ad2..af6a4a3 100755 --- a/scripts/.local/bin/screenrecord +++ b/scripts/.local/bin/screenrecord @@ -1,13 +1,25 @@ #!/bin/sh #FFMPEG Grabs X11 Screen Puts it into a file inside Videos Folder -INPUT=$(printf "Screen Record\nScreen Cast" | dmenu -i -p "Record Type: ") +INPUT=$(printf "Screen Record\nScreen Cast\nSound Record\nVoice Record" | dmenu -i -p "Record Type: ") case "$INPUT" in "Screen Record") + # Screen & audio only 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 -preset superfast -c:a flac ~/Videos/Recordings/recording-"$(date '+%Y%m%d_%H%M%S')".mkv ;; "Screen Cast") + # Screen & voice only 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 -preset superfast -r 30 -c:a flac ~/Videos/Recordings/recording-"$(date '+%Y%m%d_%H%M%S')".mkv + ;; + "Sound Record") + # Computer audio only + SOURCE=$(pamixer --list-sources | grep -vi "Sources:" | awk '{print $2}' | grep output | sed s:\"::g) + ffmpeg -y -f pulse -i $SOURCE -c:v libx264rgb -preset superfast -c:a flac ~/Music/Recordings/recording-"$(date '+%Y%m%d_%H%M%S')".flac + ;; + "Voice Record") + # Mic audio only + SOURCE=$(pamixer --list-sources | grep -vi "Sources:" | awk '{print $2}' | grep input | sed s:\"::g) + ffmpeg -y -f pulse -i $SOURCE -c:v libx264rgb -preset superfast -c:a flac ~/Music/Recordings/recording-"$(date '+%Y%m%d_%H%M%S')".flac esac |