Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Sep 22nd, 2018 64 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. #!/bin/bash
  2.  
  3. # Recibe como argumento el nombre del archivo de salida (video)
  4.  
  5. FPS=25
  6. FILE=/tmp/winprop.tmp
  7.  
  8. xwininfo >> $FILE 2>/dev/null
  9.  
  10. X=$(grep 'Absolute upper-left X:' $FILE | awk '{print $4}');
  11. Y=$(grep 'Absolute upper-left Y:' $FILE | awk '{print $4}');
  12. WIDTH=$(grep 'Width:' $FILE | awk '{print $2}');
  13. HEIGHT=$(grep 'Height:' $FILE | awk '{print $2}');
  14.  
  15. POS="${X},${Y}"
  16. SIZE="${WIDTH}x${HEIGHT}"
  17. echo ${POS};
  18.  
  19. rm $FILE
  20.  
  21. #haces que ffmpeg capture solo una ventana
  22. ffmpeg -f x11grab \
  23.  -r ${FPS} \
  24.  -s ${SIZE} \
  25.  -i ${DISPLAY}+${POS} \
  26.  -sameq \
  27.  $1
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top