Archive for March, 2010

Convert AVI (or something else) to FLV

Posted by Paulo on Thursday, 11 March, 2010

To convert a video to the Flash Video format, use the mencoder command like this:

mencoder <SOURCE_VIDEO> -o <OUTPUT_VIDEO>.flv -of lavf -oac mp3lame -lameopts abr:br=56 -srate 22050 -ovc lavc -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3

Some (older?) versions of mencoder will require you to add the option -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames

This assumes you have the lamemp3 libs installed and that the output video rate shoud be 500k (good for web content). For better video quality increase the value at vbitrate=500 to something like 1000 or so.

This works fine on Ubuntu 7.04 (and probably any other system with mencoder installed).

On Fedora 11 and 12, I use this command line to convert a HD video to 800×450 with good quality:

mencoder <SOURCE_VIDEO> -o <OUTPUT_VIDEO>.flv -of lavf -oac mp3lame -lameopts abr:br=56 -srate 22050 -ovc lavc -lavcopts vcodec=flv:vbitrate=5000:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -vf scale=800:450

ShareThis

Welcome

Posted by Paulo on Wednesday, 10 March, 2010

You are very welcome to my liltle space on the internet. A mostly sane mix between a blog and a playground. Check the posts by category or choose your favorite tags. Feel free to comment.

ShareThis