Linux video screencasting with audio


/ Published in: Bash
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.