Posted By

poluz on 02/01/11


Tagged

video linux audio capture screencasting


Versions (?)

Linux video screencasting with audio


 / Published in: Bash
 

  1. #!/bin/sh
  2.  
  3. INFO=$(xwininfo -frame)
  4.  
  5. WIN_GEO=$(echo $INFO | grep -oEe 'geometry [0-9]+x[0-9]+' | grep -oEe '[0-9]+x[0-9]+')
  6. WIN_XY=$(echo $INFO | grep -oEe 'Corners:\s+\+[0-9]+\+[0-9]+' | grep -oEe '[0-9]+\+[0-9]+' | sed -e 's/\+/,/' )
  7.  
  8. ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 30 -s $WIN_GEO -i :0.0+$WIN_XY -acodec pcm_s16le -vcodec libx264 -vpre lossless_ultrafast -threads 0 -y output-single.mkv

Report this snippet  

You need to login to post a comment.