MAKING
YOUR OWN DESKTOP VIDEOS ON LINUX
Have you ever
wanted to take a video of your
sleek desktop, with your customised icons, window manager, GKrellM, and
whatnot? Or make a video of cool XGL effects? Or a video tutorial to
teach a few friends how to use a certain application? If you have, then
this tutorial is for you.
Because Linux does not have a
native screen recording application (well, it has xvidcap,
but that can be difficult to set up), we have to use a workaround -
namely using VNC to transmit the data of our X server to ourselves. I
won't bore you with the gory details, as there are many other sites
which can do this for me - and they're only a Google search away.
What will I need for
this?
Not much (but don't download any of the extra apps yet):
1. A Linux distribution, with an X server. I am using Ubuntu 6.06
TLS in this example;
2. The latest version of x11vnc;
3. The latest version of pyvnc2swf (the Python version).
If you have Ubuntu or another distro with fairly large
repositories, installing x11vnc is a breeze. All I had to do to install
it was:
$ sudo apt-get install x11vnc
If the above command (or the one for your distro) worked, and x11vnc is
now installed, please continue to the next step: Extract pyvnc2swf
- if not, carry on reading. It looks like you will need to build x11vnc
from source, as your distro does not have it in its repositories. First
of all, download the latest version of it. Then,
extract it using the following command:
$ tar xzf x11vnc-versionnumber.tar.gz
Now, let's install it.
$ cd x11vnc-versionnumber/
$ ./configure
$ make
$ make install
You're done!
Extract pyvnc2swf
Download the latest .tar.gz Python
version of vnc2swf and save it to your home folder.
Those two points are crucial - the script we will be using will not
work with the C version, and nor will it work if the extracted folder
isn't in your home folder (/home/~username).
Ok. Open up xterm, and make sure you're in your home folder (run cd ~ if you're uncertain). Then,
run the following command (replace versionnumber
with the version number, as you did before):
$ tar xzf pyvnc2swf-versionnumber.tar.gz
That's all you need to do - extracting it is good enough!
Use the Script
To make recording videos easier, we're going to use a script. It will
do all the dirty work for us.
Open up your favourite text editor, and put the following code into it
(coloured blue):
#!/bin/sh
#
x11vnc -localhost -viewonly -wait 10 -defer 10 &
python ~/pyvnc2swf-0.8.2/vnc2swf.py -o tutorial.swf -N -S "arecord -c 2
-f cd -t wav voice.wav" localhost:0
ffmpeg -i voice.wav -ar 22050 voice.mp3
python ~/pyvnc2swf-0.8.2/edit.py -o tutorial1.swf -a voice.mp3
tutorial.swf
mv ~/tutorial1.swf ~/tutorial.swf
rm ~/voice.wav
rm ~/voice.mp3
rm ~/tutorial1.html
Save this script as 'vidtut.sh'
in your home directory. Not only will this script record a video of
your desktop, it will also record any input via a microphone and add it
as sound to the resulting flash file. If you don't want it to record
audio input, simply mute MIC input in your sound manager.
To make the script executable, run the following command:
$ chmod 755 vidtut.sh
Now that we have everything set up, it's time to run our app! Still in
your home directory, run the following command:
$ ./vidtut.sh
A window like the one in Figure 1 should appear.
Figure 1: pyvnc2swf in action,
thanks to our script
Now all you need to do is click
the 'Start' button to begin recording,
and hit the same button (which changes to 'Stop') once you're finished.
Two files will have been created in your home folder: tutorial.html and
tutorial.swf. Distribute both, as the viewer should open the
tutorial.html file in order to view the video properly (scaled
accordingly).
Thank you for reading this
tutorial.
Kudos to BruceCadieux for the majority of
the script, and to the developers of those two apps for making this
possible!
This tut is also available here: http://wolphination.com/linux/2006/06/30/how-to-record-videos-of-your-desktop/
Original Tutorial
by J_K9 for TheTAZZone-TAZForum
Originally posted on June 30th, 2006 here
Do not use, republish, in whole or in part, without the consent of
the Author. TheTAZZone policy is that Authors retain the rights to the
work they submit and/or post...we do not sell, publish, transmit, or
have the right to give permission for such...TheTAZZone merely retains
the right to use, retain, and publish submitted work within it's
Network.

