Friday, November 11, 2011

Simple screencast shell script.

screencastr.sh /screencastr

You need ffmpeg installed.
 #!/bin/bash  
 if which ffmpeg >/dev/null; then  
   echo "ffmpeg exists"  
 else  
 echo does not exist  
 echo "sudo apt-get install ffmpeg"  
 exit  
 fi  
 echo "Name of video?"  
 read name  
 echo "Resolution?"  
 read ress  
 echo "FPS? Up to 25."  
 read fps  
 ffmpeg -f x11grab -r $fps -s $ress -i :0.0 /tmp/$name.avi  
 mv /tmp/$name.avi $HOME  
 echo "Your screencast was saved to: $HOME/$name.avi"   

You can either copy and paste the code, or you can download the script from here:
theshadowfog.com/screencaster

To install:
 sudo apt-get install ffmpeg  
 chmod +x screencaster  
 ./screencastr  

No comments:

Post a Comment