Advertisement
metalx1000

FFMPEG - Video Screen Capture

Sep 5th, 2012
1,457
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.54 KB | None | 0 0
  1. #!/bin/bash
  2. cd $HOME/Videos/
  3. SavePath=$(zenity --file-selection --save --confirm-overwrite)
  4. echo "Saving video to $szSavePath"
  5.  
  6. INFO=$(xwininfo -frame)
  7.  
  8. WIN_GEO=$(echo "$INFO"|grep -e "Height:" -e "Width:"|cut -d\: -f2|tr "\n" " "|awk '{print $1 "x" $2}')
  9. WIN_POS=$(echo "$INFO"|grep "upper-left"|head -n 2|cut -d\: -f2|tr "\n" " "|awk '{print $1 "," $2}')
  10.  
  11. ffmpeg -f alsa -ac 2 -i hw:0,0 -f x11grab -s $WIN_GEO -r 15 -i :0.0+$WIN_POS -r 15 -acodec pcm_s16le -sameq "$SavePath.avi"
  12.  
  13.  
  14. echo "$WIN_GEO -i :0.0+$WIN_POS -acodec"
  15. echo "$WIN_POS"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement