You all probably know what a screencast is. In my opinion, screencasts can greatly complement HOWTO documents and I strongly believe that they will be even more popular in the upcoming years. Although it would be more useful if this post dealt with how to create a screencast using free open-source software, I feel it is more important to describe the situation a user has to face while trying to create a screencast using two of the most actively developed FOSS tools for this purpose, recordmydesktop and istanbul.
Using recordmydesktop or istanbul to create a screencast can only result in one thing: an ogv file; that is an ogg container, which contains a theora encoded video stream and a vorbis encoded audio stream. Seems like nobody has ever cared if that video file is editable using any video editing tool! I have tried kino, avidemux, cinelerra, but not one of them could open the video. Re-encoding the video to a format, for example xvid, that could be recognized by any of those programs would be mandatory if you’d want to cut out or insert a scene to the screencast. The authors of recordmydesktop or istanbul should have given us the freedom to choose the format we would like the video and audio to be encoded into. Forcing us to export the video to a single format, which btw is not recognized by any of the most popular FOSS video editing tools, is completely useless. It does not make us feel more free while using free software.
#!/bin/bash # 2008-06-20 # fedora-av-splice.sh # Simple shellscript to mix theora video+audio using gstreamer pipeline # Takes 3 arguments wavfile theoravideo output-theora-video if [ $# -lt 3 ] ; then echo "Usage: $0 wavfile theora-video output-video" echo "Ex: $0 english-audio.wav desktop-recording.ogg english-desktop-video.ogg" else gst-launch-0.10 \ filesrc location=$2 \! decodebin name="video" \ filesrc location=$1 \! decodebin name="audio" \ audio. \! queue \! audioconvert \! vorbisenc \! queue \! mux. \ video. \! queue \! ffmpegcolorspace \! theoraenc quality=32 \! oggmux name=mux \! filesink location="$3" fi
Then again this is not the kind of “editability” I was referring to.
Anyway, if you have to use one of these tools, but need to make a few adjustments to the final clip, here is how to re-encode the ogv file to xvid or mpeg4 formats using mencoder. Note that in order to preserve as much quality as possible I use two-pass encoding.
Using mencoder’s xvid codec:
mencoder out.ogv -ovc xvid -xvidencopts bitrate=1000:pass=1 -o xvid.avi mencoder out.ogv -ovc xvid -xvidencopts bitrate=1000:pass=2 -o xvid.avi
Using mencoder’s mpeg4 codec:
mencoder out.ogv -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1000:turbo:vpass=1 -o mpeg4.avi mencoder out.ogv -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1000:vpass=2 -o mpeg4.avi
Choose whichever you think that better preserves quality.
Regarding bitrate, I’ve used 1000kbps as I think it creates good results while not exceeding the filesize of the original video.
In order to get some information about the ogv file, you can use ogginfo:
[gnot@galeon bin]$ ogginfo out.ogv Processing file "out.ogv"... New logical stream (#1, serial: 1bd82e14): type unknown New logical stream (#2, serial: 16113fc8): type theora Theora headers parsed for stream 2, information follows... Version: 3.2.0 Vendor: Xiph.Org libTheora I 20060526 3 2 0 Width: 592 Height: 368 Total image: 592 by 368, crop offset (0, 0) Framerate 1000/100 (10.00 fps) Pixel aspect ratio 1:1 (1:1.000000) Frame aspect 4:3 Colourspace unspecified Pixel format 4:2:0 Target bitrate: 45 kbps Nominal quality setting (0-63): 63 User comments section follows... recordMyDesktop=0.3.8.1 Logical stream 1 ended Theora stream 2: Total data length: 7012059 bytes Playback length: 4m:27.799s Average bitrate: 209.471516 kb/s Logical stream 2 ended
Your comments are welcome.
Creating Screencasts under Linux by George Notaras is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Copyright © 2009 - Some Rights Reserved