Documente online.
Zona de administrare documente. Fisierele tale
Am uitat parola x Creaza cont nou
 HomeExploreaza
upload
Upload




Windows Media Encoding Script

computers


Windows Media Encoding Script

Legal Notice

Information in this document, including URL and other Internet Web site references, is subject to change without notice. Unless otherwise noted, the example companies, organizations, products, people and events depicted herein are fictitious and no association with any real company, organization, product, person or event is intended or should be inferred. Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation.



Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property.

© 2000-2002 Microsoft Corporation. All rights reserved.

Microsoft, MS-DOS, Windows, Windows Media, Windows NT, ActiveSync, ActiveX, Direct3D, DirectDraw, DirectInput, DirectMusic, DirectPlay, DirectShow, DirectSound, DirectX, FrontPage, JScript, Microsoft Press, MSN, NetShow, Outlook, PowerPoint, Visual Basic, Visual C++, Visual InterDev, Visual J++, Visual Studio, WebTV, Win32, and Win32s are either registered trademarks or trademarks of Microsoft Corporation in the U.S.A. and/or other countries.

The names of actual companies and products mentioned herein may be the trademarks of their respective owners.

Table of Contents

Windows Media Encoding Script

Encoding files and live events 

Batch encoding

Using profiles 

Audio and video profiles

av20

av32

av100

av225

av350

av450

av700

av1400

av350pal

av700pal

av100_2p

av350_2p

av600vbr

avq97vbr

Audio-only profiles

a20_1

a20_2

a32

a48

a64

a96

a128

Video-only profiles

v20

v32

Advanced encoding techniques 

Optimizing video and audio

Deinterlacing filters

Inverse telecine filters

Interlacing filters

Optimizing audio for voice

Using CBR or VBR encoding

Implementing a CBR or VBR encoding mode 

Sourcing from multichannel audio files 

Using configuration files 

Using command-line options 

Supported pixel formats

Frequently asked questions 

Glossary

Windows Media Encoding Script

Microsoft® Windows Media® Encoding Script is a command-line tool you can use to convert both live and prerecorded audio and video into Windows Media files or streams. Using Windows Media Encoding Script, you can:

Convert files with .wma, .wmv, .asf, .avi, .wav, .mpg, .mp3, .bmp, and .jpg file name extensions.

Capture a live event from devices.

Broadcast the encoded files or live event.

Customize the encoding session, including specifying a profile, encoding specific portions of a file, and clipping and resizing the source video.

This documentation explains how to use Windows Media Encoding Script. It is organized as follows:

Encoding files and live events. Explains how to perform basic encoding tasks by using some of the more common command-line options.

Using profiles. Explains how profiles are used and lists all of the profiles available in Windows Media Encoding Script.

Advanced encoding techniques. Explains some of the encoding filters that are available to improve the quality of your video. This section also lists all of the command-line options that are available in Windows Media Encoding Script.

Frequently asked questions. Provides answers to common questions about Windows Media Encoding Script.

Glossary. Defines terms that are related to Windows Media Encoding Script.

Encoding files and live events

Using Windows Media Encoding Script, you can take files with .wma, .wmv, .asf, .avi, .wav, .mpg, .mp3, .bmp, and .jpg 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 UNC path.

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. For example, you can specify either CBR or VBR encoding, apply a deinterlacing filter to source video, specify a profile to use, and so on. You can add command-line options to a command in any order.

Related topics

Windows Media Encoding Script

Using command-line options

To open a command prompt window

To encode a file

To encode all files within a folder

To capture a live event

Batch encoding

To open a command prompt window

Click Start.

Point to Programs.

Point to Accessories, and then click Command Prompt.

Related topics

Encoding files and live events

To encode a file

Open a command prompt window.

At the command prompt, type the path to the folder where the file Wmcmd.vbs is located. For example:

cd \program files\windows media components\encoder

Type the following command, and then press the ENTER key:

cscript.exe wmcmd.vbs -input drive:\Path\Input_file_name -output drive:\Path\Output_file_name

- or -

cscript.exe wmcmd.vbs -input drive:\Path\Input_file_name -broadcast port_number

For example:

cscript.exe wmcmd.vbs -input C:\My-clips\Myfile.avi -output C:\My-clips-coded\Myfile.wmv

- or -

cscript.exe wmcmd.vbs -input C:\My-clips\Myfile.avi -broadcast 9090

Notes

If you do not specify a file name extension for the output file, an extension is automatically appended to the file name.

Enclose file names that have spaces in quotations. For example, "my sample.avi".

Related topics

Encoding files and live events

To encode all files within a folder

To capture a live event

To encode all files within a folder

Open a command prompt window.

At the command prompt, type the path to the folder where the file Wmcmd.vbs is located. For example:

cd \program files\windows media components\encoder

Type the following command, and then press the ENTER key:

cscript.exe wmcmd.vbs -input drive:\Input_folder -output drive:\Output_folder

For example:

cscript.exe wmcmd.vbs -input C:\My-songs -output C:\My-songs-coded

Notes

If the output folder does not already exist, it is created for you.

Enclose folders that have spaces in quotations. For example, "my folder."

Related topics

Encoding files and live events

To encode a file

To capture a live event

To capture a live event

Open a command prompt window.

At the command prompt, type the path to the folder where the file Wmcmd.vbs is located. For example:

cd \program files\windows media components\encoder

Type the following command, and then press the ENTER key:

cscript.exe wmcmd.vbs -adevice audio_capture_device_number -vdevice video_capture_device_number -output drive:\Path\Output_file_name -duration time

- or -

cscript.exe wmcmd.vbs -adevice audio_capture_device_number -vdevice video_capture_device_number -broadcast port_number -duration time

For example:

cscript.exe wmcmd.vbs -adevice 1 -vdevice 4 -output C:\My-clips\Myfile.wmv -duration 620

- or -

cscript.exe wmcmd.vbs -adevice 1 -vdevice 4 -broadcast 8080 -duration 620

Note

You can use the -devices option to find out the device numbers for the audio and video capture devices on the encoding computer.

Related topics

Encoding files and live events

To encode a file

To encode all files within a folder

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 ) 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 ) 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

Encoding files and live events

Using profiles

A profile is a collection of command-line options tailored to the type of content being encoded, the connection speed of the intended audience, and the desired image quality of the output. If you do not specify a profile for a session, the following default options are used for the profile:

Windows Media Audio 9 and Windows Media Video 9 codecs

One-pass CBR encoding

Frame rate of 30 fps

Height and width that match the input source

Stereo channel audio

Sampling rate of 44,100 hertz (Hz)

Buffer of 5,000 milliseconds

Smoothness setting of 75

Key frame distance of 10 seconds

Audio and video bit rates of 64 and 250 kilobits per second (Kbps), respectively

You can override any of the default options by appending other command-line options to the command.

You can also create a custom profile by specifying each of the options you want to use in the command. You can then append the -saveprofile option to the command to save your profile and use it again. You can then use the -loadprofile option to reuse the profile or to encode content using a Windows Media Encoder profile. Profiles have a .prx file name extension.

Windows Media Encoding Script includes a number of predefined profiles that you can use in a session (using the -profile option).

Related topics

Windows Media Encoding Script

To specify a profile for a session

Audio and video profiles

Audio-only profiles

Video-only profiles

Using configuration files

Using command-line options

To specify a profile for a session

Open a command prompt window.

At the command prompt, type the path to the folder where the file Wmcmd.vbs is located. For example, type:

cd \Program Files\Windows Media Components\Encoder

Do one of the following:

To specify a profile that is included with Windows Media Encoding Script, type the following command, and then press the ENTER key:

cscript.exe wmcmd.vbs -input drive:\Path\Input_file_name -output drive:\Path\Output_file_name -profile profile_number

For example:

cscript.exe wmcmd.vbs -input C:\My-clips\Mmyfile.avi -output C:\My-clips-coded\Myfile.wmv -profile av100

To specify a Windows Media Encoder profile or a custom profile you created, type the following command, and then press the ENTER key:

cscript.exe wmcmd.vbs -input drive:\Path\Input_file_name -output drive:\Path\Output_file_name -loadprofile drive:\Path\profile_file_name

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

Related topics

Using profiles

Audio and video profiles

Windows Media Encoding Script includes 14 system profiles for encoding content that contains both audio and video. The following table contains a brief description of each profile.

Profile name

Bit rate (Kbps)

Description

av20

20

28-Kbps modem

av32

32

56-Kbps modem

av100

100

Local area network (LAN)

av225

225

LAN

av350

350

LAN and digital subscriber line (DSL)

av450

450

LAN and DSL

av700

700

Near-broadcast-quality National Television Standards Committee (NTSC)

av1400

1,400

Near-broadcast-quality NTSC

av350pal

350

Broadband Phase Alternating Line (PAL)

av700pal

700

Near-broadcast-quality PAL

av100_2p

100

LAN and two-pass constant bit rate (CBR)

av350_2p

350

LAN, DSL, and two-pass CBR

av600vbr

600

Film, CBR (audio), and peak variable bit rate (VBR) (video)

avq97vbr

--

Film, CBR (audio), and quality-based VBR (video)

Related topics

Using profiles

av20

Name: av20 (Profile_AudioVideo_Modem_28K)

Audio codec: Windows Media Audio 9

Audio bit rate: 5,000 bps

Sampling rate: 8,000 Hz

Number of channels: 1

Video codec: Windows Media Video 9

Encoding mode: One-pass CBR

Video optimization: None

Video bit rate: 15,000 bps

Frame width: 160 pixels

Frame height: 120 pixels

Frame rate: 15 fps

Buffer: 5,000 msec

Smoothness/quality: 75

Key frame distance: 10 sec

Total bit rate: 20,000 bps

Related topics

Audio and video profiles

av32

Name: av32 (Profile_AudioVideo_Modem_56K)

Audio codec: Windows Media Audio 9

Audio bit rate: 10,168 bps

Sampling rate: 11,025 Hz

Number of channels: 1

Video codec: Windows Media Video 9

Encoding mode: One-pass CBR

Video optimization: None

Video bit rate: 22,000 bps

Frame width: 176 pixels

Frame height: 144 pixels

Frame rate: 15 fps

Buffer: 5,000 msec

Smoothness/quality: 75

Key frame distance: 10 sec

Total bit rate: 32,168 bps

Related topics

Audio and video profiles

av100

Name: av100 (Profile_AudioVideo_LAN_100K)

Audio codec: Windows Media Audio 9

Audio bit rate: 16,000 bps

Sampling rate: 16,000 Hz

Number of channels: 1

Video codec: Windows Media Video 9

Encoding mode: One-pass CBR

Video optimization: None

Video bit rate: 84,000 bps

Frame width: 320 pixels

Frame height: 240 pixels

Frame rate: 15 fps

Buffer: 5,000 msec

Smoothness/quality: 75

Key frame distance: 10 sec

Total bit rate: 100,000 bps

Related topics

Audio and video profiles

av225

Name: av225 (Profile_AudioVideo_LAN_256K)

Audio codec: Windows Media Audio 9

Audio bit rate: 40,000 bps

Sampling rate: 32,000 Hz

Number of channels: 2

Video codec: Windows Media Video 9

Encoding mode: One-pass CBR

Video optimization: None

Video bit rate: 185,000 bps

Frame width: 320 pixels

Frame height: 240 pixels

Frame rate: 30 fps

Buffer: 5,000 msec

Smoothness/quality: 75

Key frame distance: 10 sec

Total bit rate: 225,000 bps

Related topics

Audio and video profiles

av350

Name: av350 (Profile_AudioVideo_LANDSL_384K)

Audio codec: Windows Media Audio 9

Audio bit rate: 48,000 bps

Sampling rate: 32,000 Hz

Number of channels: 2

Video codec: Windows Media Video 9

Encoding mode: One-pass CBR

Video optimization: None

Video bit rate: 302,000 bps

Frame width: 320 pixels

Frame height: 240 pixels

Frame rate: 30 fps

Buffer: 5,000 msec

Smoothness/quality: 75

Key frame distance: 10 sec

Total bit rate: 350,000 bps

Related topics

Audio and video profiles

av450

Name: av450 (Profile_AudioVideo_LANDSL_768K)

Audio codec: Windows Media Audio 9

Audio bit rate: 64,040 bps

Sampling rate: 44,100 Hz

Number of channels: 2

Video codec: Windows Media Video 9

Encoding mode: One-pass CBR

Video optimization: None

Video bit rate: 386,000 bps

Frame width: 320 pixels

Frame height: 240 pixels

Frame rate: 30 fps

Buffer: 5,000 msec

Smoothness/quality: 75

Key frame distance: 10 sec

Total bit rate: 450,040 bps

Related topics

Audio and video profiles

av700

Name: av700 (Profile_AudioVideo_NearBroadCast_700K)

Audio codec: Windows Media Audio 9

Audio bit rate: 64,040 bps

Sampling rate: 44,100 Hz

Number of channels: 2

Video codec: Windows Media Video 9

Encoding mode: One-pass CBR

Video optimization: None

Video bit rate: 636,000 bps

Frame width: 320 pixels

Frame height: 240 pixels

Frame rate: 30 fps

Buffer: 5,000 msec

Smoothness/quality: 75

Key frame distance: 10 sec

Total bit rate: 700,040 bps

Related topics

Audio and video profiles

av1400

Name: av1400 (Profile_AudioVideo_NearBroadCast_1400K)

Audio codec: Windows Media Audio 9

Audio bit rate: 128,040 bps

Sampling rate: 44,100 Hz

Number of channels: 2

Video codec: Windows Media Video 9

Encoding mode: One-pass CBR

Video optimization: None

Video bit rate: 1,272,000 bps

Frame width: 320 pixels

Frame height: 240 pixels

Frame rate: 30 fps

Buffer: 5,000

Smoothness/quality: 75

Key frame distance: 10 sec

Total bit rate: 1,400,040 bps

Related topics

Audio and video profiles

av350pal

Name: av350pal (Profile_AudioVideo_Broadband_PAL_384K)

Audio codec: Windows Media Audio 9

Audio bit rate: 48,000 bps

Sampling rate: 32,000 Hz

Number of channels: 2

Video codec: Windows Media Video 9

Encoding mode: One-pass CBR

Video optimization: None

Video bit rate: 302,000 bps

Frame width: 384 pixels

Frame height: 288 pixels

Frame rate: 25 fps

Buffer: 5,000 msec

Smoothness/quality: 75

Key frame distance: 10 sec

Total bit rate: 350,000 bps

Related topics

Audio and video profiles

av700pal

Name: av700pal (Profile_AudioVideo_NearBroadCast_PAL_700K)

Audio codec: Windows Media Audio 9

Audio bit rate: 64,040 bps

Sampling rate: 44,100 Hz

Number of channels: 2

Video codec: Windows Media Video 9

Encoding mode: One-pass CBR

Video optimization: None

Video bit rate: 636,000 bps

Frame width: 384 pixels

Frame height: 288 pixels

Frame rate: 25 fps

Buffer: 5,000 msec

Smoothness/quality: 75

Key frame distance: 10 sec

Total bit rate: 700,040 bps

Related topics

Audio and video profiles

av100_2p

Name: av100_2p (Profile_AudioVideo_LAN_100K_2Pass)

Audio codec: Windows Media Audio 9

Audio bit rate: 16,000 bps

Sampling rate: 16,000 Hz

Number of channels: 1

Video codec: Windows Media Video 9

Encoding mode: Two-pass CBR

Video optimization: None

Video bit rate: 84,000 bps

Frame width: 320 pixels

Frame height: 240 pixels

Frame rate: 15 fps

Buffer: 5,000 msec

Smoothness/quality: 75

Key frame distance: 10 sec

Total bit rate: 100,000 bps

Related topics

Audio and video profiles

av350_2p

Name: av350_2p (Profile_AudioVideo_LANDSL_384K_2Pass)

Audio codec: Windows Media Audio 9

Audio bit rate: 48,000 bps

Sampling rate: 32,000 Hz

Number of channels: 2

Video codec: Windows Media Video 9

Encoding mode: Two-pass CBR

Video optimization: None

Video bit rate: 302,000 bps

Frame width: 320 pixels

Frame height: 240 pixels

Frame rate: 30 fps

Buffer: 5,000 msec

Smoothness/quality: 75

Key frame distance: 10 sec

Total bit rate: 350,000 bps

Related topics

Audio and video profiles

av600vbr

Name: av600vbr (Profile_AudioVideo_FilmVBR_600K)

Audio codec: Windows Media Audio 9

Audio bit rate: 64,040 bps

Sampling rate: 44,100 Hz

Number of channels: 2

Video codec: Windows Media Video 9

Encoding mode: Peak bit rate-based VBR (video) and CBR (audio)

Video optimization: Inverse telecine

Video bit rate: 536,000 bps

Video peak bit rate: 804,000 bps

Frame width: 320 pixels

Frame height: 240 pixels

Frame rate: 24 fps

Peak buffer: 5,000 msec

Key frame distance: 10 sec

Total bit rate: 600,040 bps

Related topics

Audio and video profiles

avq97vbr

Name: avq97vbr (Profile_AudioVideo_FilmVBR_Quality97)

Audio codec: Windows Media Audio 9

Audio bit rate: 64,040 bps

Sampling rate: 44,100 Hz

Number of channels: 2

Video codec: Windows Media Video 9

Encoding mode: Quality-based VBR (video) and CBR (audio)

Video optimization: Inverse telecine

Frame width: 320 pixels

Frame height: 240 pixels

Frame rate: 24 fps

Quality: 97

Key frame distance: 10 sec

Related topics

Audio and video profiles

Audio-only profiles

Windows Media Encoding Script includes seven system profiles for encoding content that contains audio, but no video. The following table contains a brief description of each profile.

Profile name

Bit rate (Kbps)

Description

a20_1

20

FM radio mono

a20_2

20

FM radio stereo

a32

32

56-Kbps modem

a48

48

Near-CD quality

a64

64

CD quality

a96

96

CD-audiophile quality

a128

128

CD-audiophile quality

Related topics

Using profiles

a20_1

Name: a20_1 (Profile_AudioOnly_FMRadioMono_28K)

Audio codec: Windows Media Audio 9

Audio bit rate: 20,008 bps

Sampling rate: 22,050 Hz

Number of channels: 1

Total bit rate: 20,008 bps

Related topics

Audio-only profiles

a20_2

Name: a20_2 (Profile_AudioOnly_FMRadioStereo_28K)

Audio codec: Windows Media Audio 9

Audio bit rate: 20,008 bps

Sampling rate: 22,050 Hz

Number of channels: 2

Total bit rate: 20,008 bps

Related topics

Audio-only profiles

a32

Name: a32 (Profile_AudioOnly_Modem_56K)

Audio codec: Windows Media Audio 9

Audio bit rate: 32,000 bps

Sampling rate: 32,000 Hz

Number of channels: 2

Total bit rate: 32,000 bps

Related topics

Audio-only profiles

a48

Name: a48 (Profile_AudioOnly_NearCDQuality_48K)

Audio codec: Windows Media Audio 9

Audio bit rate: 48,024 bps

Sampling rate: 32,000 Hz

Number of channels: 2

Total bit rate: 48,024 bps

Related topics

Audio-only profiles

a64

Name: a64 (Profile_AudioOnly_CDQuality_64K)

Audio codec: Windows Media Audio 9

Audio bit rate: 64,016 bps

Sampling rate: 44,100 Hz

Number of channels: 2

Total bit rate: 64,016 bps

Related topics

Audio-only profiles

a96

Name: a96 (Profile_AudioOnly_CDAudiophileQuality_96K)

Audio codec: Windows Media Audio 9

Audio bit rate: 96,024 bps

Sampling rate: 44,100 Hz

Number of channels: 2

Total bit rate: 96,024 bps

Related topics

Audio-only profiles

a128

Name: a128 (Profile_AudioOnly_CDAudiophileQuality_128K)

Audio codec: Windows Media Audio 9

Audio bit rate: 128,016 bps

Sampling rate: 44,100 Hz

Number of channels: 2

Total bit rate: 128,016 bps

Related topics

Audio-only profiles

Video-only profiles

Windows Media Encoding Script includes two system profiles for encoding content that contains video, but no audio. The following table contains a brief description of each profile.

Profile name

Bit rate (Kbps)

Description

v20

20

Video only, 28-Kbps modem

v32

32

Video only, 56-Kbps modem

Related topics

Using profiles

v20

Name: v20 (Profile_VideoOnly_Modem_28K)

Video codec: Windows Media Video 9

Encoding mode: One-pass CBR

Video optimization: None

Video bit rate: 20,000 bps

Frame width: 176 pixels

Frame height: 144 pixels

Frame rate: 15 fps

Buffer: 5,000 msec

Smoothness/quality: 75

Key frame distance: 10 sec

Total bit rate: 20,000 bps

Related topics

Video-only profiles

v32

Name: v32 (Profile_VideoOnly_Modem_56K)

Video codec: Windows Media Video 9

Encoding mode: One-pass CBR

Video optimization: None

Video bit rate: 32,000 bps

Frame width: 240 pixels

Frame height: 176 pixels

Frame rate: 15 fps

Buffer: 5,000 msec

Smoothness/quality: 75

Key frame distance: 10 sec

Total bit rate: 32,000 bps

Related topics

Video-only profiles

Advanced encoding techniques

Using Windows Media Encoding Script, you have a number of options for fine-tuning encoding settings. This section describes the options and how to use them.

Related topics

Windows Media Encoding Script

Optimizing video and audio

Using CBR or VBR encoding

Sourcing from multichannel audio files

Using configuration files

Using command-line options

Optimizing video and audio

Windows Media Encoding Script includes filters that enable you to improve the quality of telecined and interlaced content for playback on progressive-scan displays or to maintain the interlacing in content for playback on interlaced playback devices. By default, no filters are applied (-v_preproc 0). You should use the no filter command with content that is already in a progressive-scan format and that will be rendered in a progressive-scan display.

If your audio content is primarily voice combined with some music, you can use the -a_content and -a_contentedl options to optimize the content for voice.

Related topics

Advanced encoding techniques

Deinterlacing filters

Inverse telecine filters

Interlacing filters

Optimizing audio for voice

Deinterlacing filters

The deinterlacing filter converts interlaced video to progressive-scan format. The following table describes the commands available to you when you apply the deinterlacing filter to your video.

Command

Description

-v_preproc 1

Preserves the size of the source video. For example, video that is 640 × 480 pixels and 30 fps is encoded at 640 × 480 pixels and 30 fps.

-v_preproc 2

The output video is half the original video size. For example, video that is 640 × 480 pixels and 30 fps is encoded at 320 × 240 pixels and 30 fps.

-v_preproc 3

The output video is half the original video size and the frame rate is doubled. For example, video that is 640 × 480 pixels and 30 fps is encoded at 320 × 240 pixels and 60 fps.

-v_preproc 4

The output video is half the original vertical size and the frame rate is doubled. For example, video that is 320 × 480 pixels and 30 fps is encoded at 320 × 240 pixels and 60 fps.

Related topics

Optimizing video and audio

Inverse telecine filters

Interlacing filters

To apply a filter to your content

Inverse telecine filters

The inverse telecine filter converts video from 30 fps to 24 fps. The following table describes the commands available to you when you apply the inverse telecine filter to your video.

Command

Description

-v_preproc 5

Use if your content has incoherencies or if you are not certain which frame the content starts with.

-v_preproc 6

Use if the first field in the frame is the top (odd) field with the AA telecine pattern.

-v_preproc 7

Use if the first field in the frame is the top (odd) field with the BB telecine pattern.

-v_preproc 8

Use if the first field in the frame is the top (odd) field with the BC telecine pattern.

-v_preproc 9

Use if the first field in the frame is the top (odd) field with the CD telecine pattern.

-v_preproc 10

Use if the first field in the frame is the top (odd) field with the DD telecine pattern.

-v_preproc 11

Use if the first field in the frame is the bottom (even) field with the AA telecine pattern.

-v_preproc 12

Use if the first field in the frame is the bottom (even) field with the BB telecine pattern.

-v_preproc 13

Use if the first field in the frame is the bottom (even) field with the BC telecine pattern.

-v_preproc 14

Use if the first field in the frame is the bottom (even) field with the CD telecine pattern.

-v_preproc 15

Use if the first field in the frame is the bottom (even) field with the DD telecine pattern.

Related topics

Optimizing video and audio

Deinterlacing filters

Interlacing filters

To apply a filter to your content

Interlacing filters

The interlacing filter maintains the interlacing in your source video. The following table describes the commands available to you when you apply the interlacing filter to your video.

Command

Description

-v_preproc 16

Maintains the interlacing in the source video.

-v_preproc 17

Maintains the interlacing in the source video. Use if the first field being encoded is the top (odd) field.

-v_preproc 18

Maintains the interlacing in the source video. Use if the first field being encoded is the bottom (even) field.

Related topics

Optimizing video and audio

Deinterlacing filters

Inverse telecine filters

To apply a filter to your content

To apply a filter to your content

Open a command prompt window.

At the command prompt, type the path to the folder where the file Wmcmd.vbs is located. For example, type

cd \program files\windows media components\encoder

Type the following command, and then press the ENTER key:

cscript.exe wmcmd.vbs -input drive:\Path\Input_file_name -output drive:\Path\Output_file_name -v_preproc filter

For example:

cscript.exe wmcmd.vbs -input C:\My-clips\Myfile.avi -output C:\My-clips-coded\Myfile.wmv -v_preproc 3

Related topics

Optimizing video and audio

Optimizing audio for voice

If you are sourcing from audio that is entirely or primarily voice, you can use the -a_content option and the Windows Media Audio 9 Voice codec to optimize the encoding for voice. You can optimize the codec behavior by identifying if the content is voice only (-a_content 1) or if it also contains some music (-a_content 2). If the audio is a mixture of voice and music, during encoding the codec automatically uses the appropriate algorithm to optimize encoding for the content (voice or music). Or, you can create an optimization definition file (-a_contentedl), which is a text file that identifies the places in your file where music starts and ends. The unspecified portions in the file are treated as voice. In the following example, the audio content is voice only.

cscript.exe wmcmd.vbs -input C:\My-speeches\Myspeech.wav -output C:\My-speeches-coded\Myspeech.wma -a_codec WMSP9 -a_content 1

In the following example, the audio content is a mixture of voice and music, and an optimization definition file has been created.

cscript.exe wmcmd.vbs -input C:\My-speeches\Myspeech.wav -output C:\My-speeches-coded\Myspeech.wma -a_codec WMSP9 -a_content 2 -a_contentedl c:\My-speeches\my_contentedl.txt

Related topics

Optimizing video and audio

To create an audio optimization definition file

To create an audio optimization definition file

Use a text editor, such as Notepad to create a text file.

Type the version number and the number of music segments the file contains.

The version number should always be the number 1.

Type the start and end times (in milliseconds) of each segment, and separate each start and end time with a comma.

For example, typing 1, 3, 0, 10000, 50000, 80000, 150000, and 200000 indicates that there are three music segments; the codec will switch to music mode at 0 to 10 seconds, 50 to 80 seconds, and 150 to 200 seconds.

Encode the text file in Unicode.

If you use Notepad to create the file, you can save the file as Unicode by choosing the Save As command on the File menu, and then, in Encoding, clicking Unicode.

Related topics

Optimizing audio for voice

Using CBR or VBR encoding

You can encode audio and video content at either a constant bit rate (CBR) or a variable bit rate (VBR). Use CBR encoding when you plan to stream the content. Use VBR encoding when you plan to distribute the content for downloading and playing either locally or on a device that has a constrained reading speed, such as a CD or DVD player.

CBR encoding. With this option, bit rate fluctuations during encoding are constrained by the buffer size, and the image quality fluctuates to ensure that the buffer does not overflow or underflow. You can use either one- or two-pass encoding for CBR encoding.

Quality-based VBR encoding. With this option, the content is encoded at a specified quality (from 0 to 100). During encoding, the bit rate varies to ensure the specified quality is met. Use this option when you do not care about the bit rate but want to ensure the quality of the output. This option uses one-pass encoding.

Bit rate-based VBR encoding. With this option, the content is encoded at an average bit rate. At any point, the bit rate may exceed the specified average bit rate but the overall bit rate will match the average bit rate. No frames are dropped in this mode. This option uses two-pass encoding.

Peak bit rate-based VBR encoding. This option is similar to the bit rate-based VBR option, except that the bit rate fluctuations do not exceed the peak bit rate. Use this option when the content will be played back by a device that has a constrained reading speed, such as a CD or DVD player. This option uses two-pass encoding.

Note

If you encode content by using a profile that does not specify either CBR or VBR encoding, or if you set up a custom encoding session and do not specify CBR or VBR encoding, one-pass CBR encoding is used by default.

Related topics

Advanced encoding techniques

Implementing a CBR or VBR encoding mode

Implementing a CBR or VBR encoding mode

When you implement a CBR or VBR encoding mode, the only required parameter is the -v_mode or -a_mode option for the mode. However, each mode has optional parameters you can specify. Default values are used if you do not specify the parameter.

The following table summarizes the command-line options that you can use when you implement a CBR or VBR encoding mode for video content.

Mode

Optional parameters

One-pass CBR (-v_mode 0)

-v_bitrate and -v_buffer

Two-pass CBR (-v_mode 1)

-v_bitrate and -v_buffer

Quality-based VBR (one-pass, -v_mode 2)

-v_quality (the default is 95)

Bit rate-based VBR (two-pass, -v_mode 3)

-v_bitrate

Peak bit rate-based VBR (two-pass,
-v_mode 4)

-v_bitrate, -v_peakbitrate, and -v_peakbuffer

The following table summarizes the command-line options that you can use when implementing a CBR or VBR mode for audio content.

Mode

Optional parameters

One-pass CBR (-a_mode 0)

-a_setting

Two-pass CBR (-a_mode 1)

-a_setting

Quality-based VBR (one-pass, -a_mode 2)

-a_setting (see the following paragraphs for more information)

Bit rate-based VBR (two-pass, -a_mode 3)

-a_setting

Peak bit rate-based VBR
(two-pass, -a_mode 4)

-a_setting, -a_peakbitrate, and -a_peakbuffer

You can mix encoding modes in a session. For example, you can use two-pass CBR encoding for your audio and quality-based VBR encoding for your video.

Using quality-based VBR encoding for audio

When you use quality-based VBR encoding for audio, you can use -a_setting to represent the target quality by using the format Qvalue_samplerate_channel. The default is Q75_44_2, unless you also specify the Windows Media Audio 9 Professional codec, in which case the default is Q75_44_2_24. 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 Q98_48_2_24

You also have the option of using the Windows Media Audio 9 Lossless codec, which requires quality-based VBR encoding at a quality setting of 100. The default value for -a_setting is Q100_44_2_16. The following example illustrates how to set up a command that specifies lossless compression at a sampling rate of 48 kHz, two channels, and 24-bit encoding:

cscript.exe wmcmd.vbs -input C:\My-songs\Song1.wav -output C:\My-songs-coded\Song1.wma -a_codec WMA9LSL -a_mode 2 -a_setting Q100_48_2_24

Related topics

Using CBR or VBR encoding

Sourcing from multichannel audio files

Using Windows Media Encoding Script, you can encode multichannel audio, which means you can encode audio for a surround sound playback in six or 8 channels. Your content source must be either a single 6-channel or 8-channel file that has a WAVE_FORMAT_EXTENSIBLE format, or you can source from six mono channel .wav files.

To source from a single file, you set up a command that identifies the file as your input. You must also specify the Windows Media Audio 9 Professional codec. For example:

cscript.exe wmcmd.vbs -input C:\My-source_files\6_channel.wav -output C:\My_song.wma -a_codec WMA9PRO -a_setting 640_48_6_24

-or-

cscript.exe wmcmd.vbs -input C:\source_files\8_channel.wav -output C:\My_song.wma -a_codec WMA9PRO -a_setting 384_48_8_24

It is not possible to source from six mono channel .wav files directly from Windows Media Encoding Script. Instead, you can set up a multichannel audio session by using Windows Media Encoder. You can then save the session and refer to the session file in your command. For example:

cscript.exe wmcmd.vbs -wme C:\My_multichannel_session.wme

When sourcing from multichannel audio, you can also include the -a_folddown6to2 parameter in the command. This parameter specifies how the six channels are folded down into two channels for playback on stereo speakers.

The user playing your content must have Microsoft Windows XP and a player that is based on the Windows Media Format 9 Series Software Development Kit (SDK); otherwise, the audio is folded down automatically to two channels for stereo speakers.

Related topics

Advanced encoding techniques

Using configuration files

If you have created a set of command-line options that you want to reuse, you can save the options to a file, referred to as a configuration file. A configuration file is a text file that contains the names and values of command-line options that you want to use in an encoding session. Rather than specifying each option individually at the command prompt, you can put them into a configuration file and then call the configuration file when you run Windows Media Encoding Script.

Information in the configuration file can include the input file name or audio and video devices, the profile, and any other options that you want to specify. You can also override the settings in the configuration file by typing individual options on the command line.

You can create configuration files with a text editing tool or from the command line by appending the -s_config option to your command. When you append the -s_config option, you specify a file name and all of the options in your command are collected and saved into that configuration file. Configuration files have a .weu file name extension. If you don't specify the file name extension when creating the configuration file, it is appended to the file name for you.

Related topics

Advanced encoding techniques

To call a configuration file

To call a configuration file

Open a command prompt window.

At the command prompt, type the path to the folder where the file Wmcmd.vbs is located. For example, type

cd \program files\windows media components\encoder

Type the following command, and then press the ENTER key:

cscript.exe wmcmd.vbs -config drive:\Path\Configuration_file_name

For example:

cscript.exe wmcmd.vbs -config C:\Config-files\Myvideos.weu

Related topics

Using configuration files

Using command-line options

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 -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

Related topics

Advanced encoding techniques

Supported pixel formats

When using the -pixelformat option, you must specify one of the following pixel formats.

I420

IYUV

RGB24

RGB32

RGB555

RGB565

RGB8

UYVY

YUY2

YV12

YVU9

YVYU

Related topics

Using command-line options

Frequently asked questions

Can I use extended .avi files with Windows Media Encoding Script?

Yes. Windows Media Encoding Script supports the extended .avi format specification and can encode .avi files that are larger than 2 gigabytes (GB).

Can I encode compressed Windows Media files with .wma and .wmv file name extensions to achieve a different bit rate?

Yes. However, you will have better results if you encode the original source file again and specify the bit rate you want with the -v_bitrate option for video or the -a_setting option for audio.

I set the -v_bitrate in one- and two-pass CBR and bit rate-based VBR modes (-v_mode , , and ), and the bit rate of the compressed clip is significantly lower than what I specified. Is this an error?

No. If the clip, or some segment of the clip, is easy to encode for the target bit rate (for example, the bit rate setting is very high and the resolution is low), the codec does not require all of the available bandwidth to compress the content.

I set the -v_bitrate in bit rate-based VBR mode (-v_mode 3), and the bit rate of the compressed clip is significantly higher than what I specified. Is this an error?

No. Frames are not dropped when you encode content by using the -v_mode 3 option. If the clip, or some segment of the clip, is difficult to encode for the target bit rate (for example, the bit rate setting is low and the resolution is high), the codec does require more bandwidth to compress the content.

In what order does Windows Media Encoding Script clip, preprocess, and resize my content?

Clipping is the first step and is performed on the source. By clipping first, the encoding process is more efficient because you eliminate any unwanted portions of the video before encoding them. Preprocessing, such as applying deinterlacing or inverse telecine filters comes second, followed by setting the output size of the encoded video.

Can I use Windows Media Encoding Script to encode a multiple-bit-rate (MBR) file so I can stream my content to users who have various connection speeds?

You can encode an MBR file if you use an MBR profile that was created using Windows Media Encoder.

I used the -v_quality setting to set my image quality to 95 and then 96. I achieved the same result with both settings. Is this normal?

Yes. Some of the -v_quality settings are mapped internally to the same image quality value. To see a change in your image quality, increase or decrease your -v_quality setting by larger increments.

Related topics

Windows Media Encoding Script

Glossary

To find a term in the glossary, click the letter of the alphabet that is the first letter in the term you want to look up.

You can also read glossary terms within the text of Help by clicking the underlined glossary term links. After you click a glossary link, the glossary term and definition appear in a pop-up window. To close the window, click anywhere on the screen.

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

P
.prx

The file name extension of a profile.

Symbols
.weu

The file name extension of a configuration file used by Windows Media Encoding Script.

.wma

The file name extension of an audio file in Windows Media Format. The audio content of the file is encoded with the Windows Media Audio codec.

.wme

The file name extension for a Windows Media Encoder session file.

.wmv

The file name extension of a video file in Windows Media Format.

A
announcement

A Windows Media metafile that gives a player the information needed to receive content. Announcement files contain Extensible Markup Language (XML) scripts.

aspect ratio

The ratio of the width of an image to its height.

Audio Video Interleaved (AVI)

A multimedia file format for storing sound and moving pictures in RIFF format.

AVI

See definition for: Audio Video Interleaved (AVI)

B
bandwidth

A network's capacity for transferring an amount of data in a given time.

bit rate

The number of bits transferred per second.

C
caption

Text that accompanies images or videos, either as a supplemental description or a transcript of spoken words.

CBR

See definition for: constant bit rate (CBR)

codec

An abbreviation for compressor/decompressor. Software or hardware used to compress and decompress digital media.

compression

A process for removing redundant data from a digital media file or stream to reduce its size or the bandwidth used.

configuration file

A text file used by Windows Media Encoding Script that specifies the content to be encoded and the command-line options to be invoked.

constant bit rate (CBR)

A characteristic of a data stream in which the bit rate remains nearly uniform for the duration of the stream.

See also: variable bit rate (VBR)

content

Audio, video, images, text, or any other information that is contained in a digital media file or stream.

D
deinterlace

To combine the interlaced fields in a video frame so that, during playback, the lines of the video frame are painted sequentially.

See also: interlace

delta frame

A video frame that contains only the changes from the previous frame. In contrast, a key frame contains all the data necessary to construct that frame.

dynamic range

The difference (in decibels) between the quietest and loudest sounds in a single piece of audio content.

E
encode

To convert audio and video content to a specified digital format.

F
frame rate

The number of video frames displayed per second. Higher frame rates generally produce smoother movement in the picture.

H
header

A part of the file structure that contains information required by an application to decompress and render the content. The header in a protected file also contains information required to get a license.

I
IEEE 1394

See definition for: Institute of Electrical and Electronics Engineers (IEEE) 1394

Institute of Electrical and Electronics Engineers (IEEE) 1394

A high-speed serial bus standard that provides enhanced computer connectivity for a wide range of devices, including consumer electronics audio/video (A/V) appliances, storage peripherals, other computers, and portable devices.

intelligent streaming

A type of streaming that detects network conditions and adjusts the properties of a video or audio stream to maximize quality.

interlace

To display a video frame in two fields. One field contains the even lines of the frame, the other field contains the odd lines. During playback, the lines in one field are displayed first, then the lines in the second field are displayed.

Internet Protocol version 6 (IPv6)

A revised version of the Internet Protocol (IP) designed to address growth on the Internet. Improvements include a 128 bit IP address size, expanded routing capabilities, and support for authentication and privacy.

inverse telecine

The process that removes the frames that were added when 24-fps film was converted to 30-fps video.

IPv6

See definition for: Internet Protocol version 6 (IPv6)

K
key frame

A video frame containing all the data needed to construct an image without reference to previous frames.

See also: delta frame

L
latency

The delay that occurs while data is processed or delivered.

letterbox

A video display format in which black bars appear above and below the video image while it is played. The letterbox format maintains the original aspect ratio of an image when it is displayed in a window with a different aspect ratio.

license

Data attached to protected content that describes how the content can be used.

loop

To repeat a stream continuously.

lossless compression

A process for compressing data in which information is arranged in a more concise form and restored to its original state upon decompression.

lossy compression

A process for compressing data in which information deemed unnecessary is removed and cannot be recovered upon decompression. Typically used with audio and visual data in which a slight degradation of quality is acceptable.

M
marker

A text string that is associated with a designated time in Windows Media-based content. Markers often denote convenient points to begin playback, such as the start of a new scene.

MBR

See definition for: multiple bit rate (MBR)

metadata

Data about data. Title, subject, author, and size are examples of a file's metadata.

multicast

A content delivery method in which a single stream is transmitted from a media server to multiple clients. The clients have no connection with the server. Instead, the server sends a single copy of the stream across the network to multicast-enabled routers, which replicate the data. Clients can then receive the stream by monitoring a specific multicast IP address and port.

multichannel audio

An audio reproduction system that processes several, typically more than two, channels of sound. For example, 5.1 multichannel audio refers to a surround sound system in which there are five primary channels and a subwoofer channel.

multiple bit rate (MBR)

A characteristic of a data stream in which the same content is encoded at several different bit rates in order to optimize content delivery.

N
National Television Standards Committee (NTSC)

The dominant television standard in the United States and Japan. NTSC delivers 30 interlaced frames per second at 525 lines of resolution.

NTSC

See definition for: National Television Standards Committee (NTSC)

O
one-pass encoding

An encoding method in which content is analyzed and compressed in the same pass through the encoder.

See also: two-pass encoding

PAL

See definition for: Phase Alternating Line (PAL)

PCM

See definition for: pulse code modulation (PCM)

Phase Alternating Line (PAL)

The dominant television standard in Europe and China. PAL delivers 25 interlaced frames per second at 625 lines of resolution.

pixel format

The size and arrangement of pixel color components. The format is specified by the total number of bits used per pixel and the number of bits used to store the red, green, blue, and alpha components of the color of the pixel.

postroll

To extend the amount of encoded video by a specified number of frames.

preroll

To capture or play a number of video frames or a portion of audio data before encoding or rendering begins, in order to allow the source device to stabilize. Also used as a noun to describe the portion of the data to be prerolled.

profile

A group of settings that match content type and bit rate with appropriate audio and video codecs.

Profile Editor

A tool provided with Windows Media Encoder that creates and edits the encoding profiles.

See also: profile

publishing point

An organized memory location that translates a client request for content into the physical path on the server hosting the content. A publishing point essentially acts as a redirector.

pull

To deliver data to a client only upon client request.

pulse code modulation (PCM)

A technique for digitizing audio into an uncompressed format by assigning a value to the amplitude of the signal at fixed intervals.

push

To deliver data to a client without a client request for the data.

R
RGB

A color model that describes color information in terms of the red (R), green (G), and blue (B) intensities that make up the color.

S
sampling

The process of measuring the amplitude of an analog signal at regular intervals for the purpose of converting the signal into a digital format.

sampling rate

The frequency of sampling. The higher the sampling rate (that is, the more samples taken per unit of time), the more closely the digitized result resembles the original.

script commands

Named data that is associated with a designated time in Windows Media-based content. The data can be used by players to perform a specific action such as displaying a Web page.

source

Audio and video content that can be captured and encoded from devices installed on your computer or from a file.

stream

Digital media that is in the process of being delivered in a continuous flow across a network.

stream format

Information about the properties of a stream, such as the codecs used, frame rate, and frame size. A player uses stream format information to decode a stream.

stream format file

A file used by a player to decode a multicast stream.

See also: stream format

T
telecine

The film-to-video conversion system that adds frames to video to compensate for the differences in frame rates between film and video.

time code

A digital signal applied to a stream. The signal assigns a number to every frame of video, representing hours, minutes, seconds, and frames.

two-pass encoding

An encoding method in which content is analyzed in one pass through the encoder, after which compression is applied in the second pass. See also one-pass encoding.

U
UDP

See definition for: User Datagram Protocol (UDP)

UNC

See definition for: Universal Naming Convention (UNC)

unicast

A method used by media servers for providing content to connected clients in which each client receives a discrete stream. No other client has access to that stream.

Universal Naming Convention (UNC)

The full name of a resource on a network. It conforms to the \\servername\sharename syntax, where servername is the name of the server and sharename is the name of the shared resource. UNC names of directories or files can also include the directory path under the share name, with the following syntax: \\servername\sharename\directory\filename.

User Datagram Protocol (UDP)

A connectionless transport protocol in the TCP/IP protocol stack that is used in cases where some packet loss is acceptable, for example, with digital media streams.

V
variable bit rate (VBR)

A characteristic of a data stream in which the bit rate fluctuates, depending upon the complexity of the data.

VBR

See definition for: variable bit rate (VBR)

W
Windows Media Audio codec

A codec used to compress and decompress audio streams.

Windows Media file

A file containing audio, video, or script data that is stored in Windows Media Format. Depending on their content and purpose, Windows Media files use a variety of file name extensions, such as: .wma, .wme, .wms, .wmv, .wmx, .wmz, or .wvx.

Windows Media Format

The format used by Microsoft Windows Media Technologies (or a third-party product that incorporates a licensed Windows Media technology) to author, store, edit, distribute, stream, or play timeline-based content.

Windows Media metafile

In Windows Media Technologies, a file that provides information about Windows Media files and their presentation. File name extensions for Windows Media metafiles include .asx, .wax, .wvx, .wmx, and .nsc.

Windows Media Screen codec

A codec used to compress and decompress sequences of screen images.

Windows Media Video codec

A codec used to compress and decompress video streams.

Y
YUV

A color model that describes color information in terms of its brightness (luminance, or Y), and color (chrominance, or U and V).


Document Info


Accesari: 1968
Apreciat: hand-up

Comenteaza documentul:

Nu esti inregistrat
Trebuie sa fii utilizator inregistrat pentru a putea comenta


Creaza cont nou

A fost util?

Daca documentul a fost util si crezi ca merita
sa adaugi un link catre el la tine in site


in pagina web a site-ului tau.




eCoduri.com - coduri postale, contabile, CAEN sau bancare

Politica de confidentialitate | Termenii si conditii de utilizare




Copyright © Contact (SCRIGROUP Int. 2024 )