Jump to: navigation, search

This page describes how to make a video of your desktop and upload it to YouTube in order to show cool desktop features to the public. The video will have sound by default unless you switch off (or mis-configure) your microphone.

record your desktop

  • install and start recordmydesktop, e.g.
sudo apt-get install recordmydesktop
recordmydesktop myvideo

Then you have myvideo, a video with sound.

upload it

advanced tricks

  • wait 5 seconds before recording; record 60 seconds
sleep 5; recordmydesktop & sleep 60; kill $!
  • find out what file has been created by recordmydesktop (most recently)
ls -ltr
  • wait 5 seconds, pop up krep, give 10 seconds to show something, stop recording
sleep 5; krep & recordmydesktop & sleep 10; kill $!

Alternatives

  • xvidcap
  • Ffmpeg

Ffmpeg is a command line utility that can be used for a wide variety of things, including screen captures. A typical command for capturing your screen with ffmpeg would be:

ffmpeg -f x11grab -s hd720 -r 15 -i :0.0 screenCapture.avi

-f x11grab is the option to grab X11 (that is, the GUI server on a GNU Linux or unix-like system)

-s indicates the size. In this case, the hd720 pre-set is being used, which is practically 1:1 to a 1280x800 display. If full screen capturing is not required, it is also possible to use a setting such as vga or svga. Use man ffmpeg for all the size pre-sets (do a search for -s option).

-r is the frame rate; set to 15 fps because every little quiver of the cursor isn't important. The more frames-per-second (such as 29.97), the smoother the video will be to the eye -- but it will be more taxing on the system. Realistically, 15 should work in most cases, with even lower being possible depending on what the screen capture is trying to show the audience (obviously lower frame rate in order to show super-slick beautiful kwin animations would not be ideal, whereas showing off the new features of Konsole may very well warrant a low frame rate).

-i is the input file -- in the case of capturing X11, this is the you wish to capture. If you type echo $DISPLAY in Konsole or xterm, it will return that you are currently on :0 and since you are on the first instance of :0 (as opposed to, say, a second monitor you might also have plugged in) then the display you want to capture :0.0 -- when you have one monitor and one graphic card in your machine, the display is as simple as that; the only variation you're going to see in your display is if you've got multiple graphic cards and multiple monitors on those cards. But probably you don't have that, so it's :0.0

screenCapture.avi is the output file; it is being dumped into the current directory, and it is being named screenCapture.avi. There are lots of options here; you can choose whatever codec you have compiled ffmpeg to support, whether it's ogg (theora), xvid, or any of those other more proprietary-ish ones like x264, (ff)mpeg, and so on.

And that's all there is to it. No need for any fancy screen capture program, just handy old ffmpeg.

Troubleshooting

If this isn't working for you, then it's probably because your version of ffmpeg was not compiled with x11grab. The way to check if your installed version of ffmpeg supports x11grab is to run: ffmpeg -formats | grep -i x11grab

If that command returns nothing, then your installed version of ffmpeg doesn't know what x11grab is and you probably will want to either find another, more robust repository to install it from or just compile it from source code with everything turned on. For instructions on how to do the latter, see slackermedia.info which has instructions on how to do this (the instructions will work whether or not you are running Slackware, but you should be familiar with compiling software beforehand and make sure that you have a compiler and proper headers installed).


This page was last edited on 14 March 2010, at 13:45. Content is available under Creative Commons License SA 4.0 unless otherwise noted.