Converting ogv to flv - high quality and small files?

I've been working on how best to convert our instructional videos for www.virkpaanettet.dk (CMS homepages) from the original ogv format to flv (flash) videoes to put on the site.

After having used ffmpeg, as many examples prescribe, I finally found an example, using mencoder which works a whole lot better than the ffmpeg versions I have tested.

I(or my wife) record using gtk-recordmydesktop in a 1024x768 resolution - as the website needs to be fully visible and most designs are optimized for that screen size.

The following command converted a 7minute "screencast" to 640x480 with a size of only 14MB, and still a very good quality for this purpose atleast (you need to be able to fullscreen it, and it should still look good, and be readable :)

mencoder -of lavf -oac mp3lame -lameopts abr:br=56 -srate 22050 -ovc lavc -lavcopts vcodec=flv:vbitrate=250:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -vf scale=640:480-o outputmovie.flv sourcemovie.ogv
(add -audiofile yoursound.wav if you need to replace the soundtrack).

You can see the result here: http://www.virkpaanettet.dk/video/se-hvor-nemt-det-er

3 comments on Converting ogv to flv - high quality and small files?

  1. Anonymous
    Mon, 09/28/2009 - 20:58
    I needed to screencast a web app that used a bigger screen so I needed the higher resolution to see the text on my demo app. This worked great for me. I'm sure there has to be a way to change the quality settings with ffmpeg, but didn't have the time to look. Your mencoder line example had the perfect settings for me!

    FYI the previous comment was right you needed to have a space before the -o, like so:

    mencoder -of lavf -oac mp3lame -lameopts abr:br=56 -srate 22050 -ovc lavc -lavcopts vcodec=flv:vbitrate=250:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -vf scale=640:480 -o outputmovie.flv sourcemovie.ogv
  2. Anonymous
    Wed, 03/25/2009 - 12:04
    The part 'scale=640:480-o' does need to be 'scale=640:480 -o', doesn't it?
  3. klavs
    Thu, 04/02/2009 - 08:11

    Yup - typo error :)