I mentioned in my last post, the usage of a pretty sweet freeware tool called CamStudio that I’m using for video tutorials (or screencasts, if you want Google to deliver gold). In that post, I stated that I needed to explore codecs being used in video production to cut down on file sizes, and that I was happy to bounce between operating systems to get a final result.
I’ve since changed my mind. It’s been an interesting learning experience, but not something I see myself getting off on in the long term. So, I’m now in a closure phase, where I’m putting some documentation together, and adopting choices that are useful for my Windows-only counterparts to reproduce what I’ve done. Part of that is relying as far as humanly possible on CamStudio for generating the final video file, and most definitely not asking them to play with foreign operating systems to get their final output.
What follows is a summary of settings for CamStudio that produce a “tolerable” quality video with the end-goal of as small a file size as possible for that quality. I recognise this is a subjective call, so I’m quite aware that others may have strong differences of opinion on the choices I’ve made. My “guide” for this exercise is my “consumer self”. When I watch tutorials that try too hard to reduce file size, the crappiness that results is something I paint my opinion of the organisation with. As a consumer of the video, I don’t give a flying f**k about file size. Quality is king. So, as a producer, I’m looking to find a sweet-spot where the user-experience isn’t adversely effected by my drive to keep file sizes manageable (which is a distribution problem) .
Before focusing purely on CamStudio, I need to mention another freeware utility called Sizer which supplies synergies with CamStudio. When I run Sizer, I can specify the exact window size (and position) of a window, which in turn, I can align to the “Fixed Region” option under Camstudio to ensure perfect alignment of recording area with window size and position.
My current setup is such that I limit myself to a 1024×768 area in the very centre of the screen to pretty-much guarantee that a typical modern computer can play the video. Also, amount of recording area is one of the key variables in file size, so a region of this size represents a nice trade-off on screen real-estate versus file footprint.
The key option that effects file size here is the recording format drop-down box. The option shown “11.025 kHz, mono, 16 bit” represents best playback quality for smallest file size of the options available. As it’s just my voice, there’s no need for stereo. 8 bit encodings sound too stratchy, and the higher sampling rate values (hertz) don’t seem to add any extra quality for simple voice-over audio (the value chosen is approximately 1/4 the rate at which CDs are sampled). If complex audio needs to come through (say music), it might pay to revisit that sampling rate.
Each of the video settings impact on the overall video quality and the final file size. A basic understanding of frame rates helps. For audio to sync well with video, the two “Framerates” settings (“Capture Frames Every”, and “Playback Rate”) need to multiply together to equal 1000 (1 second). The smaller the playback rate, the smaller the file size. Too small, and the video appears jerky. A playback rate of 25 frames per second represents a point (for me) where things are tolerably jerky without me becoming consciously aware of (or rather, irritated by) the jerkiness.
The quality slider has a direct effect of the sharpness of the image (and thus file size). For a truly losless codec like the “Microsoft Video 1” (the default codec), a “100” quality gives a perfect visual reproduction of the region being recorded, at the expense of file size. The less the quality, the grainier/fuzzier the picture gets. For me, a setting of “55” here represents the point just before I start consciously noticing the graininess. I’ve had problems with other codecs, so for now I’ll stick with the Microsoft one, but reserve the right to revisit this decision.
The “Set Key Frames Every” text box is important for reducing “artifacts” when a video changes rapidly (at least with this codec, some codecs ignore key frame settings). Generally speaking, for faster moving video, we should have more frequent key frames, but at the expense of a bigger file size. The value of “12” here represents a key frame approximately every ½ second, which again seems to be me to be a bit of a sweet spot in a tolerable degree of short-lived artifacts when doing desktop video recording. A smaller rate gives better results, but it’s already pretty good at 12. A less frequent rate, and the artifacts start to demand too much conscious attention away from the video content itself. If busy animations are being done by the application this setting may need revisiting.
There are useful cursor settings that I use to help draw the eye of the viewer to the mouse pointer. Here’s what I’m currently using. It’s just enough to put a bit of colour around the cursor without it interfering too much with the area around the cursor.
A Test Video
Below is the test video used for comparing file sizes against video and audio settings. Some notes on why it looks/sounds the way it does:
- It has audio all the way through (like a typical tutorial).
- It allows me to get a feel for how well the video and audio are are synchronising by binding the beat of my rhyme to tab selection.
- Quick tab selection change represents big, relatively frequent screen changes so it helps with getting artifact effecting settings down pat.
Ironically, a youtube replay embeeded in a WordPress style sheet with an editable region width smaller than the video’s recording width achieves the exact opposite of my intent with this exercise. Still, you can always push the quality up to 720p and view it full screen, or go to the extra length of embedding it in a separate web-page with the resolution set to the intended 1024×768.
To give you an idea on the file size differences, with the above settings, the test video comes in with a file size at about 3.6Mb. Default settings see a file size of about 7Mb.
And finally, ScreencastTutorial.org is a blog that’s not afraid to go deep around screencasting and CamStudio.