ASF / WMV conversion guide

You'll need the following software in this guide:

AviSynth
VirtualDub
Your favorite MPEG-4 codec

Step 0: Preparations

Install Graphedit and Avisynth as per the readme files that can be found in both packages.

Then play your ASF/WMV File in Windows Media Player 6.4 (c:\program files\windows media player\mplayer2.exe). During playback right click on the movie, and select statistics:

Then look at the Actual rate. It will normally fluctuate a little, especially if you have a lot of other tasks running in the background (in this case I had TMPG running so my CPU was maxed out). In any case, if it's around 23-24fps the source has a framerate of 23.976fps. If it's around 29-30fps it's framerate is 29.97fps and if it's around 25fps it's actually 25.00fps.

Step 1: Frameserving

If you can watch your video in a standard media player, AviSynth can frameserve it into any encoding application, even if the application itself cannot handle ASF or WMV input. Start up your favorite text editor (Notepad will do just fine), and type the following:

DirectShowSource("d:\T2_720.wmv", fps=23.976)

Replace the path with the path to your ASF/WMV file, and the 23.976 with the actual framerate of your source. Then save the file as video.avs.

Step 2: Encoding

Now start up VirtualDub, configure video and audio codecs, and encode. The codec parameters for DivX5, DivX6, XviD 1.0, XviD 1.1 and x264 can be seen by following the appropriate link (note that those documents are part of DVD to MPEG-4 encoding guides and may thus reference a lot of things that do not apply here, so ignore anything that you cannot find in the configuration dialog of your chosen codec).

Once you have configured your codec of choice, set Video to Fast Recompress, then save the AVI. This will start the encoding process.