Windows Media Encoder banner art

Batch encoding

By using batch encoding, you can encode numerous files in quick succession instead of having to issue a separate encoding command for each file. For batch encoding, you create a batch file or a text file with a .bat extension, which includes all of the encoding commands that you want to use. These commands might include the names of your input and output files, profiles you want to use, and other command-line options you want to apply. There is no limit to the number of commands that you can include in a batch file, and because it is a basic text file, editing is easy.

When you are ready to run the batch file, navigate to the folder where Windows Media Encoding Script is installed, and then type the name of the batch file. For example, Mybatch.bat.

The commands in the following example are some of the commands that you might find in a batch file. The example demonstrates how to use commands to take a 640 ╫ 480, 24-fps film source that has been telecined to 30 fps and convert it to 24 fps by using an inverse telecine filter before encoding it. The first two commands instruct the tool to use quality-based variable bit rate (-v_mode 2) to encode the source at quality settings of 95 and 97, respectively. The final two commands instruct the tool to use two-pass constant bit rate (-v_mode 1) encoding to encode the source at 1 megabit per second (Mbps) and 500 kilobits per second (Kbps), respectively.

cscript.exe wmcmd.vbs -input C:\My-clips\Mymovie.avi -output C:\My-clips-coded\Mymovie-640x480-vbr095.wmv -v_mode 2 -v_quality 95 -v_keydist 30 -v_preproc 5
cscript.exe wmcmd.vbs -input C:\My-clips\Mymovie.avi -output C:\My-clips-coded\Mymovie-320x240-vbr097.wmv -v_mode 2 -v_quality 97 -v_keydist 30 -v_preproc 5 -v_width 320 -v_height 240
cscript.exe wmcmd.vbs -input C:\My-clips\Mymovie.avi -output C:\My-clips-coded\Mymovie-640x480-cbr2.wmv -v_mode 1 -v_bitrate 1000000 -v_keydist 30 -v_buffer 10000 -v_quality 100 -v_preproc 5
cscript.exe wmcmd.vbs -input C:\My-clips\Mymovie.avi -output C:\My-clips-coded\Mymovie-320x240-cbr2.wmv -v_mode 1 -v_bitrate 500000 -v_keydist 30 -v_buffer 10000 -v_quality 100 -v_preproc 5 -v_width 320 -v_height 240

Related topics


© 2000-2002 Microsoft Corporation. All rights reserved.