aboutsummaryrefslogtreecommitdiffstats
path: root/.config/init/funcs/scap
blob: bf9c66d2ced64fa8a85ec76288403aeeb92f6e49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env zsh
# capture webm

xset q
[[ $? -ne 0 ]] && return 1

archey3
sleep .2

if [[ -f '/tmp/cap.mp4' ]]; then
    rm '/tmp/cap.mp4'
fi

echo 'recording...'

ffmpeg -v panic -video_size 1920x1080 -framerate 30 -f x11grab -i :0.0 \
    -f pulse -ac 2 -i default -af aresample=async=1 \
    -c:v libx264 -q 0 -preset ultrafast '/tmp/cap.mp4'