If you’ve seen my previous post about encoding your DVD rips to Xvid with MeGUI than the battle for WMV conversion is 90% done. This post replaces the “Encoding with MeGUI” section of that guide. Encoding to WMV will utilize the same AviSynth script that we created there and that’s where this guide begins.
Windows Media Encoder going forward will be referred to as WME.
Preparation
Windows Media Encoder
Windows Media Player 11 (if you haven’t already upgraded)
If you don’t want to install Windows Media Player 11, you’ll still need the upgraded codecs that come bundled with it. You can download a standalone distribution here.
Windows Media 11 Format Runtime
WMCmd.vbs is a very small file that is included in the WME download and in fact the command-line version of WME. Officially, WME does not accept AviSynth scripts as input. However, a very generous Microsoft employee has (legally) taken it upon himself to “hack” this file to do so. Grab the file here. After you’ve done that, go to the install path of WME and find WMCmd.vbs that’s already there. Rename it anyway that you want - just don’t delete it. Then replace it with the hacked file.
Yay. We’re on our way.
Procedure
We’re going to create a batch file…well…because it’s easier than typing all of the command-line arguments directly into a non-point ‘n’ click world. It allows for easier entry and editing of said arguments. Start by opening up Notepad or your favorite plain text editor. Then copy and paste the following:
“C:\WINDOWS\system32\CScript.exe” “C:\…\WMCmd.vbs” -input “C:\…\my-script.avs” -output “C:\…\my-video.wmv” -v_codec wmv9 -v_mode 0 -v_buffer 5000 -v_bitrate 500000 -v_keydist 30 -v_quality 10 -v_performance 20 -pixelformat yv12 -v_profile sp -a_codec wmastd -a_setting 96_44_2 -a_mode 0
A few things to consider about all of that:
1. The path to WMCmd.vbs is relative because you could’ve installed WME wherever you wanted to so you’ll have to fill that in. The same goes for the path to your script and your output file.
2. -v_bitrate is video bit rate in bits/second. Don’t be too liberal here. I would stay in the range of 300 kbps to 700 kbps.
3. -a_setting is audio parameters - example 96_44_2 is 96 kbps, 44.1 kHz, 2-channel stereo. All of these can vary if you wish but again I wouldn’t stray too far off.
Save the text file and give it a bat file extension, foregoing the usual txt extension.
Got it? Good. We move on.
Before we dive in to command-line stuff, let’s make it easy to start up a command-line window for WME quickly and efficiently. Open up the folder where WME was installed and then open up a second window and navigate to the C:\Windows\system32 folder. In that second folder hit the letter ‘C’ on your keyboard and scroll down until you find cmd.exe. Right-click on it and select Copy. Then switch to the first window, right-click on an empty space and select Paste. Close the second window. In the first window, right-click and drag cmd.exe to your Desktop. On the context menu that appears, select Create Shortcuts Here. Double-click your new shiny shortcut.
My God we’re good. :-)
To call up our batch file for WME all that we have to do is type in the full path location and file name of the batch file itself.
Click Enter and watch video conversion magic happen right before your eyes. When the encoding is finished you will have a WMV file that will seamlessly and quickly sync to your Zen.
















