Fast, free video conversion using FFmpeg
I recently had the task of converting a few videos to FLV and SWF format for use in a recent custom website design. The simplicity of this task using FFmpeg inspired me to share how I did it.
Downloading and installing FFmpeg
Windows users can download the latest windows version of FFmpeg and there are quite a few tutorials for MacOSX users.
Under Debian Linux, the package manager "Apt" allows users to easily install programs, remove or update them, and much more with ease. By typing the following command I had FFmpeg downloaded and installed automatically within a matter of seconds:
[ root@laptop: ~ ] apt-get install ffmpeg
Converting video using FFmpeg
After reading the manual for a few minutes and several test runs to determine the optimum quality/size, I came up with the following command to produce the desired FLV:
[ bjorn@laptop: ~ ] ffmpeg -i input-video.ogv -vb 400k -f flv -croptop 150
-cropbottom 100 -cropright 58 -cropleft 62 -r 15 -s 480x300 ~/output-video.flv
Which basically translates to "run ffmpeg, use input-video.ogv as the input file, a variable bit-rate of 400k, force the flv output format, crop 150, 100, 58 and 62 pixels from the top, bottom, right and left, respectively, force 15 frames/second on the output video, scale to produce a video with an output size of 480 by 300 pixels, save the output file to my home directory with the name output-video.flv".
This successfully converted a 105sec/22mb OGV video to a 5.5mb FLV in about 23 seconds on my laptop.
While these settings surely won't work perfectly for your conversion, adjusting them to your needs according to ffmpeg's syntax should be fairly straightforward.