-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscreen_capture
More file actions
executable file
·36 lines (27 loc) · 870 Bytes
/
screen_capture
File metadata and controls
executable file
·36 lines (27 loc) · 870 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
X=$1
Y=$2
WIDTH=$3
HEIGHT=$4
DURATION=$5
set -eu
## install byzanz if it is not installed
if ! hash byzanz-record &> /dev/null; then
sudo add-apt-repository ppa:fossfreedom/byzanz
sudo apt-get update && sudo apt-get install byzanz
fi
function usage() {
echo "usage: $(basename $0) x y width heigth duration"
echo " x: left hand edge position to record from"
echo " y: top edge location of the recoding"
echo " width: number pixels width for the recording"
echo " height: pixel height of the recording"
echo " duration: duration in seconds to record for"
exit 1
}
# being lazy, should check each var, and that they are numeric, give
# message about which ones are bad. For now we do some arg checking..
if [ -z "$DURATION" ]; then
usage
fi
byzanz-record --duration=$DURATION --x=$X --y=$Y --width=$WIDTH --height=$HEIGHT out.gif