Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: NickG on May 26th, 2013  |  syntax: None  |  size: 0.44 KB  |  views: 147  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #!/bin/sh
  2. INFO=$(xwininfo -frame)
  3.  
  4. WIN_GEO=$(echo $INFO | grep -oEe 'geometry [0-9]+x[0-9]+' | grep -oEe '[0-9]+x[0-9]+')
  5. WIN_XY=$(echo $INFO | grep -oEe 'Corners:\s+\+[0-9]+\+[0-9]+' | grep -oEe '[0-9]+\+[0-9]+' | sed -e 's/\+/,/' )
  6.  
  7. ffmpeg -y -f pulse -ac 2 -i 2 -f pulse -ac 2 -i 3 -f x11grab -s $WIN_GEO -i :0.0+$WIN_XY -threads 0 -strict -2 -c:v libx264 -preset veryfast -c:a aac -map 0:a -map 2:v out.mp4 -strict -2 -c:a aac -map 1:a talk.m4a