summaryrefslogtreecommitdiff
path: root/bin/.bin/record
blob: 86d9b1a8ba1241b29a6531a584e1048c70b7b7ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash

usage() {
    echo "
screen recording using ffmpeg
usage: ${0##*/} [ -w/a ]

option:
  -w        without audio 
  -a        with audio
"
    exit 1
}

case $1 in 
        -w)
            ffmpeg -video_size 1920x1080 -framerate 25 -f x11grab -i :0.0 ~/screens/vids/record_$(date +%d-%b-%y-%I:%M%p).mkv
            ;;
        -a)
            ffmpeg -video_size 1920x1080 -framerate 25 -f x11grab -i :0.0 -f pulse -ac 2 -i default ~/screens/vids/record_$(date +%d-%b-%y-%I:%M%p).mkv
            ;;
        *) usage
esac