RecordMyDesktop

Revision 3 as of 2007-08-26 18:49:28

Clear message

RecordMyDesktop

Home page: http://recordmydesktop.iovar.org/

Recordmydesktop on Ubuntu Feisty

Recordmydesktop has been added to the universe repository. Enable it, and then install like this:

  • $ sudo apt-get install gtk-recordmydesktop 

Compiling recordmydesktop From Source on Ubuntu Edgy

Recordmydesktop is not available in the standard Ubuntu repository so we need to either compile it from source or obtain a Debian package

Pre-requisites for compiling

These are required for compiling, but should already be there.

{{{$ sudo apt-get install gcc make }}}

Pre-requisites specific to recordmydesktop

These are required libraries for recordmydesktop.

{{{$ sudo apt-get install xlibs-dev libxdamage-dev libvorbis-dev libtheora-dev libasound-dev }}}

Download source

Visit http://recordmydesktop.iovar.org/, click the Download link on the top, then click the link to download the source code. Save it to the Desktop for example.

Uncompress

{{{$ mkdir src $ cd src $ tar zxvf ../Desktop/recordmydesktop-0.2.6.tar.gz recordmydesktop-0.2.6/ recordmydesktop-0.2.6/Makefile.in recordmydesktop-0.2.6/README recordmydesktop-0.2.6/stamp-h.in recordmydesktop-0.2.6/AUTHORS recordmydesktop-0.2.6/COPYING recordmydesktop-0.2.6/ChangeLog recordmydesktop-0.2.6/INSTALL recordmydesktop-0.2.6/Makefile.am recordmydesktop-0.2.6/NEWS recordmydesktop-0.2.6/TODO recordmydesktop-0.2.6/aclocal.m4 recordmydesktop-0.2.6/config.guess recordmydesktop-0.2.6/config.h.in recordmydesktop-0.2.6/config.sub recordmydesktop-0.2.6/configure recordmydesktop-0.2.6/configure.ac recordmydesktop-0.2.6/install-sh recordmydesktop-0.2.6/missing recordmydesktop-0.2.6/mkinstalldirs recordmydesktop-0.2.6/include/ recordmydesktop-0.2.6/include/CVS/ recordmydesktop-0.2.6/include/CVS/Root recordmydesktop-0.2.6/include/CVS/Repository recordmydesktop-0.2.6/include/CVS/Entries recordmydesktop-0.2.6/include/recordmydesktop.h recordmydesktop-0.2.6/src/ recordmydesktop-0.2.6/src/Makefile.in recordmydesktop-0.2.6/src/Makefile.am recordmydesktop-0.2.6/src/recordmydesktop.c recordmydesktop-0.2.6/src/zpixmaptobmp.c recordmydesktop-0.2.6/src/getzpixmap.c recordmydesktop-0.2.6/src/parseargs.c recordmydesktop-0.2.6/src/rectinsert.c recordmydesktop-0.2.6/src/setbrwindow.c recordmydesktop-0.2.6/src/queryextensions.c recordmydesktop-0.2.6/src/register_callbacks.c recordmydesktop-0.2.6/src/get_frame.c recordmydesktop-0.2.6/src/update_image.c recordmydesktop-0.2.6/src/poll_damage.c recordmydesktop-0.2.6/src/encode_image_buffer.c recordmydesktop-0.2.6/src/bgr_to_yuv.c recordmydesktop-0.2.6/src/flush_to_ogg.c recordmydesktop-0.2.6/src/make_dummy_pointer.c recordmydesktop-0.2.6/src/opendev.c recordmydesktop-0.2.6/src/capture_sound.c recordmydesktop-0.2.6/src/encode_sound_buffer.c recordmydesktop-0.2.6/src/init_encoder.c recordmydesktop-0.2.6/doc/ recordmydesktop-0.2.6/doc/Makefile.in recordmydesktop-0.2.6/doc/Makefile.am recordmydesktop-0.2.6/doc/recordmydesktop.1}}}

Configure

Dive into the new directory that has been created and run the configure script.

{{{$ cd recordmydesktop-0.2.6/ $ ./configure checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking whether make sets $(MAKE)... yes checking for working aclocal-1.4... missing checking for working autoconf... found checking for working automake-1.4... missing checking for working autoheader... found checking for working makeinfo... missing checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for dirent.h that defines DIR... yes checking for library containing opendir... none required checking how to run the C preprocessor... gcc -E checking for egrep... grep -E checking for ANSI C header files... yes checking for X... libraries , headers in standard search path checking for gethostbyname... yes checking for connect... yes checking for remove... yes checking for shmat... yes checking for IceConnectionNumber in -lICE... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking png.h usability... yes checking png.h presence... yes checking for png.h... yes checking alsa/asoundlib.h usability... yes checking alsa/asoundlib.h presence... yes checking for alsa/asoundlib.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking for unistd.h... (cached) yes checking vorbis/vorbisfile.h usability... yes checking vorbis/vorbisfile.h presence... yes checking for vorbis/vorbisfile.h... yes checking for isnan in -lm... yes checking for deflate in -lz... yes checking for XOpenDisplay in -lX11... yes checking for XShmQueryVersion in -lXext... yes checking for XFixesQueryExtension in -lXfixes... yes checking for XDamageQueryExtension in -lXdamage... yes checking for vorbis_info_clear in -lvorbis... yes checking for ov_open in -lvorbisfile... yes checking for vorbis_encode_init in -lvorbisenc... yes checking for ogg_stream_init in -logg... yes checking for theora_encode_YUVin in -ltheora... yes checking for pthread_mutex_lock in -lpthread... yes checking for snd_pcm_drain in -lasound... yes checking whether closedir returns void... no checking for stdlib.h... (cached) yes checking for GNU libc compatible malloc... yes configure: creating ./config.status config.status: creating Makefile config.status: creating src/Makefile config.status: creating doc/Makefile config.status: creating config.h config.status: executing default-1 commands}}}

Make

Now it needs to be compiled. Shouldn't take a moment.

{{{$ make make all-recursive make[1]: Entering directory `/home/alan/src/recordmydesktop-0.2.6' Making all in src make[2]: Entering directory `/home/alan/src/recordmydesktop-0.2.6/src' gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I_includes -g -O2 -Wall -D_THREAD_SAFE -pthread -c recordmydesktop.c gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I_includes -g -O2 -Wall -D_THREAD_SAFE -pthread -c zpixmaptobmp.c gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I_includes -g -O2 -Wall -D_THREAD_SAFE -pthread -c getzpixmap.c gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I_includes -g -O2 -Wall -D_THREAD_SAFE -pthread -c parseargs.c gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I_includes -g -O2 -Wall -D_THREAD_SAFE -pthread -c rectinsert.c gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I_includes -g -O2 -Wall -D_THREAD_SAFE -pthread -c setbrwindow.c gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I_includes -g -O2 -Wall -D_THREAD_SAFE -pthread -c queryextensions.c gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I_includes -g -O2 -Wall -D_THREAD_SAFE -pthread -c register_callbacks.c gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I_includes -g -O2 -Wall -D_THREAD_SAFE -pthread -c get_frame.c gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I_includes -g -O2 -Wall -D_THREAD_SAFE -pthread -c update_image.c gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I_includes -g -O2 -Wall -D_THREAD_SAFE -pthread -c poll_damage.c gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I_includes -g -O2 -Wall -D_THREAD_SAFE -pthread -c encode_image_buffer.c gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I_includes -g -O2 -Wall -D_THREAD_SAFE -pthread -c bgr_to_yuv.c gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I_includes -g -O2 -Wall -D_THREAD_SAFE -pthread -c flush_to_ogg.c gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I_includes -g -O2 -Wall -D_THREAD_SAFE -pthread -c make_dummy_pointer.c gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I_includes -g -O2 -Wall -D_THREAD_SAFE -pthread -c opendev.c gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I_includes -g -O2 -Wall -D_THREAD_SAFE -pthread -c capture_sound.c gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I_includes -g -O2 -Wall -D_THREAD_SAFE -pthread -c encode_sound_buffer.c gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I_includes -g -O2 -Wall -D_THREAD_SAFE -pthread -c init_encoder.c gcc -g -O2 -Wall -D_THREAD_SAFE -pthread -L -lSM -lICE -o recordmydesktop -D_THREAD_SAFE -pthread -Wall recordmydesktop.o zpixmaptobmp.o getzpixmap.o parseargs.o rectinsert.o setbrwindow.o queryextensions.o register_callbacks.o get_frame.o update_image.o poll_damage.o encode_image_buffer.o bgr_to_yuv.o flush_to_ogg.o make_dummy_pointer.o opendev.o capture_sound.o encode_sound_buffer.o init_encoder.o -lasound -lpthread -ltheora -logg -lvorbisenc -lvorbisfile -lvorbis -lXdamage -lXfixes -lXext -lX11 -lz -lm make[2]: Leaving directory `/home/alan/src/recordmydesktop-0.2.6/src' Making all in doc make[2]: Entering directory `/home/alan/src/recordmydesktop-0.2.6/doc' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/home/alan/src/recordmydesktop-0.2.6/doc' make[2]: Entering directory `/home/alan/src/recordmydesktop-0.2.6' make[2]: Leaving directory `/home/alan/src/recordmydesktop-0.2.6' make[1]: Leaving directory `/home/alan/src/recordmydesktop-0.2.6'}}}

It's compiled okay!

Command line options

Lets test it.

{{{$ ./recordmydesktop --help

Usage:

  • recordmydesktop [-h| --help| --version| -delay n[H|h|M|m]| -windowid id_of_window|

    -display DISPLAY| -x X| -y Y|-width N| -height N| -fps N(number>0)|

    • -v_quality n| -s_quality n| -v_bitrate n| --no-framedrop| -dummy-cursor color|

      --no-cursor| -freq N(number>0)| -channels N(number>0)| -device SOUND_DEVICE| --nosound| --with-shared| --no-cond-shared| -shared-threshold n| --full-shots| --quick-subsampling| --scshot| -scale-shot N| -o filename]^filename

General Options:

  • -h or --help Print this help and exit. --version Print program version and exit.

Image Options:

  • -windowid id_of_window id of window to be recorded. -display DISPLAY Display to connect to. -x X Offset in x direction. -y Y Offset in y direction. -width N Width of recorded window. -height N Height of recorded window. -dummy-cursor color Color of the dummy cursor [black|white] --no-cursor Disable drawing of the cursor. --with-shared Enable usage of MIT-shared memory extension at all times. --no-cond-shared Do not use the MIT-shared memory extension when aquiring large areas. -shared-threshold n Threshold over which shared memory is used(default 75). --full-shots Take full screenshot at every frame(Not recomended!). --quick-subsampling Do subsampling of the chroma planes by discarding,not averaging.

    -fps N(number>0.0) A positive number denoting desired framerate.

Sound Options:

  • -channels N(number>0) A positive number denoting desired sound channels in recording. -freq N(number>0) A positive number denoting desired sound frequency. -device SOUND_DEVICE Sound device(default hw0:0). --nosound Do not record sound.

Encoding Options

  • -v_quality n A number from 0 to 63 for desired encoded video quality(default 63). -v_bitrate n A number from 45000 to 2000000 for desired encoded video bitrate(default 45000). --drop-frames Allow theora encoder to drop frames. -s_quality n Desired audio quality(-1 to 10).

Misc Options:

  • -delay n[H|h|M|m] Number of secs(default),minutes or hours before capture starts(number can be float) --scshot Take a bitmap screenshot(default rmdout.bmp) and exit.

    -scale-shot N Factor by which screenshot is scaled down(1<=number<=64,power of 2). -o filename Name of recorded video(default out.ogg). If no other options are specified, filename can be given without the -o switch.}}}

That works then

Use CheckInstall to make a deb

Install checkinstall from the universe repository.

System --> Administration --> Software Sources. Tick "Community maintained Open Source software (universe)" then follow the subsequent dialogs.

{{{$ sudo apt-get install checkinstall }}}

{{{$ sudo checkinstall Password:

checkinstall 1.6.0, Copyright 2002 Felipe Eduardo Sanchez Diaz Duran

  • This software is released under the GNU GPL.

***************************************** **** Debian package creation selected *** *****************************************

This package will be built according to these values:

0 - Maintainer: [ root@multivac ] 1 - Summary: [ Package created with checkinstall 1.6.0 ] 2 - Name: [ recordmydesktop ] 3 - Version: [ 0.2.6 ] 4 - Release: [ 1 ] 5 - License: [ GPL ] 6 - Group: [ checkinstall ] 7 - Architecture: [ i386 ] 8 - Source location: [ recordmydesktop-0.2.6 ] 9 - Alternate source location: [ ] 10 - Requires: [ ]

Enter a number to change any of them or press ENTER to continue:

Installing with make install...

========================= Installation results =========================== Making install in src make[1]: Entering directory `/home/alan/src/recordmydesktop-0.2.6/src' make[2]: Entering directory `/home/alan/src/recordmydesktop-0.2.6/src' /bin/bash ../mkinstalldirs /usr/local/bin mkdir /usr/local/bin

  • /usr/bin/install -c recordmydesktop /usr/local/bin/recordmydesktop

/usr/bin/install: setting permissions for `/usr/local/bin/recordmydesktop': No such file or directory make[2]: Nothing to be done for `install-data-am'. make[2]: Leaving directory `/home/alan/src/recordmydesktop-0.2.6/src' make[1]: Leaving directory `/home/alan/src/recordmydesktop-0.2.6/src' Making install in doc make[1]: Entering directory `/home/alan/src/recordmydesktop-0.2.6/doc' make[2]: Entering directory `/home/alan/src/recordmydesktop-0.2.6/doc' make[2]: Nothing to be done for `install-exec-am'. make install-man1 make[3]: Entering directory `/home/alan/src/recordmydesktop-0.2.6/doc' /bin/bash ../mkinstalldirs /usr/local/man/man1 mkdir /usr/local/man mkdir /usr/local/man/man1

  • /usr/bin/install -c -m 644 ./recordmydesktop.1 /usr/local/man/man1/recordmydesktop.1

/usr/bin/install: setting permissions for `/usr/local/man/man1/recordmydesktop.1': No such file or directory make[3]: Leaving directory `/home/alan/src/recordmydesktop-0.2.6/doc' make[2]: Leaving directory `/home/alan/src/recordmydesktop-0.2.6/doc' make[1]: Leaving directory `/home/alan/src/recordmydesktop-0.2.6/doc' make[1]: Entering directory `/home/alan/src/recordmydesktop-0.2.6' make[2]: Entering directory `/home/alan/src/recordmydesktop-0.2.6' make[2]: Nothing to be done for `install-exec-am'. make[2]: Nothing to be done for `install-data-am'. make[2]: Leaving directory `/home/alan/src/recordmydesktop-0.2.6' make[1]: Leaving directory `/home/alan/src/recordmydesktop-0.2.6'

======================== Installation successful ==========================

Copying documentation directory... ./ ./AUTHORS ./COPYING ./ChangeLog ./INSTALL ./NEWS ./README ./TODO ./doc/ ./doc/Makefile.in ./doc/Makefile.am ./doc/recordmydesktop.1 ./doc/Makefile

Copying files to the temporary directory...OK

Striping ELF binaries and libraries...OK

Compressing man pages...OK

Building file list...OK

Building Debian package...OK

Installing Debian package...OK

Erasing temporary files...OK

Deleting temp dir...OK

**********************************************************************

  • Done. The new package has been installed and saved to /home/alan/src/recordmydesktop-0.2.6/recordmydesktop_0.2.6-1_i386.deb You can remove it from your system anytime using:
    • dpkg -r recordmydesktop

**********************************************************************}}}

Removing the deb

{{{~/src/recordmydesktop-0.2.6$ sudo dpkg --remove recordmydesktop (Reading database ... 173612 files and directories currently installed.) Removing recordmydesktop ... dpkg - warning: while removing recordmydesktop, directory `/usr/local' not empty so not removed. ~/src/recordmydesktop-0.2.6$ }}}

Tips: Switch off sound recording with the "--nosound" option to reduce CPU overhead.