Wednesday, 2 March 2011

Screencasts with xvidcap in Ubuntu 10.04

In the near future I'm going to need to do a couple of screencasts, so I've tried different programs to do it: recordmydesktop, recorditnow, istanbul and xvidcap. The one that gets the best video (for example a moving score in Musescore) is xvidcap, but I couldn't get it to get the sound, no matter what (and it seems that this is a common problem in Ubuntu 10.04).

It turns out that the package that you download via Synaptic is broken in this respect, so the solution is to uninstall that one, and instead install xvidcap_1.1.7jaunty_i386.deb (at http://sourceforge.net/projects/xvidcap/files/) In order to install it in my x86_64 system I just have to use the --force-architecture option to the dpkg -i command.

angelv@vaso:~/Desktop$ sudo dpkg --force-architecture -i xvidcap_1.1.7jaunty_i386.deb 

But when trying to run it I see that there are some i386 libraries missing. In order to easily install them I use the getlibs script.

angelv@vaso:~/Desktop$ padsp xvidcap
xvidcap: error while loading shared libraries: libtheora.so.0: cannot open shared object file: No such file or directory

angelv@vaso:~/Desktop$ getlibs /usr/bin/xvidcap

Once that is in place, it is quite easy to record a screencast, together with the audio produced by the computer:
  1. Start xvidcap with padsp 
  2. Once you start recording with xvidcap, make sure that the Recording is done from the "Monitor of Internal Audio Analog Stereo", which can be modified with pavucontrol.
  3. When recording from Musescore (and probably other programs as well), make sure that the sound is being sent to PulseAudio.
The following video illustrates these options and the end result:  http://vimeo.com/20552593


    9 comments:

    Anonymous said...

    Hello and thanks for the tutorial but I seem to have a different issue, do you happen to know how I can solve this:

    ~$ xvidcap
    `menu_proxy_module_load': xvidcap: undefined symbol: menu_proxy_module_load

    (xvidcap:4278): Gtk-WARNING **: Failed to load type module: (null)

    Error accessing sound input from /dev/snd/by-path/pci-0000
    Sound disabled!

    angelv said...

    sorry, no idea..

    Anonymous said...

    For the problem of 4 March 2011 18:02: I think that the solution can be the one in this page (I had a similar warning).

    Anonymous said...

    Thanks.

    For the problem of 4 March 2011 18:02: I think that the solution can be the one in this page (I had a similar warning).

    This can be useful:

    To run the program always as padsp xvidcap from the menu: run alacarte, go to Sound and video, then to XVidCap Screen Capture, Properties and where it says Command put padsp xvidcap.

    The stated is to record the system sound, that is, the one coming out of the speakers, that can be of a song or movie of our hard drive or pendrive played by Totem, of a Flash music video of a website played by Firefox, ...

    Nevertheless, sometimes it can be necessary to record the microphone sound, for example if we want to make a videotutorial to explain how a program works. In this case we put xvidcap in recording state, run pavucontrol and in the Recording tab we put Analog Stereo Internal Audio (without "Monitor of" ahead).

    If we only want to record sound (without video) we can run from ALT+F2 gnome-sound-recorder. The first time probably it will be configured to record from the microphone. To record the system sound we run with ALT+F2 gnome-volume-control, go to the Hardware tab and in Profile we put Analog Stereo Output (it's also possible to do this running pavucontrol and using the Configuration tab).

    But when we finish we have to put again Analog Stereo Duplex in the Profile of Hardware of gnome-volume-control (or of Configuration of pavucontrol), so we can still choose the origin of the sound when recording with xvidcap.

    NB: sometimes, to change from Analog Stereo Duplex to Analog Stereo Output it may be necessary to change first to Off, close, open again and then change finally to Analog Stereo Output. The same for the opposite change. If not, the computer may "not notice" that we have applied the change.

    Taken from http://ubuntuforums.org/showthread.php?t=1714139

    Anonymous said...

    I would add:

    a) Just after installing xvidcap from sourceforge they recommend to lock this version in Synaptic so the newer but without audio support one replaces it.

    b) In Ubuntu 10.04 pavucontrol is not installed by default but it's easily installed from Synaptic

    c) Another option, not to have to change once and again between Analog Stereo Duplex and Analog Stereo Output neither limit the sound source for xvidcap, is to leave Analog Stereo Duplex and use also gnome-sound-recorder with padsp ahead, that is, run padsp gnome-sound-recorder. Like the stated for padsp xvidcap, to change where we want to record the sound from, we put the program recording, open pavucontrol and in the Recording tab we put the desired option. We also can change the menu entry if we want with alacarte, going to Sound & video, then to Sound Recorder and then to Properties.

    Anonymous said...

    Improvement of a comment: Please replace the paragraph starting with "c) Another option" with:

    Another option, not to have to change once and again between Analog Stereo Duplex and Analog Stereo Output neither limit the sound source for xvidcap, is to leave Analog Stereo Duplex and use also pavucontrol when we want to change the source of the sound for gnome-sound-recorder. Like the stated for padsp xvidcap, to change where we want to record the sound from, we put gnome-sound-recorder recording, open pavucontrol and in the Recording tab we put the desired option. In this case there is no need to use padsp (xvidcap needs it because it was designed for OSS. What padsp does is to connect OSS with PulseAudio, as shown in http://linux.die.net/man/1/padsp).

    Anonymous said...

    After a video is recorded xvidcap offers to play it immediately. But if you click on the "Play" button the video is not reproduced.

    This problem happens at least in Ubuntu 10.04 because by default it doesn't have installed mplayer, the program that xvidcap uses to play the videos when pressing on the stated button.

    There are 2 solutions:

    a) Install mplayer from Synaptic.
    or
    b) Go to preferences (right clicking on the name of the file, for example test-0000.mpeg, and then cliking on Preferences), then to the Commands tab, and then in the "Multi-Frame Capture Commands"' "Playback Command" replace mplayer with totem and click on OK. Then right click again on the name of the file and click on "Save preferences".

    Mark said...

    Very Thankful !!!

    Appreciate your posting, was about to give-up on xvidcap on 10.04 64bit

    I hope xvidcap gets some attention for furure Ubuntu releases as it does it's job nicely.

    Anonymous said...

    In Linux Mint MATE there is no default sound recorder, but you can install Audio Recorder to record audio from the microphone or from the system: https://launchpad.net/~osmoma/+archive/audio-recorder