Wednesday, July 08, 2009

Simple and free FLV to AVI conversion in Windows

Both FLV and AVI are container formats. That means they merely wrap the audio and video data into a file. The data can be extracted from one file and put in another. Here's how to do it.

The program I use is VirtualDub. It is a free basic video editing and video capture application. To get it to open an FLV file, put the FLV Input Plugin (FLVInputDriver.vdplugin) into the VirtualDub plugins directory. With the plugin, FLV files may be opened by dragging them to VirtualDub or via the "File->Open video file..." dialog box. However, VirtualDub may still refuse to open your file, because FLV files often use video codecs which are not supported by default in Windows. I recommend FFmpeg, in particular ffdshow tryouts. When installing ffdshow tryouts, make sure you install the VFW interface. Afterwards you need to run the ffdshow "VFW configuration" (not "Video decoder configuration") and on the decoder tab enable the codecs you need. FLV can contain video in VP6F, FLV1, H.263, H.264 and possibly other formats.

When all this is done, converting FLV to AVI is simple. Open the FLV file in VirtualDub, in the Video menu select "Direct stream copy", make sure that's also selected in the Audio menu, and in the File menu select "Save as AVI...".

Note that the resulting AVI files still use video codecs which aren't supported by default in Windows. VirtualDub can also re-encode the video into a more popular codec. I recommend Xvid, which isn't supported by default but is a de-facto standard.

Also note that AVI is just another proprietary container format. Only convert videos to AVI if you really need to. There are many ways to play FLV files, and they can even be played in most DirectShow applications, like Windows Media Player.

1 comment:

Boris Gjenero said...

FLV Input Plugin v1.1.0 does not support all of the audio and video formats which may be found in an FLV file. FLV Extract supports more, but it's harder to work with the resulting files. H.264 video ends up in .264 files, which may be converted to .avi via avc2avi. Then there's the issue of multiplexing the audio and video properly.