This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# this bit came from youtube.com/watch?v=_XDa1ahl7fw | |
INFO=$(xwininfo) | |
WIN_GEO=$(echo $INFO | grep -oEe 'geometry [0-9]+x[0-9]+' | grep -oEe '[0-9]+x[0-9]+') | |
WIN_XY=$(echo $INFO | grep -oEe 'Corners:\s+\+[0-9]+\+[0-9]+' | grep -oEe '[0-9]+\+[0-9]+' | sed -e 's/\+/,/' ) | |
AUDIO_INPUT="-f alsa -i hw:0,0 -ac 2" | |
VIDEO_INPUT="-f x11grab -r 30 -s $WIN_GEO -i :0.0+$WIN_XY" | |
#AUDIO_CODEC="-acodec pcm_s16le" |