Tuesday, October 12, 2010

Screencasting in Mandriva

I spent too much time today making a short screencast in order to demonstrate a specific property of Eclipse and Java. I could not find any clear recommendations on what software to use on Mandriva, my preferred Linux distribution, at least not beyond what was given on Wikipedia's page comparing screencast software.

I ended up using recordMyDesktop with the qt frontend, both of which were in the standard Mandriva repositories. You can select an area of the screen to record via the main window, but there is also a tray icon. Initiating a recording from the tray icon seems to always grab the whole screen, regardless of what is selected.
Additionally, the selection only seems to work if you choose the box and then hit record on the main window. Stopping that recording and then clicking record a second time results in having a full-desktop recording, which is not what I wanted. These complications caused me to have to throw away three reasonable takes, because it was easier to recreate them then to figure out how to crop a whole video. (Although if someone knows how to do that on Mandriva, let me know.)

With an acceptable take--although I forgot one important point, but am not willing to try yet again--I uploaded the file to YouTube. RecordMyDeskop produces Ogg Theora video output with Ogg Vorbis audio, which I think is great as a supporter of open formats. YouTube happily accepted the upload, recognizing it as Theory+Vorbis, and did its magical processing. The end result, unfortunately, had completely garbled video, just some colored flecks on the screen, while the audio worked fine.

A little scouring of the Web, and I discovered a Devede, a Linux application for mastering DVDs that can also be used to convert to AVI video format. After installing the requisite codecs, I was able to convert the ogv into avi, and I uploaded that to YouTube. Somehow it got confused and thought I cancelled the upload, so I had to do this twice, but the final one stuck.

This worked for me, but if anyone knows of a simpler and more streamlined process, I'm open to ideas.

1 comment:

  1. It sounds like you're just going through the inevitable learning curve that goes along with video processing. Some thoughts:

    1. RMD works very well, *when* it works, but it can have a problem recognizing audio hardware properly. Also, audio and video in the recorded movie may not be synchronized. Here's an excellent tutorial on RMD with many useful technical hints:


    2. Learn to use ffmpeg, the Swiss Army knife of video tools. Although ffmpeg is a command-line tool, you can add hypervc, which provides a useful gui front-end. Ffmpeg (+/- hypervc) makes it easy to convert from one format to another, to change image quality, etc..

    3. Use good video codecs. The h264 codec offers a good balance of compression and image quality, and is widely recognized.

    4. Use mp3 or faac audio codecs. These are the most common ones, so they're supported and recognized by most software and sites. Sadly, using ogg and ogv (which offer very good quality and are nice from a philosophical perspective) will back you into a compatibility corner.

    5. The video editor, Avidemux, is very good for simple processing of raw video. It's very handy for cropping, improving contrast, sharpening, combining multiple clips, and for editing out little segments where the phone rang, or you dropped the microphone, or coughed, etc. It will also convert from one format to another, change audio and video codecs, etc.

    6. I finally got tired of dealing with RMD's audio issues from one computer to another, so I generally use ffmpeg to do my screen recordings. I get the audio set with the Gnome audio recorder (volume level, input device, etc.), and do a little audio recording to make sure it's working. Then I do the screen recording with ffmpeg, and have found it to be very reliable and robust. It was a bit cumbersome to set up, but now I just cut and paste the following command into a terminal, then control-C to stop recording:

    ffmpeg -f oss -i /dev/dsp -f x11grab -s 800x600 -b 5000k -r 10 -async 1 -g 300 -i :0.0+200,125 /home/chris/out.avi

    This tells ffmpeg to

    -f oss (record input from the oss sound system)
    -i /dev/dsp (record from the sound card)
    -f x11grab (record input from the x11 screen server)
    -s 800x600 (dimensions of the recorded area)
    -b 5000k (a high bitrate, for good initial image quality, can easily be reduced later)
    -r 10 (framerate of 10fps; use 25 for smoother video)
    -async 1 (keeps the audio and video synchronized, another problem with RMD)
    -g 300 (frankly, I have no idea what this does!)
    -i:0.0+200,125 (records from the main active screen with an x offset of 200 pixels and a y offset of 125 pixels. My laptop screen is 1280x800, so this puts the recorded area nicely in the center; I modified my wallpaper by adding a couple of small dots at the top-left and bottom-right of this rectangle).
    /home/chris/out.avi (the resulting video; can change the format simply by using a different extension, e.g. .mov, mp4, .ogv, etc.)

    Whether you record with RMD or ffmpeg, your resulting video can then be compressed or converted with ffmpeg/hypervc, and/or edited with Avidemux. The key here is to ensure high video quality in the initial recording (that's the -b 5000k command, above, although higher will be even better); you can reduce quality and filesize by post-processing, but, if you overshoot, you'll still have the original, high-quality file. RMD does have an option to render while recording, but, without a high-quality original file, you're stuck with what it gives you, a tradeoff between convenience and flexibility.

    One final suggestion: with ffmpeg installed, open a terminal and type "man ffmpeg" and read the manual; a lot of advanced video options will be incomprehensible, but that's OK - you'll still learn a lot about the basics of video compression, codecs, etc., and that information will definitely come in handy as you progress along the video learning curve.

    Good luck.