Name: [3331] rfquerin-heathenx
Member: 105 months
Authored: 15 videos
Description: The goal of is to provide a means for allowing new users of the Inkscape community (or anyone else interested) to watch some basic and intermediate tutorials by Richard Querin and heathenx. We feel that through a screencast we can better convey the steps required to recrea ...

Encoding Screencasts in Linux with MEncoder [ID:539] (2/2)

in series: Screencasting in Linux

video tutorial by rfquerin-heathenx, added 02/08

(Showmedo is undergoing major changes. To report any problems viewing the videos please email us and include browser and OS specifics. Cheers - Kyran.)

In this screencast I demonstrate how to encode video made with recordMyDesktop using a shell script called h264enc, which invokes MEncoder.

#! /bin/bash
# written by heathenx for - modify to suit.
# Required packages: mplayer, mencoder, ffmpeg, h264enc, and vlc (vlc needed only to play your output video)

# Convert OGG to H.264/MP3 AVI - No B-Frames
# Uncomment below script to use
# mencoder out.ogg -ofps 26000/1001 -vf scale=800:600:0:0,harddup -sws 10 -af resample=22050:0:1 -srate 22050 -oac mp3lame -lameopts cbr:br=128:aq=4:vol=0.5:mode=3:highpassfreq=0:lowpassfreq=0 -ovc x264 -x264encopts qp=2:me=hex:nodct_decimate:nointerlaced:no8x8dct:threads=1:nofast_pskip:nobrdo:trellis=1:scenecut=40:chroma_qp_offset=0:ip_factor=1.4:pb_factor=1.3:nomixed_refs:noglobal_header:nobime:keyint=250:keyint_min=25:frameref=1:bframes=0:nob_adapt:nob_pyramid:noweight_b:subq=5:chroma_me:nocabac:nodeblock -o out_h264_mp3_nobf.avi

# Convert OGG to H.264/MP3 AVI - With B-Frames
# Uncomment below script to use
# mencoder out.ogg -ofps 26000/1001 -vf scale=800:600:0:0,harddup -sws 10 -af resample=22050:0:1 -srate 22050 -oac mp3lame -lameopts cbr:br=128:aq=4:vol=0.5:mode=3:highpassfreq=0:lowpassfreq=0 -ovc x264 -x264encopts bitrate=1000:me=umh:me_range=18:nodct_decimate:nointerlaced:8x8dct:threads=auto:nofast_pskip:nobrdo:trellis=1:partitions=p8x8,b8x8,i8x8,i4x4:mixed_refs:bime:frameref=3:bframes=4:b_adapt:b_pyramid:weight_b:direct_pred=auto:subq=5:chroma_me:cabac:deblock -o out_h264_mp3_withbf.avi

# Join Two or More AVI's (if you have an intro or outro file to append to scrrencast)
# Uncomment below script to use
# mencoder -oac copy -ovc copy intro.avi screencast.avi -o final.avi

# Convert B-Frame AVI to H.264/AAC MP4 (Quicktime comapatible)
# Uncomment below script to use
# mencoder final.avi -o final.mp4 -of lavf -lavfopts format=mp4 -vf harddup -oac lavc -ovc lavc -lavcopts acodec=libfaac:vcodec=libx264:vmax_b_frames=0:aglobal=1:vglobal=1

# Convert No B-Frame H.264/MP3 AVI to Flash Video (FLV)
# Uncomment below script to use
# mencoder out_h264_mp3_nobf.avi -oac mp3lame -lameopts cbr:br=128 -af resample=22050 -srate 22050 -ovc lavc -lavcopts vcodec=flv:vqscale=2:mbd=2:trell:cmp=2:precmp=2:subcmp=2:mbcmp=2:dia=2:cbp:v4mv:autoaspect -of lavf -lavfopts format=flv:i_certify_that_my_video_stream_does_not_use_b_frames -vf scale=800:600 -sws 10 -o final_screencast.flv

Got any questions?

Get answers in the ShowMeDo Learners Google Group.

Video statistics:

  • Video's rank shown in the most popular listing
  • Video plays: 3 (since July 30th)
  • Plays in last week: 0
  • Published: 102 months ago

Thank-yous, questions and comments

If this video tutorial was helpful please take some time to say thank-you to the authors for their hard work. Feel free to ask questions. Let the author know why their video tutorial was useful - what are you learning about? Did the video tutorial save you time? Would you like to see more?

You may also want to see our ShowMeDo Google Group to speak to our active users and authors.

Your email address will not be published.

Show some quick comments >>

All comments excluding tick-boxed quick-comments

13. christian louboutin shoes sale Mon, 19 Jul 2010 20:46

Excellent...learning a lot, for use when I teach this fall.

12. marinir seo jasa seo Wed, 24 Mar 2010 13:13

Excellent videos, really helpful.

11. anonymous Sun, 22 Nov 2009 16:19

Would be interested to know why Mencoder is preferred over ffmpeg.

much appreciated!

9. anonymous Mon, 24 Aug 2009 23:50

nice even style.. thanks

8. anonymous Wed, 10 Jun 2009 12:34

Excellent just what I was looking for!

7. anonymous Sun, 24 May 2009 22:59

thanks for the videos

Wonderful video! Let me try it and I 'll vote you again.

5. anonymous Tue, 31 Mar 2009 14:48

thanks for sharing your knowledge off gtk-recordmydesktop I needed it .

4. anonymous Mon, 17 Nov 2008 22:58

Great info for the newly minted Linux user, such as many of us are. Thanks.

3. anonymous Tue, 22 Apr 2008 21:50

Welldone, it gave me some new insights.

Nice very nice. I shall be having a play with this. I'll let you know how I get on.

Video published, thanks for contributing to ShowMeDo

Showmedo is a peer-produced video-tutorials and screencasts site for free and open-source software (FOSS)- with the exception of some club videos, the large majority are free to watch and download.

how to help » about » faq »

Educating the Open-source Community With Showmedo

Although as important as the software it supports, education and documentation are relatively neglected in the Open-source world. Coders love to code, and explaining how best to use or improve the software tends to be deferred or even sidelined.

At Showmedo we believe the community can play a vital role here and also say thanks for the tools and software that make our lives easier. If you have a piece of software you love or a programming langugage you are enthusiastic about, why not make a screencast showing others how to use it? All the stuff you wish you'd been told, the tips, tricks, insights that would have saved you time and frustration.

Screencasting is easier than you think, and we're happy to help you. You can emailus for advice or just use some of the how-to screencasts on the site. This screencasting learning-pathis a good place to start.

Kudos and Thanks for rfquerin-heathenx



Showmedo's development is fairly rapid and bugs will inevitably creep in. If you have any problems please drop us a line using the contact address below. Likewise, any suggestions for improvements to the site are gratefully received.