Create one-click screencasts in Ubuntu/Debian

Screenshot image
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.

Screencast image

Comments

  1. 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.

  2. what does the patch do and how would you do this with the ffmpeg that’s in the ubuntu repositories? thanks

  3. @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.

  4. 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

Post a Comment


Your email is never published nor shared. Required fields are marked *



© 2006-2007 Maxim Software Corp.  All rights reserved.