Since a few people have asked me how I recorded the Plasma HowTo screencasts, I decided to post a short HowTo here. And is there any better way to show this than with an animated GIF? I can almost hear you saying “of course not!”, so here we are:
I use byzanz to record my desktop. It works as a GNOME panel applet but can also be used from the command line.
Now back to the screencast above. I usually do the following steps:
- Open a terminal to run the command. My terminal emulator of choice is Yakuake, because it’s very easy to hide and unhide.
- I use the following command:
--delay=delay --duration=duration filename
delayis the time before it starts recording,
durationthe duration of the animation and
filenamethe name of the output file.
--loopspecifies that the animation will loop and
--cursormakes sure that it also captures the mouse cursor. As an example, the command in the screencast is
byzanz-record --loop --delay=3 --duration=8 -c plasma_howto-throw-ball
Note that I’ve written
-chere instead of
--cursorfor some unknown reason. Enter
byzanz-record --helpto see all options.
- I have a timer beside me which I start when I execute the command. After 4 seconds (3 seconds of delay + 1 second when the mouse cursor is idle) I start to do whatever I want recorded.
Now I set the delay to 1 second and start after a short delay (~ 1 second, no timer needed). Afterwards I edit the file with GIMP to make the first frame 1 second long.
- When the recording is done, I preview the file in Firefox to see if it looks good. I’m pretty strict – a small mistake and I redo the recording. For example, the ball screencast I did in the screencast is on the borderline – I accidentally moved the mouse cursor one or two pixels after I’m done.
Finally here are some tips and tricks:
- I created a new user to do the recording. This has several benefits, one being that you can nuke the Plasma config files without hesitation to restore the settings to default. The command to do this is
kquitapp plasma-desktop; rm $KDEHOME/share/config/plasma-desktop-appletsrc; plasma-desktop
$KDEHOMEenvironment variable isn’t set, try to replace it with
- Disable Nepomuk/Strigi and other stuff that might pop up.
- For me it didn’t work very well to record the screencast with Desktop Effects enabled. You can disable it temporary in System Settings -> Desktop Effects -> Suspend Compositing.
- Configure the task manager to only show tasks from the current desktop. As you can see in my screencast, I keep a Dolphin and a Firefox window opened on my other virtual desktop to quickly preview the results.
- Gwenview also works for viewing the GIF files. However, note that it’ll loop the animation even if they’re recorded without the
--loopoption. I warn you about this because I learned it the hard way.
- Most people probably know this, but to run the same command again you just have to press the up arrow on your keyboard to go back in history in the terminal – no need to copy and paste the command over and over again. Just make sure that you don’t overwrite a screencast you’re satisfied with! (Yep, it happened to me).
- As you might have noted, my
filename(plasma_howto-throw-ball) doesn’t have the
.gifextension. There’s actually a reason for this – to avoid overwriting good screencasts, I add the extension when I’m happy with the screencast. Then it doesn’t matter if I accidentally run the same command again without changing the output file name.
- How to find out the
durationbeforehand? You can first do a test recording to get an approximate time. If the actual record is too long – which is better than too short – you can edit the GIF file in GIMP. The frames are shown as layers, and you can edit a layer name to change the duration of that frame.
September 2, 2009 at 21:11
Have you thought about testing vlc to do the same job it had some gif encoding available i think.
September 2, 2009 at 22:00
Nope, didn’t know that VLC was capable of that. It also sounds more troublesome – with byzanz it was just install (OK, I admit I would do fine without three quarter of its dependencies.. ;)) and go.
September 3, 2009 at 9:32
I love the fact this is being picked up! By presenting videos to the world we can give a better impression of KDE.
I do wonder, could you also provide the videos in a high quality? IMHO low framerates and 256 colors makes animations like http://userbase.kde.org/images.userbase/a/a4/Plasma_howto-panel-move.gif look flacky, and therefore not giving a good impression of the bling KDE brings. I think it’s important for the ‘new user perspective’ to give HQ video’s. 😉
September 3, 2009 at 14:31
Yes. There’s been talk about including videos in a welcome plasmoid (e.g. in a feed). If the Plasma guys want screencasts for something like this, the animations will probably be encoded in ogg theora.
I’ll try to engage the community in creating the screencasts, so stay tuned if you’re interested.
September 3, 2009 at 17:40
Not a fault of the screen cast at all (looks nice, but why a .gif file rather than HTML5 .ogg video?), but I always wondered about that Ball plasmoid. When I think ‘throw a ball’ i think there should be some forward momentum for it. The ball just really allows one to drop it. I thought myne was broken until I saw the video…
I agree that more KDE4 videocasts would be great, from everyone in the community!
September 3, 2009 at 19:12
Because not everyone has a web browser that supports HTML 5 yet. The advantage of the GIF format is that almost everyone can watch them without any additional plugins.
Yes, the BbalL plasmoid is broken for me too. Not only can’t I throw it, it doesn’t even show up on my regular setup (dual screens). Furthermore, if I lock my widgets the ball can’t move (bug 203666) – I remember that it could in 4.1-something.
Well, the best thing to do is to fill a bug I guess, and hope that the maintainer fixes it.
September 6, 2009 at 15:37
[…] To: Use A Screensaver As Desktop Wallpaper Record screencasts to animated GIF files Graudit – Code Audit Tool Using Grep Normalizing Path Names with […]
October 6, 2009 at 22:05
Just a question: how do you handle the size of the GIF? Are you resize it after the record with GIMP?
Also what is your screen resolution?
October 6, 2009 at 22:39
No, I don’t edit the GIF files at all. As mentioned, I use a different user to record the screencasts – I’ve set the resolution for that user to 640×480.
I usually use dual screens with a total resolution of 2560×1024.
October 6, 2009 at 22:43
Thanks for the fast answer, I will try it asap 🙂
February 23, 2010 at 17:14
Update February 23, 2010
Updated the article with some minor changes and a tip about using GIMP to edit the output files.
February 25, 2010 at 0:45
[…] you want to create your own animated GIF screencasts, I have written a small guide here (updated […]
October 4, 2010 at 16:58
[…] program I used to record these (read more about it here), byzanz, has also been updated. The new version improves the quality in some parts, but […]
April 6, 2011 at 8:41
[…] pour la création des animations sur le blog de Hans : [en] http://hanschen.org/2009/09/02/record-screencasts-to-animated-gif-files/ vérouiller les […]