summaryrefslogtreecommitdiff
path: root/scripts/.local/bin
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/.local/bin')
-rwxr-xr-xscripts/.local/bin/screenrecord17
1 files changed, 8 insertions, 9 deletions
diff --git a/scripts/.local/bin/screenrecord b/scripts/.local/bin/screenrecord
index a1ef7fc..c3ac024 100755
--- a/scripts/.local/bin/screenrecord
+++ b/scripts/.local/bin/screenrecord
@@ -5,25 +5,24 @@ then
killall ffmpeg
else
#FFMPEG Grabs X11 Screen Puts it into a file inside Videos Folder
- INPUT=$(printf "Screen Record\nScreen Cast\nSound Record\nVoice Record" | dmenu -i -p "Record Type: ")
+ INPUT=$(printf "Video Only\nVideo and Audio\nVideo and Voice\nAudio Only\nVoice Only" | dmenu -i -p "Record: ")
case "$INPUT" in
- "Screen Record")
- # Screen & audio only
+ "Video Only")
+ ffmpeg -y -f x11grab -framerate 60 -s $(xdpyinfo | grep dimensions | awk '{print $2}') -i :0.0 ~/Videos/Recordings/recording-"$(date '+%Y%m%d_%H%M%S')".mkv
+ ;;
+ "Video and Audio")
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
+ "Video and Voice")
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
+ "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
+ "Voice 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