diff options
author | Shubham Saini <pryr@pryr.xyz> | 2021-05-22 19:18:51 +0000 |
---|---|---|
committer | Shubham Saini <pryr@pryr.xyz> | 2021-05-22 19:18:51 +0000 |
commit | 72ccd83ccc66d942b855fe8379bc3f0d24384b76 (patch) | |
tree | 515997e25fb736ee1e3481dc941c1b540c03624b /bin/.bin/record | |
parent | bde9d8e1c9a6e2213fc7d40298d43a14f2e99359 (diff) |
improved scripts
Diffstat (limited to 'bin/.bin/record')
-rwxr-xr-x | bin/.bin/record | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/bin/.bin/record b/bin/.bin/record index 09ba7d1..86d9b1a 100755 --- a/bin/.bin/record +++ b/bin/.bin/record | |||
@@ -1,10 +1,24 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | ffmpeg -f x11grab \ | 3 | usage() { |
4 | -s 1920x1080 \ | 4 | echo " |
5 | -an -i :0.0 \ | 5 | screen recording using ffmpeg |
6 | -c:v libvpx \ | 6 | usage: ${0##*/} [ -w/a ] |
7 | -b:v 5M \ | 7 | |
8 | -crf 10 \ | 8 | option: |
9 | -quality realtime \ | 9 | -w without audio |
10 | -y ~/record.mkv | 10 | -a with audio |
11 | " | ||
12 | exit 1 | ||
13 | } | ||
14 | |||
15 | case $1 in | ||
16 | -w) | ||
17 | ffmpeg -video_size 1920x1080 -framerate 25 -f x11grab -i :0.0 ~/screens/vids/record_$(date +%d-%b-%y-%I:%M%p).mkv | ||
18 | ;; | ||
19 | -a) | ||
20 | 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 | ||
21 | ;; | ||
22 | *) usage | ||
23 | esac | ||
24 | |||