Making animated movie of your Linux/Ubuntu desktop
I have a number of friends who are new to using computers and as usual use windows, recently Windows Vista was launched and a lot of them were really impressed with the snazzy graphics vista offered and were willing to switch from Windows XP to Vista paying a awful amount of money (considering Linux is free) just for Aero looks that vista provides.
I started google and various other blog looking for tool that would allow me make a movie of my desktop , the softwares that i came across for recording my desktop was xvidcap ,vnc2swf,Wink, Byzanz , and hacked version of ffmpeg . If you have used windows and screen cast tools on windows before you can say these tools are quite similar to tool available on windows for recoding the desktop the Lotus Screen Cam.
Here is how i installed and used these screen cast tools : -
Installation : -
Since i could not find xvidcap in my Ubuntu repositories so i had to download xvidcap from it's website (download xvidcap from the following address http://sourceforge.net/project/showfiles.php?group_id=81535 ) , luckily the website provided a debian package which was small in size (2.82 MB) . After downloading the package i launched the Terminal (Applications -> Accessories -> Terminal ) now i moved into directory containing xvidcap and typed in the following command to start the installation of xvidcap.
sudo dpkg -i xvidcap*.deb
After completing the installation go to (Applications -> Sound and Video -> Xvidcap screen capture ) to launch the Xvidcap screen capturing utility.
Now after launching the Xvidcap application you would see a window like this and a Red square that defines the area of screen you would like to capture . You can change this to any size square for capturing that part of screen . However you should note that larger the area the more memory it would consume hence slower your system would become so try to get a small square .
Now to start capturing select this tool to select screen area you would like to capture . Now click on Record button to start capturing the screen .
However since recording videos consume a lot of memory so be careful about the type of applications that you would like to record and frame rates and video format when recording application . I had very bad experience recording video since my laptop is not very fast and frame rates were low with default DivX compression , but with a descent hardware you should be able to record videos without any problem. So well i found a way changing this right click on the button that shows test.mpg there go to Preferences .
The following window should show up , now go to Multi-Frame there increase the number of Frames per second to at least 25 and remove the auto before Video Codec and select MPEG1 if you are low on hardware and want to capture screen at a nice frame rate without significant lag. However if you are not low on hardware specs you can experiment with the Quality and Frame rate and video codec .Also you may like to disable the recording of audio to save some resources . Give a suitable name to the file name .
A nice feature of xvidcap is that it allows making screen cast in a variety of different file format including Macromedia Flash which allows you to include your screen cast in your website . To create Screen Cast in Flash format type in the name of file in the Multi-Frame of Preference dialog box as filename.swf this causes xvidcap to automatically select Video Output as Flash Video and File Format as Flash File (.swf)
Now you are ready to start recording your desktop.
After completing the recording the following windows should show up . Click close /play depending upon what you would like to do .Y our movie should be ready to be played .
2. The simplest one Byzanz
Byzanz is a small Gnome Panel applet that allows one to record screen as a animated gif file .
To install Byzanz type the following command at the terminal .
sudo apt-get install byzanz
now after completeing installation right click on the gnome panel now select the "Desktop Recorder" applet from the Miscellaneous section . After selecting you would find a Cross marked button in your applet .
Now to start recording click on the button it would start recording your desktop . Now when you have completed recording press the button again , it would ask for filename and after this your screen cast should be ready.
3. Patched version of ffmpeg(using ideas from this blog)
FFmpeg is a software that allows one to record and convert digital media . It can be used for converting video files from one file format to another file format .It also allows playing of simple media files. However the best utility of ffmpeg is in converting file from one format to another file format.
Now ffmpeg does not as such supports recording screen but we patch it's source code to make it record the desktop and create a screen cast based on that.
Now , to start this first launch terminal from (Applications -> Accessories -> Terminal) and type the following command in the terminal .
Now since by default ubuntu does not come with tool for compiling programs so we download a few additional tool for compiling applications and development libraries xlib
sudo apt-get install build-essential xlibs-dev
This command would fetch ffmpeg source code.
Now we extract the archive
tar xjfv ffmpeg-0.4.9-p20051216.tar.bz2
Now after moving into ffmpeg source code directory we download a patch and apply them here .
patch -Np1 -i ffmpeg-0.4.9-p20051216.diff
Now after this you have to modify configure script (open gedit or vi or any other text editor) and open "configure" script(for gedit configure in ffmpeg directory) and change this line
Now after this issue the following command to build Makefile
./configure --extra-ldflags=-L/usr/X11R6/lib --enable-x11grab --enable-gpl
now you are ready to start building ffmpeg
After completion of this operation your ffmpeg binary should be ready for making screen cast.
Now to record your entire desktop issue the following command : -
./ffmpeg -vcodec mpeg4 -b 1000 -r 10 -g 300 -vd x11:0,0 -s 1024x768 ~/screencast.avi
This would create a file named screencast.avi in your $HOME directory and you can use any video player to play your screencast.
Now you can explore more options that ffmpeg provides , you can chose a different video codec if you like or change screen size to capture a portion of screen .
./ffmpeg -vcodec mpeg4 -b 1000 -r 10 -g 300 -vd x11:10,10 -s 102x76 ~/screencast.avi
-vd option specifies the upper left corner of screen from which ffmpeg should start making screen cast. and -s 102x76 is size of window to be used for making screencast.
./ffmpeg -vcodec mpeg4 -b 1000 -r 10 -g 300 -i ~/screencast.avi -s 640×480 ~/screen.avi
This would convert your previous screen cast to a video resized to 640x480 resolution.
pyvnc2swf is a python script that records one desktop using vnc protocol and stores it in a file in swf file format.
To install pyvnc2swf issue the following command in terminal(assuming you are running Ubuntu 6.10 ) : -
sudo apt-get install x11vncafter this all libraries should be ready to enable recording of screen.
sudo apt-get install python-tk
sudo apt-get install python-pygame
sudo apt-get install python-tk
sudo apt-get install python-pygame
Now download vnc2swf from this website :- http://www.unixuser.org/~euske/vnc2swf/pyvnc2swf-0.9.1.tar.gz
Open and extract this file either by using file-roller tool or from command line
Now open two terminal windows in one windows start x11vnc server by typing the following command at terminal
This would start a vnc server on your machine if you like you can specify a password to avoid unauthorized access to your machine.
in second terminal go to the directory where you have extracted pyvnc2swf and type
at terminal to launch the application.
After this the following windows should show up allowing you to record your Ubuntu desktop screen . Since the application is graphical so it should not give you any major problem.
Press start to start recording desktop and when you have completed press stop button . Then go to file and save as and give a appropriate name of file and directory where you want to save flash video and associated HTML file.
Wink is a tool for creating tutorials and presentation that is available both on Windows and linux platform . It provides one feature that's not available in the other Screen cast tools available on linux , that it allows adding of popup windows having additional informations within the Screen cast . So it can be really handy for explaining someone Linux with help and hints popping up.Besides this Wink is available in a number of languages including English, French, German, Italian, Danish, Spanish, Serbian, Japanese, Brazilian Portuguese and Simplified/Traditional Chinese. .
It is probably the best tool to create interactive tutorial like presentation . Anyways you can download Wink from the following website address .
After downloading it extract it into any directory you wish . Open terminal from (Applications -> Accessories -> Terminal) and go to that directory where you have extracted files and issue the following command to start installation of Wink.
now go to direcotry which you specified to install Wink and type
to launch Wink
To start making screen casts go to (File -> New Project ) set various parameters according to your need and press OK .
Now you should see a dialog similar to this .
Now to start recording screen press " Shift + Pause " and to stop press it again.
To create a swf file click on Render (Project -> Render ) inside the Wink interface to compile the Screen Cast to a swf file(IMP : Change the frame rate of screen cast to value you typed when you started recording). You can explore other option of Wink yourself. Since it is graphical and should not present any major challenge .
Ambuj Varshney ( blogambuj(at) gmail.com)
For Linux On Desktop