Using KWin as a Desktop Video Recording and Screencast tool

Sathya | March 6th, 2009 - 7:16 am


Not many know of this, but as of KDE 4.2, Kwin, the window manager has a nifty little feature – it can grab videos of desktop much like a screencasting tool such as Camtasia. This functionality requires Kwin’s composition mode to be enabled (ie, you must be using Kwin’s desktop effects).

Below video shows where and how you can enable the video recording feature. Note this video was recorded using KWin.

Though it isn’ the best, Kwin’s video recording plugin works pretty well, but its just a basic thing.  As of now it cannot grab any audio.

Another quirk with this is that KWin saves the video recorded as a .cps file (some weird capsury format).  Before this can be view you need to recode this using a tool called cpsrecode. The quirk isn’t over yet. After recoding, I found that the video was flipped by 180 degrees and mirrored. This meant I had to use mencoder to correct it. To make this worse, mencoder can rotate only by 90 degrees at a time. Which means to get the final video you need to

  1. Recode this using cpsrecode
  2. Flip it by 90
  3. Flip it by 90 degree and mirror it

Found these rather tedious, so I chained all three to a single command, and with Mehul‘s help made it into a script.

So click on the link below, make the file executable by typing
chmod u+x recode.sh

To convert goto the directory where the recode.sh file is, and type

./recode <input-file-name> <output-file-name>

Here is the script:

http://sathyasays.com/wp-content/plugins/downloads-manager/img/icons/default.gif download: Recode.sh (1.42KB)
added: 06/03/2009
clicks: 397
description: A simple shell script to make the video grabbed by KWin viewable

If you enjoyed this post, make sure you subscribe to my RSS feed!

13 Responses to “Using KWin as a Desktop Video Recording and Screencast tool”

  1. Sathya says:

    my new post: Kwin as a desktop video recording and screencasting tool: http://lin.cr/g7u

  2. Sathya says:

    Blogged: Using KWin as a Desktop Video Recording and Screencast tool:

    Not many know of this, but as o.. http://tinyurl.com/an6ogj

  3. Sathya says:

    tweeps requesting a stumble / digg http://tinyurl.com/c3lk28 thanks!

  4. A.Kabir says:

    Terrific. Too bad I can’t use Linux because it lacks the programs and games I need. But otherwise Linux is constantly improving and this post proves it. Keep up good work mate :)

  5. Or…you could just just gtk-recordMyDesktop (GUI) / remordMyDesktop (terminal)/

  6. Narendra.s.v says:

    Thanks man i have never used this software but will surely give it a try.Keep up the good work

  7. Nice tool. I will like to try it definitely.

You can leave a response, or trackback from your own site.

Leave a Reply