If you heard of ubuntuvideo.com and you will discover a lots of ubuntu tutorial at there. There are a blog post that uses patched ffmpeg to perform the art. Here, I introduce you a handy tool xvidcap. You can download it from here.
I downloaded ver 1.1.4p1 and it runs well under Ubuntu Edgy. Xvidcap uses ffmpeg as backend, so in order to have xvidcap works, you need to install ffmpeg.
To use xvidcap, is pretty simple. Just run it, it have gui to help you.
But you have list of options for command lines, you can obtain the list of options and the explanation by clicking the help in GUI, man xvidcap or just
xvidcap --help Usage: xvidcap, ver 1.1.4p1, (c) rasca, berlin 1997,98,99, khb (c) 2003 - 06 [--fps #.#] frames per second (float) [--verbose #] verbose level, '-v' is --verbose 1 [--time #.#] time to record in seconds (float) [--frames #] frames to record, don't use it with --time [--continue [yes|no]] autocontinue after maximum frames/time [--cap_geometry #x#[+#+#]] size of the capture window (WIDTHxHEIGHT+X+Y) [--rescale #] relative output size in percent compared to input (1-100) [--quality #] recording quality (1-100) [--start_no #] start number for the file names [--source
] select input source: x11, shm [--file ] file pattern, e.g. out%03d.xwd [--gui [yes|no]] turn on/off gui [--sf|--mf] request single-frame or multi-frame capture mode [--auto] cause auto-detection of output format, video-, and audio codec [--codec ] specify codec to use for multi-frame capture [--codec-help] list available codecs for multi-frame capture [--format ] specify file format to override the extension in the filename [--format-help] list available file formats [--aucodec ] specify audio codec to use for multi-frame capture [--aucodec-help] list available audio codecs for multi-frame capture [--audio [yes|no]] turn on/off audio capture [--audio_in ] specify audio input device or '-' for pipe input [--audio_rate #] sample rate for audio capture [--audio_bits #] bit rate for audio capture [--audio_channels #] number of audio channels Supported output formats: X11 Window Dump (.xwd) Portable Graymap File (.pgm) Portable Anymap File (.ppm) Portable Network Graphics File (.png) Joint Picture Expert Group (.jpg, .jpeg) Microsoft Audio Video Interleaved File (.avi) General AVI file (DIVX default) (.mpeg, .mpg) Microsoft Advanced Streaming Format (.asf) Macromedia Flash Video Stream (.flv, .flv1) Macromedia Shockwave Flash File (.swf) DV Video Format (.dv) MPEG1 System Format (.m1v, .vcd) MPEG2 PS Format (.m2v, .svcd) Quicktime Format (.mov, .qt)
Let have an example of using xvidcap command line. I wanna disable audio capture, specified the geometry to capture in fullscreen, rescale the output into 50% and at last output the video file name it as “test.mpg”
xvidcap --audio no --cap_geometry 1024x768[+0+0] --rescale 50 --file test.mpg
You can easily get the geometry info for a particular windows using xwininfo, if you click on the desktop, you will get the fullscreen geometry instead.
xwininfo | grep geometry
Just copy and paste the last part, and put in blacket to make it becomes like
With that you can screen capture a particular windows, replace the geometry portion on above example command line will do.
Here is the sample video, I uploaded it to youtube. The original output video file is much much more clearer where the text can be see clearly. After uploaded to youtube, the quality has been downgraded.
[tags] screencast, video screen capture, youtube, ffmpeg, video [/tags]