Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Recibe como argumento el nombre del archivo de salida (video)
- FPS=25
- FILE=/tmp/winprop.tmp
- xwininfo >> $FILE 2>/dev/null
- X=$(grep 'Absolute upper-left X:' $FILE | awk '{print $4}');
- Y=$(grep 'Absolute upper-left Y:' $FILE | awk '{print $4}');
- WIDTH=$(grep 'Width:' $FILE | awk '{print $2}');
- HEIGHT=$(grep 'Height:' $FILE | awk '{print $2}');
- POS="${X},${Y}"
- SIZE="${WIDTH}x${HEIGHT}"
- echo ${POS};
- rm $FILE
- #haces que ffmpeg capture solo una ventana
- ffmpeg -f x11grab \
- -r ${FPS} \
- -s ${SIZE} \
- -i ${DISPLAY}+${POS} \
- -sameq \
- $1
Add Comment
Please, Sign In to add comment