powered by FreeFind     sms

My Way of Converting Any Video Format to MPEG/FLV for Free

6 Jan 2006

sharp_cell_phone.flv 2.82MB

The blurry quality of the video above is not because of the encoding. It was because of my cell phone video quality. The picture is showing a Sharp Japanese cell phone that can watch TV, type email, take/send video, with a loud speaker and all. And the best part is, the cell phone in the picture was free. I so wanted that free phone, but they were out of stock. I took this video at Tohoku University, Japan in 2005.

The jerkiness of sound is also because of the cell phone, not the encoding. Many thanks Jeroen Wijering (see reference) for the 3KB web-embedded FLV video player, this player is much better than the one I used before.

What is FLV?

FLV is the video format for flash. Google used flv files for Due to 2005 survey, flv is more cross-platform than other video formats online. That means if you make the video into flv format, it is more likely for others to watch your video online. This is why I wanted to play with flv video files.

Getting the Video to the MPEG-4 format

For converting different video formats, download VirtualDub at VirtualDub is the most popular open source video converting project on sourceforge. I used VirtualDub about 5 years ago, and it is nice to know VirtualDub is still popular. To use VirtualDub, press Ctrl+O to open the source video file, go to Video->Full processing mode, then Video->Compression. Select XviD MPEG-4 Codec or other MPEG-4 codec if you see them. Then press F7 or File->Save as AVI to save the file. You can optionally do the same for Audio. VirtualDub is very useful for converting to other video formats or editing videos (developed by a guy in UCSD).

  For VirtualDub, it is fast and free, but it doesn't handle WMV and ASF files. For that, I downloaded a software called Super Fever Link 1.79 from, which can handle both WMV and ASF files and also a (stupid) Japanese cell phone video encoding that was wrongly encoded. However, not all functions of Super Fever Link works, so try out all the options there.

Getting the MPEG-4 video to FLV

I tried to use Riva FLV Encoder from to make FLV files, but for some reasons the encoder didn't work for me. Therefore, I looked up the command line documentation, and typed in two commands with the MPEG-4 video file (input.mpg) in the same folder with ffmpeg.exe  and flvtool2.exe (both came with the Riva FLV Encoder). You can download the latest version of ffmpeg and flvtool2 in their websites (see reference). The latest versions have a lot more functions.

ffmpeg -i input.mpg video.flv

With the MPEG-4 video (input.mpg) and typing the ffmpeg command, I got a FLV file(video.flv). I downloaded a free standalone FLV Player (see reference below) to open the FLV video on my computer. Then I saw this raw flv file without any metadata. I couldn't resize the video, and the video size was smaller than the input.mpg video size 240x320. I needed to use the flvtool2.exe to add those metadata by typing:

flvtool2 u video.flv

Now I can resize the video, and the metadata is displayed above the video. The original input.mpg video rate is 496kbps(set for 450kbps) audio orginally at 133kbps (set for 128kbps), after converting I got, a output video.flv with 235kbps for video rate and 64kbps for audio rate. File size from 5.89MB to 2.82MB. Looks great for online video.

Reference / Thanks

FLV Player
Jeroen Wijering FLV Player
Riva FLV Encoder
Super Fever Link 1.79