![]() |
The following options are all of the command-line options that you can append to your command to achieve specific encoding results. If you have specified a profile in addition to any of these options, these options take precedence.
To access quick-reference Help from the command line, type cscript.exe wmcmd.vbs, and then press the ENTER key.
-a_codec codec_index
Specifies the audio codec. If you do not specify a codec, the Windows Media Audio 9 codec is used. Use the -a_codecs option to find out the codecs and codec indexes (for example, WMA9STD) that are installed on the encoding computer.
-a_codecs
Lists the audio codecs, codec indexes, and the encoding modes (CBR and VBR) supported for the codecs that are installed on the encoding computer.
-a_content mode_number
Specifies whether audio content is primarily voice (-a_content 1) or mixed (-a_content 2). By default, -a_content 0, which is neutral, is used. You must specify the Windows Media Audio 9 Voice codec when you use the -a_content option. For more information, see Optimizing audio for voice.
-a_contentedl file_name
If your audio content is a mix of voice and music, this option enables you to specify the places in the content where music starts and ends. You must specify the Windows Media Audio 9 Voice codec and -a_content 2 when you use the -a_contentedl option. For more information, see Optimizing audio for voice.
-adevice audio device number
Specifies the audio device to source from. For example:
cscript.exe wmcmd.vbs -adevice 1 -vdevice 4 –broadcast 8080 –duration 480
Use the -devices option to find out the device numbers for the audio and video capture devices on the encoding computer. The option -duration is required when capturing from devices.
-a_folddown6to2 surround channel center channel low frequency channel
Specifies, for multichannel audio encoding, how the six channels are automatically folded down to two channels for playback on stereo speakers. Use whole numbers only. The values, which must be between 0 and 144 decibels, are converted to negative numbers. For example:
cscript.exe wmcmd.vbs –input C:\My-songs\Song1.wav –output C:\My-songs-coded\Song1.wma -a_codec WMA9PRO -a_mode 2 –a_setting 640_48_6_24 -a_folddown6to2 3 3 12
-a_formats
Lists the audio formats (bit rate, sampling rate, and channels) supported by each codec.
-a_mode mode_number
Specifies the encoding mode for audio content. You can use one- or two-pass CBR encoding (-a_mode 0 or -a_mode 1, respectively), or a VBR encoding encoding mode: quality-based (-a_mode 2), bit rate-based (-a_mode 3), or peak bit rate-based (-a_mode 4). For more information, see Using CBR or VBR encoding.
-a_peakbitrate maximum bit rate
Specifies the maximum bit rate, in bits per second, for peak bit rate VBR encoding for audio content. The default is 1.5 times the audio bit rate. For example:
cscript.exe wmcmd.vbs –input C:\My-music\Mysong.wav –output C:\My-music-coded\Mysong.wma -a_mode 4 -a_setting 80_44_2 -a_peakbitrate 300000 -a_peakbuffer 8000
-a_peakbuffer maximum buffer size
Specifies the time, in milliseconds, that audio content is buffered. This option is used with peak bit rate-based VBR encoding for audio content. The default is 3,000 milliseconds. For example:
cscript.exe wmcmd.vbs –input C:\My-music\Mysong.wav –output C:\My-music-coded\Mysong.wma -a_mode 4 -a_setting 80_44_2 -a_peakbitrate 300000 -a_peakbuffer 8000
-a_setting bitrate_samplerate_channel
Specifies the audio bit rate, sample rate, and channel setting for encoding. Or, if you are using the Windows Media Audio 9 Professional or Windows Media Audio 9 Lossless codecs, -a_setting also specifies 16- or 24-bit encoding, as bitrate_samplerate_channel_bitspersample. Use the -a_formats option to view the settings supported for each codec. If you are using the Windows Media Audio 9 Voice codec, the default value is 12_16_1. If you are using the Windows Media Audio 9 Professional codec, the default value is 128_44_2_24 (unless you are also implementing a quality-based VBR session, in which case the default is Q75_44_2_24.) If you are using the Windows Media Audio 9 Lossless codec, the default is Q100_44_2_16. If you are encoding uncompressed content, the default value is 705_22_2. For all other scenarios, the default value is 64_44_2. For example:
cscript.exe wmcmd.vbs –input C:\My-songs\Song1.wav –output C:\My-songs-coded\Song1.wma –a_setting 32_44_2
For more information about using the -a_setting option with quality-based VBR encoding for audio, see Implementing a CBR or VBR encoding mode.
-audioonly
When sourcing from a file that contains both audio and video content, specifies to encode the audio portion only.
-author string
Specifies the author of your content; the information is displayed during playback of the content. If there are spaces in the string, enclose it in quotations. The maximum string length is 255 characters. For example:
cscript.exe wmcmd.vbs –input C:\My-songs\Song1.wav –output C:\y-songs-coded\Song1.wma –author "David Johnson"
-broadcast port_number
Specifies the HTTP port used to broadcast. The default is 8080. You must also include the -duration option when you source from devices. For example:
cscript.exe wmcmd.vbs –input C:\My-songs\Song1.wav –broadcast 9090
cscript.exe wmcmd.vbs -adevice 1 -vdevice 4 –broadcast 9090 –duration 620
-config file_name
Specifies the configuration file to use during the encoding session. Configuration files have a .weu file name extension. Use the -s_config option or a text editor to create a configuration file. For more information, see Using configuration files. For example:
cscript.exe wmcmd.vbs –config C:\My-config-files\Myconfig_file.weu
-copyright string
Specifies the copyright information for your content; the information is displayed during playback of the content. If there are spaces in the string, enclose it in quotations. The maximum string length is 255 characters. For example:
cscript.exe wmcmd.vbs –input C:\My-songs\Song1.wav –output C:\My-songs-coded\Song1.wma –copyright "David Johnson 2001"
-description string
Provides a description of your content; the information is displayed during playback of the content. If there are spaces in the string, enclose it in quotations. The maximum string length is 255 characters. For example:
cscript.exe wmcmd.vbs –input C:\My-songs\Song1.wav –output C:\My-songs-coded\Song1.wma –description "A collection of my favorite music"
-devices
Lists the audio and video devices (and their associated device numbers) on the encoding computer. You can use the device numbers when capturing a live event. (For more information, see the -adevice and -vdevice options.)
-duration time
Specifies the amount of time in seconds to encode. Use this option when you are sourcing from devices. Encoding starts at the beginning of the broadcast and stops when the duration you specified is reached. The actual encoding time will be within a few seconds of the time you specify. For example:
cscript.exe wmcmd.vbs -adevice 1 -vdevice 4 –broadcast 8080 –duration 480
-input file_name or folder_name
Specifies the name of the file or folder. For example:
cscript.exe wmcmd.vbs –input C:\My-clips\Myfile.avi -output C:\My-clips-coded\Myfile.wmv
cscript.exe wmcmd.vbs –input C:\My-clips -output C:\My-clips-coded
Enclose file or folder names that have spaces within quotation marks. For example, "my sample.avi".
You can view statistics about a source file by specifying the source file only in a command. For example:
cscript.exe wmcmd.vbs –input C:\My-clips\Myfile.avi
-loadprofile profile_file_name
Specifies the file name of the Windows Media Encoder or custom profile you want to use in the encoding session. Profiles have a .prx file name extension. (Use the -profile option if you want to use one of the predefined profiles that are provided with Windows Media Encoding Script.) For example:
cscript.exe wmcmd.vbs –input C:\My-clips\Myfile.avi -output C:\My-clips-coded\Myfile.wmv -loadprofile C:\My-profiles\500kbps_peakVBR.prx
For more information about creating a profile, see Using profiles.
-output file_name or folder
Specifies the name of the output file or folder. If the specified folder does not exist, it will be created. For example:
cscript.exe wmcmd.vbs –input C:\My-songs\Song1.wav –output c:\My-songs-coded\My-songs.wma
cscript.exe wmcmd.vbs –input C:\My-songs –output C:\My-songs-coded
-outputstring string
When encoding files in a folder, this command appends the text entered for the string to the file name of every output file. The string precedes the .wma or .wmv file name extension. For example:
cscript.exe wmcmd.vbs –input C:\My-songs –output C:\My-songs-coded –outputstring coded
-pixelratio x y
Specifies the pixel aspect ratio of the encoded video. Use if your video source has nonsquare pixels and you want to retain the pixel aspect ratio of the source video. For example:
cscript.exe wmcmd.vbs –input C:\My-clips\Myfile.avi -output C:\My-clips-coded\Myfile.wmv -pixelratio 8 9
-pixelformat format
Specifies the pixel format of the encoded video. For example:
cscript.exe wmcmd.vbs –input C:\My-clips\Myfile.avi -output C:\My-clips-coded\Myfile.wmv -pixelformat RGB32
For a list of pixel formats, see Supported pixel formats.
-profile profile_index
Specifies the predefined profile for the encoding session. (Use the -loadprofile option if you want to use a custom profile.) For example:
cscript.exe wmcmd.vbs –input C:\My-clips\Myfile.avi -output C:\My-clips-coded\Myfile.wmv -profile av700pal
For a list of profiles, see Using profiles.
-rating string
Specifies the rating of the content; this information is displayed during playback of the content. For example:
cscript.exe wmcmd.vbs –input C:\My-clips\Myfile.avi –output C:\My-clips-coded\Myfile.wmv –rating PG
-saveprofile profile_name
Saves the other options specified in a command as a profile for later use. Profiles have a .prx file name extension. For example:
cscript.exe wmcmd.vbs –input C:\My-clips\Myfile.avi -output C:\My-clips-coded\Myfile.wmv –v_clip 4 6 2 8 –v_codec WMV8 -v_bitrate 100000 –v_keydist 20 –v_framerate 24 -saveprofile C:\My-profiles\100kbps.prx
For more information about creating a profile, see Using profiles.
-silent
Prevents encoding statistics from being displayed after the encoding process is complete.
-s_config file_name
Creates a configuration file. For example:
cscript.exe wmcmd.vbs –input C:\My-clips\Myfile.avi –output C:\My-clips-coded\Myfile.wmv –s_config C:\Config-files\Myvideos.weu
You can also use a text editor to create a configuration file. After you have created the configuration file, you can use the -config option to call the file. For more information, see Using configuration files.
-time start time end time
Specifies the times in milliseconds within the input file that encoding should start and stop. (Use the -time option when your source is a file. Use the -duration option when you are capturing a live event from devices.) If you do not know the precise end time, then replace end time with end. For example:
cscript.exe wmcmd.vbs –input C:\My-clips\Myfile.avi –output C:\My-clips-coded\Myfile.wmv –time 10000 20000
cscript.exe wmcmd.vbs –input C:\My-clips\Myfile.avi -output C:\My-clips-coded\Myfile.wmv –time 10000 end
-title string
Specifies a title for your content; the information is displayed during playback of the content. If there are spaces in the string, enclose it in quotations. The maximum string length is 255 characters. For example:
cscript.exe wmcmd.vbs –input C:\My-songs\Song1.wav –output C:\My-songs-coded\Song1.wma –title "My Favorite Music"
-videoonly
When sourcing from a file that contains both audio and video content, specifies to encode the video portion only.
-v_bitrate bit rate
Specifies the desired bit rate in bits per second. The default is 250,000. For example:
cscript.exe wmcmd.vbs –input C:\My-clips\Myfile.avi –output C:\My-clips-coded\Myfile.wmv –v_bitrate 100000
-v_buffer size
Specifies the portion of the video in milliseconds that is stored in memory before it is played. The default value is 5,000 milliseconds. For example:
cscript.exe wmcmd.vbs –input C:\My-clips\Myfile.avi –output C:\My-clips-coded\Myfile.wmv –v_buffer 1000
-v_clip left top right bottom
Specifies the region of the image to be clipped from the source video. If the value specified for the right side is 0 or greater than the width, it is ignored and the value is reassigned to the width. If the value specified for the bottom side is 0 or greater than the height, it is ignored and the value is reassigned to the height. For example:
cscript.exe wmcmd.vbs –input C:\My-clips\Myfile.avi –output C:\My-clips-coded\Myfile.wmv –v_clip 4 6 2 8
-v_codec codec_index
Specifies the video codec. If you do not specify a codec, the Windows Media Video 9 codec is used. Use the -v_codecs option to find out the codecs and codec indexes (for example, WMS9) that are installed on the encoding computer.
-v_codecs
Lists the video codecs and codec indexes that are installed on the encoding computer.
-vdevice video device number
Specifies the video device to source from. For example:
cscript.exe wmcmd.vbs -adevice 1 -vdevice 4 –broadcast 8080 –duration 480
Use the -devices option to find out the device numbers for the audio and video capture devices on the encoding computer. The option -duration is required when capturing from devices.
-v_framerate rate
Specifies the frame rate at which the video is encoded. The rate can be an integer or a floating-point value. The default is 30 fps. For example:
cscript.exe wmcmd.vbs –input C:\My-clips\Myfile.avi –output C:\My-clips-coded\Myfile.wmv –v_framerate 24
-v_height height
Specifies the height of the frame in pixels that is encoded. The default is the height of the source video. For example:
cscript.exe wmcmd.vbs –input C:\My-clips\Myfile.avi –output C:\My-clips-coded\Myfile.wmv –v_height 480
-v_keydist time
Specifies the number of seconds between key frames. The default is 10 seconds.
-v_mode mode_number
Specifies the encoding mode for video content. You can use one- or two-pass CBR encoding (-v_mode 0 or -v_mode 1, respectively), or a VBR encoding mode: quality-based (-v_mode 2), bit rate-based (-v_mode 3), or peak bit rate-based (-v_mode 4). For more information, see Using CBR or VBR encoding.
-v_peakbitrate maximum bit rate
Specifies the maximum bit rate, in bits per second, for peak bit rate VBR encoding for video content. The default is 1.5 times the video bit rate. For example:
cscript.exe wmcmd.vbs –input C:\My-clips\Myfile.avi –output C:\My-clips-coded\Myfile.wmv -v_mode 4 -v_bitrate 100000 -v_peakbitrate 300000 -v_peakbuffer 8000
-v_peakbuffer maximum buffer size
Specifies the time, in milliseconds, that video content will be buffered for peak bit rate-based VBR encoding. The default is 5,000 milliseconds. For example:
cscript.exe wmcmd.vbs –input C:\My-clips\Myfile.avi –output C:\My-clips-coded\Myfile.wmv -v_mode 4 -v_bitrate 100000 -v_peakbitrate 300000 -v_peakbuffer 8000
-v_performance number
Specifies the hardware performance setting for the encoding computer. This option is intended to be used when you are encoding using the Windows Media Video 9 codec. If you do not specify a value, codec defaults are used. The possible values are 0, 20, 40, 60, 80, and 100, with 100 representing the highest quality. For more information about performance settings, see Windows Media Encoder Help.
-v_preproc filter_number
Specifies the preprocessing filter to apply to your content. For a list of the possible values, see Optimizing video and audio.
-v_profile device_conformance_index
Specifies the category of complexity of the encoded content. Use if you are targeting your content for playback on a hardware device other than a computer. Some hardware devices only support certain categories. (Refer to the documentation for your device for more information.) If you do not add the -v_profile option to a command, the correct complexity setting is selected automatically during encoding. Possible values are SP (simple), MP (main), or CP (complex). For example:
cscript.exe wmcmd.vbs –input C:\My-clips\Myfile.avi –output C:\My-clips-coded\Myfile.wmv –v_profile SP
Windows Media Encoder includes hardware profiles that are designed to target different types of hardware devices. For more information about these profiles, see Windows Media Encoder help.
-v_quality quality_number
Defines the image quality of the encoded video. Image quality ranges from 0 to 100. In the CBR video modes (-v_mode 0 or –v_mode 1), 0 represents the smoothest motion and 100 represents the crispest images. The default is 75. For example:
cscript.exe wmcmd.vbs –input C:\My-clips\Myfile.avi –output C:\My-clips-coded\Myfile.wmv –v_mode 0 –v_quality 40
In the quality-based VBR mode for video (-v_mode 2), this value represents the target image quality for the entire sequence. The default is 95. For example:
cscript.exe wmcmd.vbs –input C:\My-clips\Myfile.avi –output C:\My-clips-coded\Myfile.wmv –v_mode 2 –v_quality 95
-v_width width
Specifies the width of the frame in pixels that is encoded. The default is the width of the source video. For example:
cscript.exe wmcmd.vbs –input C:\My-clips\Myfile.avi –output C:\My-clips-coded\Myfile.wmv –v_width 640
-wme file name
Specifies an existing encoding session file. For example:
cscript.exe wmcmd.vbs –wme C:\My-sessions\My_session_file.wme