Tips and Encoding Settings for Long Duration Screencasts

mpare's picture

After several sets of trial and error I found that the settings provided in this document have rendered desirable output for me when creating basic “screencasts.” These settings have been tested on long duration videos, in excess of 1 hour. I have had final file sizes as low as 66 MB for a video that is nearly two hours long with a final screen resolution at or near 800 x 600. Your usage and mileage may vary but these settings have proven successful for me.

These settings and recommendations are based off of the settings found on drupal.org node #62196.

Video Settings

Codec Type: H.264
Frame Rate: 10 fps
Frame Controls: Automatic (if available)
Key Frames: Every 500 frames (use frame reordering if available)

Quality:
Pixel depth: 24
Spatial quality: 50
Temporal Quality: 50
Minimum Temporal Quality: 25

If your software only has options like low, medium and high you should be able to just select “medium” and still have your videos turn out fine.

When available use multi-pass encoding, your end file size will be smaller and sometimes the quality is even better.

Again if available, use an automatic data rate. If this option is not available for your software you may need to do some experimentation. The higher the number the larger your end file size will be.

Audio Settings

Codec Type: IMA 4:1
Channels: Mono
Rate: 12.000 kHz

If your video has music or other attributes you may wish to tweak these settings some. I found that these settings work well for voice only. Also you should be cautious of your audio level when using such low quality settings because if your levels get too high your audio track may develop a slight squeak or just peak out and sound awful.

I’m using a file extension of *.mov, but I think a few other extensions work as well it just depends on what software and actual codec you are using.

I am using Apple Compressor but you should be able to use any encoding software and yield very similar results. Mencoder and ffmpeg are both very good video encoders and I believe they are both open source. It is my understanding that Mencoder is very good and fast at encoding H.264 video, especially on Mac Dual G5 and Dual Core computers. Again your experience may differ as I have not personally tested these settings with mencoder or ffmpeg. I plan to do so very soon.

Remember your video will only be as good as your source, so if you are recording off a remote desktop or something your video is already being compressed. Try to obtain your recordings from the source when and if possible. Also if you are recording system audio when making your recordings, try to remember to turn off all the alerts for your email programs and instant messenger applications. Your audience probably doesn’t want to hear a little “bonk” every time someone instant messages you.

It’s always a good practice not to resize your videos if possible during encoding. A native screen resolution is always best, but often not an option. The following snippets can be used to resize your web browser. Just copy and paste them into your “address” field or save them as bookmarks.

javascript:void(window.resizeTo(1024,768))
javascript:void(window.resizeTo(800,600))
javascript:void(window.resizeTo(640,480))

Like I said, it’s not always possible or desirable to encode your video in its native screen size. So if you have to scale your video try to maintain a screen resolution of 640 x 480 or higher. Even at 800 x 600 small text can be difficult to read. When I encode video I try to keep each length as an even number. Try to avoid sizes like 559 x 649 as I have found even numbers encode better. Some software applications do not have a setting to maintain your video’s aspect ratio. In those cases you may think you can just “guess” a screen resolution. Don’t! If ever in doubt, some simple math can save you a lot of time. Just try this…

Determine the desired final dimension of one side of your video, either the length or the height. Now divide that number by the size of the same side of your source video. Now save the answer and multiply whichever side of the video you didn’t use by that answer. You now have the final dimensions of your encoded video. If any of the final numbers turn out to be odd, just round up to make it an even length. Some may say that is not a good idea, but I have found that it yields desirable results. It’s ok to cheat it by a pixel or two, but you should avoid dramatically altering a length.

That explanation may be a bit confusing so let me give an example. I just have created a screen capture and my video has the dimensions of 1012 x 757. That’s way to big. My video is nearly two hours long, if I kept that size, my final video would be 250MB or even much larger than that. So I want to make this smaller, but still be able to read the text. I am going to say I want my final video to be as close to 800 x 600 as possible. As I have found that size still allows most text to be readable. So I am going to divide my desired output width of 800 by my source length of 1012.

800 / 1012 = .790513834

So now I need to determine the height for my final video. So I take the answer of the above equation multiply it by the height of my source video. So in my example I would multiply my source height of 757 by .79513834.

757 * .79513834 = 598.419

So I am just going to round this number off to 598.

My final video size will now be 800 x 598. Perfect!

Now that we have all these settings, plug them into your software and go.

Hope this helps. Playback tested in QT 7.1.3, VLC media player V 0.8.5, and MPlayer OSX V 1.0 rc1 all on a Mac PPC.

-Matt
www.paretech.com

Comments

This is great information

matt@antinomia's picture

This is great information Matt, thanks!

--
Matt Koglin, Antinomia Solutions

Very cool...

trailerparkopera's picture

Had a long conversations about these issues just today, with no result. Then I stumbled on this. Thanks!

technology behind it?

emilyf's picture

hey
i am looking to find more info about the rest of the technology behind the dojo live sessions. I get the video encoding stuff above, and thanks so much for posting that. But I am looking to find out how you do the screencast and webcast it live along with having a chat room on skype...I am looking to do this for drupal tutorials across my state to non-profit orgs....

much appreciated,

emilyf

Oops

mpare's picture

I ment to reply to your previous comment but accidentally started a new comment. You can view my reply above or by clicking.

Peace,

Matthew Pare

Pare Technologies
info at paretech dot com

www.paretech.com

Peace,

-mpare

Pare Technologies
Drupal Consulting, Themeing, and Module Development
806.781.8324 | 806.733.3025
www.paretech.com

Figure Something Out? Document Your Success!

Thanks so much for this

emilyf's picture

Thanks so much for this info, much appreciated. I will let you know if I have further questions!

Emily

Technology Behind Dojo Video

mpare's picture

I don' t have all the specifics for you Emily, but I can give you a little info and if you want more I'll be happy to get you additional information. I have not hosted one of these sessions myself, so I may not be the best person to give you this information. When I have attended lessons we used Skype for audio only, though I do believe you can host large chats I just have never done it. Here is a link for some information on Skype private chat rooms, it is from November so I don't know how much if any at all has really changed. We use IRC to facilitate an environment for chatting and exchange of other information. As far as the live video of our working screen I believe we have been using VNC. I'm not 100% sure on this, but I think we are using TightVNC. "TightVNC is a free remote control software package derived from the popular VNC software," as stated on www.TightVNC.com. Webavant takes care of hosting the actual live sessions, here is a link to the java client that he has set up for us. If you go to that link you will see the "viewer" window, an IRC client window and a link to the Skype join page. The IRC chat and the VNC viewer are separate applications placed on a single page with the Skype announcement via frames. I'm sorry that I don't have specifics on setup and configuration for you, I am rather certain that the subject is heavily documented if you do a quick google. We also record our sessions to distribute at a later time. Josh Koenig, also known as josh_k, and I both use Snapz Pro X to record video screen captures. There are many different applications capable of performing similar results for both PC and Mac, and I would imagine other platforms as well. Somethings worth mentioning might be that we set the color to 16-bit (this may not be the exact setting) for the live VNC sessions to help cut down on bandwidth. I have also noticed that increasing your text size in the applications you will be using will allow you to create lower resolution videos, translating to smaller file sizes, that are still legible when you re-encode the videos at a later time. That's about all I can come up with off the top of my head. Again if you want a more details I would be happy to do some research on exactly what we are using.

Well I hope that helps some.

Peace,

Matthew Pare

Pare Technologies
info at paretech dot com

www.paretech.com

Peace,

-mpare

Pare Technologies
Drupal Consulting, Themeing, and Module Development
806.781.8324 | 806.733.3025
www.paretech.com

Figure Something Out? Document Your Success!

for the screencapture (movie) on windows

greggles's picture

Here's my experience:

Wink - makes nice flash movies with forward back - may not be as good for really long movies - movie format output (e.g. avi) is not so good - free but not Open Source.
CamStudio - makes decent small movies and has autopan, but didn't work 100% reliably for me and has limited features - free and Open Source.
camtasia - solid full editing suite including outputting of the movies in various formats, adding music, editing the vocal track, etc. Also costs $300 and is closed source.
windows media encoder produces good movies and has many features (though less than camtasia) but only outputs to WMV files which are not as portable. free but not Open Source.

So...that's it.

--
Knaddison Family | mmm Free Range Burritos

Other screen capture software

mango-gdo's picture

CamStudio
Great and fast. Video, Audio, Custom windows size and output. Great codec included in download as well, which can be used by Wax. Unlike Greggles, I did not have any problems with this program. - Freeware

ZD Soft Screen Recorder
Works great by itself. The output AVI-file is difficult to edit. The AVI-codec is often not recognised by video editing programs. - Freeware

AviScreen Recorder
(Did not record audio for me). Otherwise it worked. - Freeware

Comprehensive list of screen recorders at wikipedia

mango-gdo's picture

I haven't had time to look into this, but there is a fairly comprehensive list of screen recorders on Wikipedia for all platforms.

http://en.wikipedia.org/wiki/List_of_screen_recording_software

magdelaine's picture

I tried (and failed) to capture the impromptu Dojo lesson of May 13th. Although the reason it was lost was due to human (ahem, my) error and not Camstudio, if it hadn't been lost it would have been unusable. This is because the latest version of Camstudio doesn't support recording from the speakers (see the blog post about that here). A test showed that it was recording through the mic that was picking up the Skypecast from the laptop speakers and the result was ugly to say the least. Of course, I have v.2.0, not 2.5 as referenced in the blog post, but I could not get it to record from the speakers no matter what I tried.

Whereas this is not a problem if the one presenting the VNC/Skypecast is also screen capturing, it is definitely a problem for those who are trying to support a lesson by screen capturing while the teacher just teaches (one of the goals for dojocho). A low-cost or freeware/open source solution is a must if the ideal of having several volunteers capturing video/audio (or even just audio) for redundancy is to be realized.

I would like to see the screen capturing software suggestions more definite and workable for each platform if we are to encourage participation from newbie teachers and volunteers.

learn one, teach one, do one

This Is A Good Idea

mpare's picture

This sounds like a good idea. I will look into free/open/low-cost solutions for Mac PPC/Intel and hopefully test some solutions for PC. I would be interested in seeing other's findings as well.

Peace,

Matthew Pare

Pare Technologies
info at paretech dot com
www.paretech.com

Did you figure out how to do something? Document it on Drupal.org!

Peace,

-mpare

Pare Technologies
Drupal Consulting, Themeing, and Module Development
806.781.8324 | 806.733.3025
www.paretech.com

Figure Something Out? Document Your Success!

H.264 Video Compression Settings for Small videos

KentBye's picture

I come from the videoblogging community where there are some compression wizards.

Below is a screenshot of the H.264 settings that I use:

H.264 Video Compression Settings

Click here to see the full-sized version of this.

So it turns out that if you use Quicktime's MP4 instead of mov, then that multi-pass can allow you to have a much higher data rate and frame rate and audio frequency.

A video that was 4:29, and 176 MB can get down to a little over 15MB at 30 frames per second, 550 kbits/sec, and 44.1 kHz audio.

One thing not in the photo is to note that if there are a lot of compression artifacts that don't refresh quickly enough that you can try to increase the frequency of the keyframes, or select "Automatic" instead of the default 24.

NOTE: I say that this is particularly good for small videos because these compression settings can take anywhere from 5-10x the amount of time to compress than the actual length of the video. So a 3-minute video could take anywhere from 15-30 minutes to compress, which may not be as convenient for longer videos.

UPDATE: I forgot to mention that the compression times seem to be even longer for non-intel macs. So it could take even longer depending on the speed of your computer.

I'm impressed!

Senpai's picture

/me bows down before the awesomeness of the videoblogger's knowledgebase. Wao!
Senpai (my d.o account)


Joel Farris | my 'certified to rock' score
Transparatech
http://transparatech.com
619.717.2805