summaryrefslogtreecommitdiff
path: root/xrec
blob: 867963ac16c3a8ac67b16cb6213f2b3b8bce5de5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash

set -e

recordingPATH=~/media/screenrecords/

case $1 in

    start)
        dunstify -t 3000 -i /dev/null "  Recording Starts In 3 Seconds"
        sleep 3
        ffmpeg -video_size 1920x1080 -framerate 60 -f x11grab -i :0.0+0,0 -crf 16 ${recordingPATH}screenrecording_$(($(ls $recordingPATH | wc -l)+1)).mp4 ;;

    stop)
        pkill ffmpeg
        dunstify -t 3000 -i /dev/null "  Recording Finished"
        ;;

esac