record (634B)
1 #!/bin/bash 2 # 3 # parazyd - (c) wtfpl 2016 4 # screencast time 5 6 PIDNAME=recorder 7 FRAMERATE=25 8 RES=$(wattr wh `lsw -r` | tr \ x) 9 #RES=1928x1080 10 11 usage() { 12 echo "usage: $(basename $0) [-fk] <filename>" >&2 13 exit 1 14 } 15 16 case $1 in 17 -f) FRAMERATE=50; shift 1 ;; 18 -k) kill $(pidof -s $PIDNAME); exit 0 ;; 19 esac 20 21 test -n "$1" && WEBM=$1 || usage 22 23 echo Framerate: $FRAMERATE 24 exec -a $PIDNAME ffmpeg -f x11grab -s $RES -an -r $FRAMERATE -i :0.0 -c:v libvpx -b:v 5M -crf 10 -quality realtime -y -loglevel quiet $1 25 #exec -a $PIDNAME avconv -f x11grab -s $RES -r $FRAMERATE -i :0.0 -c:v libvpx -b:v 5M -crf 10 -quality realtime -y -loglevel quiet $1