Create one-click screencasts in Ubuntu/Debian

Creating screencasts can be difficult, especially in Linux. The following tutorial is written for Ubuntu, but I believe it will work equally well in other Debian-based distributions. This is a beginners guide to creating screencasts in Ubuntu. This entire process will take less than 2 minutes to get setup. The quality of the screencasts are close to perfect. Click here to see a sample screencast. Thank you Ubuntu Blog for the first part of this article.
Copy and paste the following commands into a terminal one at a time and hit enter after each.
mkdir screencasts
cd screencasts
wget http://un.sh.nu/screencasts/ffmpeg-0.4.9-p20051216.tar.bz2
tar xjfv ffmpeg-0.4.9-p20051216.tar.bz2
cd ffmpeg-0.4.9-p20051216
wget http://un.sh.nu/screencasts/ffmpeg-0.4.9-p20051216.diff
patch -Np1 -i ffmpeg-0.4.9-p20051216.diff
sudo apt-get install build-essential xlibs-dev
./configure –extra-ldflags=-L/usr/X11R6/lib –enable-x11grab –enable-gpl
make
Note: The make command will take several minutes to complete.
Now you are all set, and the following command will start recording and create your first screencast called firstScreen.avi in your home directory — try it.
./ffmpeg -vcodec mpeg4 -b 1000 -r 10 -g 300 -vd x11:0,0 -s 1024×768 ~/firstScreen.avi
Note: 1024×768 is the size of your screen. If you use a different resolution, change it to be appropriate for your screen.
You can create an icon in the panel that can launch this command with one-click so you don’t have to remember it. In order to do this, you need to create a shell script (don’t worry I’ll walk you through it).
Open up gedit and type the following commands and save the file as screencasts.sh (you can download my screencasts.sh if you prefer):
cd ~/screencasts/ffmpeg-0.4.9-p20051216
./ffmpeg -vcodec mpeg4 -b 1000 -r 10 -g 300 -vd x11:0,0 -s 1024×768 ~/Screencast.avi
After you save your screencasts.sh file into your home directory, type the following command into a terminal:
chmod +x ~/screencasts.sh
Now you are ready to create an icon in the panel. The easiest and quickest way to do this is to drag an existing icon into the panel and right-click and choose Properties. In the command field type ./screencasts.sh and check “Run in terminal.” Now when you click your icon your screencast will begin.


suri wrote:
the $ ./configure –extra-ldflags=-L/usr/X11R6/lib –enable-x11grab –enable-gpl
give me this error:
Unknown option “–extra-ldflags=-L/usr/X11R6/lib”.
See ./configure –help for available options.
Posted 04 Jan 2007 at 7:21 am ¶
towsonu2003 wrote:
what does the patch do and how would you do this with the ffmpeg that’s in the ubuntu repositories? thanks
Posted 10 Jan 2007 at 4:33 pm ¶
kylepott wrote:
@towsonu2003: The patched version of ffmpeg used in this tutorial is several months newer than the ffmpeg included in the Dapper repositories.
I believe the version of ffmpeg included in the repositories for Edgy includes the patch. So I think you could skip those steps and just use apt to install ffmpeg.
Posted 10 Jan 2007 at 4:55 pm ¶
Sree wrote:
Actually in the above commands, the webpage editor has joined double dashes –
Command should read as
./configure –-extra-ldflags=-L/usr/X11R6/lib –-enable-x11grab -–enable-gpl
Posted 14 May 2007 at 4:05 am ¶