![]() |
Using Windows Media Encoding Script, you can take files with .wma, .wmv, .asf, .avi, .wav, .mpg, .mp3, .bmp, .jpg, and .vob file name extensions and compress them into Windows Media Format. You can convert a single file, all files within a folder or subfolders, or use a batch file to convert files you specify. You can also use Windows Media Encoding Script to capture a live event from devices. You can choose to either output to a file or broadcast the content.
Windows Media Encoding Script is installed in the same folder as Windows Media Encoder. By default, the folder is located in Program Files\Windows Media Components\Encoder.
The following examples show how you can complete various tasks by using basic command-line syntax:
To source from a file and encode to a file:
cscript.exe wmcmd.vbs input C:\My-clips\Myfile.avi output C:\My-clips-coded\Myfile.wmv
You can also specify a
To encode all files within a folder:
cscript.exe wmcmd.vbs input C:\My-clips output C:\My-clips-coded
To source from devices and encode to a file:
cscript.exe wmcmd.vbs adevice 1 -vdevice 2 output C:\My-clips-coded\Myfile.wmv -duration 620
To broadcast a live event:
cscript.exe wmcmd.vbs adevice 1 -vdevice 2 broadcast 8080 -duration 480
Additional command-line options can be appended to the end of the basic command. These options enable you to specify profiles, set start and end times, designate configuration files, set the buffer size and image quality settings, and so on.