(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Printer Friendly Version



Creating screencast video tutorials for the web


2009/08/17

by Girish Venkatachalam



Girish Venkatachalam is a UNIX hacker with more than a decade of networking and crypto programming experience. His hobbies include yoga,cycling, cooking and he runs his own business. Details here:

http://gayatri-hitech.com
http://spam-cheetah.com

Creating video tutorials is a novel method of web based tutoring. Nowadays right from product demos for marketing/sales to technical talks, everything is found in youtube. Videos are a powerful medium to get your idea across and your audience can quickly understand what you are trying to convey when they see a video. Audio is not always necessary though it helps too.

The other thing you could do is add sub titles to the video to reinforce what you are trying to say. Or you could give you the user a subtitles file which they can turn on and off along with the video. I am going to talk about how we can do all this and more with open source tools.

Creating videos from Xwindow windows can be done in many ways. There are also ways to capture text console outputs when you are not running X. There is a program called ttyrec that helps you achieve that. You could of course use our good old script(1) program too. But ttyrec records in such a way that you can play back keystrokes with ttyplay(1).

Moreover once you create the video, you can edit them with mencoder, the companion program of mplayer. I have been most successful with the screencapture mechanism offered by ffmpeg as it is painless and simple. A simple command line



$ ffmpeg -f oss -i /dev/audio -f x11grab -y -r 60 -s sxga -i :0.0 -async
0 -vsync 0 -sameq $screencapture.avi
 

is all you need!

Note that this one records audio from /dev/audio which is not found under linux. You should use /dev/dsp instead. In case you don't want to record your voice then you can leave the -f and the -i switch altogether.

Then the command becomes

$ ffmpeg -f x11grab -y -r 60 -s sxga -i :0.0 -async
0 -vsync 0 -sameq $screencapture.avi
 

Then it will be a mute video showing only the keyboard, mouse and Xwindow screens. A very simple and easy affair.

A sample video is here. It is incredibly easy. Try it out.

At the same time, there are plenty of alternatives which I honestly did not like or I was too impatient to get my work done. So I wanted something that quickly worked without having to spend lot of time debugging. Even now I have a slight A/V sync problem with the above command line. I know it can possibly be corrected by post processing with mencoder, but I would rather not even allow that in the first place.

Once the video is created, you can play it back with your favorite multimedia application. Mine is definitely mplayer. You may prefer ffplay, totem, vlc or any other application.





You can also watch it from a browser plugin. There are firefox plugins or javascript addons that do the job. But even if you give a video that the users can download and watch they will praise you!

After all a video is painless work for the reader/viewer. He does not have to use his brain as much he would reading this article for instance. Consequently screencasts will attract a lot of people to your blogs or tutorial websites.

Other alternatives - could be painful to get working

I did try recordmydesktop and its gtk version too. It worked but I was not happy with the results. Please don't get biased by my opinion. I could well be wrong.

Then there is Istanbul and x11rec and various other alternatives. Check the references section. There is a comprehensive list. You can also search in delicious for finding out what people have bookmarked. I myself have bookmarked a few.

But I am quite happy with ffmpeg. It does the job without getting in the way of your main focus.

Other ways to show people what you are doing

When you want to show what you are doing to other people, you can also ask them to connect to your screen program. GNU Screen is a simple text based Window manager which supports a multi user mode. You can connect through ssh and start screen in '-x' mode. A useful screenrc is here:

caption always "%t(%n) %C:"
 

though you can get by without it as well of course.

There are alternatives to screen too. You can look at dtach and tmux from the links I have given below.

You can edit the video with a simple command from mencoder. I will only show you how to cut videos at various offsets. Most of the time you will prune the beginning and end with the switches -ss and -endpos. Here is a sample

$ mencoder input.avi -ovc copy -oac copy -ss 3 -o output.avi
 

This will remove the recording for the first 3 seconds. You can also specify time in this format: hh:mm:ss which could be convenient for you.

vnc is a great way to connect to remote displays. It turns out that it is also a great way to create screencast videos. I was very happy with it when I tried long ago. It is very easy to use. Much easier than the above command I gave with ffmpeg. But I did not like the concept of having to record your local screen by connecting remotely first.

There is a lot more you could do of course. But I have covered a few basics that will help you learn further.

References and further reading

  1. mplayer documentation
  2. Screencasting with Istanbul - youtube video
  3. ttyrec homepage
  4. recordmydesktop homepage
  5. vnc2swf homepage
  6. tmux homepage
  7. GNU Screen homepage
  8. dtach homepage
  9. ffmpeg homepage
  10. script(1) homepage
  11. x11rec : a program with some rough edges






More Articles by Girish Venkatachalam




Click here to add your comments



Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments


If you want a picture to show with your comment, go get a Gravatar



/Girish/gv-screencast.html copyright August 2009 Girish Venkatachalam All Rights Reserved

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

Jump to Comments



Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.

Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.

We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.


book graphic unix and linux troubleshooting guide

My Troubleshooting E-Book will show you how to solve tough problems on Linux and Unix systems!



 I sell and support
 Kerio Mail server






More:
       - Linux
       - Basics
       - Girish


Unix/Linux Consultants

Skills Tests

Guest Post Here