aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscreenRecord.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/screenRecord.sh b/screenRecord.sh
index 710d47e..3abbf7b 100755
--- a/screenRecord.sh
+++ b/screenRecord.sh
@@ -1,15 +1,17 @@
#!/bin/sh
MARKFILE='/tmp/screenRec.mark'
+recsFolder="$HOME/videos/recs"
# Check if already recording
if [ -e $MARKFILE ]; then
stopScreenRecord.sh
else
touch $MARKFILE
- filename=rec"$(date +"%y-%m-%d_%H-%M-%S")".mp4
+ mkdir -p "$recsFolder"
+ filename=rec"$(date +"%y-%m-%d_%H-%M-%S")".mkv
# also record microphone
# ffmpeg -video_size "$(getResolution.sh)" -framerate 30 -f x11grab -i :0.0+0,0 -f alsa -ac 2 -i hw:0,0 "$HOME/videos/recs/$filename" &
- ffmpeg -video_size "$(getResolution.sh)" -framerate 30 -f x11grab -i :0.0+0,0 "$HOME/videos/recs/$filename" &
+ ffmpeg -video_size "$(getResolution.sh)" -framerate 30 -f x11grab -i :0.0 -vcodec libx264 "$recsFolder/$filename" &
notify-send -t 1000 "Recording $filename"
pkill -SIGRTMIN+13 i3blocks
fi