Share via


IWMEncAudienceObj.StreamBitrate

Windows Media Encoder SDK banner art

The StreamBitrate property specifies and retrieves the bit rate for each content type in the stream in the current audience.

Syntax

IWMEncAudienceObj.StreamBitrate(enumSrcType, iRenderSiteIndex) = Long
Long = IWMEncAudienceObj.StreamBitrate(enumSrcType, iRenderSiteIndex)

Parameters

enumSrcType

[in]  Member of a WMENC_SOURCE_TYPE enumeration type identifying the media stream type.

iRenderSiteIndex

[in]  Integer containing the audience stream index. Because an audience can only contain one stream of each type, iRenderSiteIndex must be zero.

Property Value

A Long that indicates the stream bit rate, in bits per second (bps).

Remarks

You can specify and retrieve the bit rate for video, HTML, and script streams. However, this property can only retrieve the audio bit rate. To set the audio bit rate, you must set the entire audio format by using the AudioFormat property or the SetAudioConfig method.

Example Code

' Create a WMEncProfile2 object.
  Dim Pro As WMEncProfile2
  Set Pro = New WMEncProfile2

' Load a custom profile. REPLACE THE FILE NAME.
  Pro.LoadFromFile "C:\Profiles\CustomProfile.prx"

' Create an IWMEncAudienceObj object, selecting the first audience (0)
' in the profile.
  Dim Audnc As IWMEncAudienceObj
  Set Audnc = Pro.Audience(0)

' Retrieve a value indicating the audio stream's bit rate.
  Dim lAudStreamBRate As Long
  lAudStreamBRate = Audnc.StreamBitrate(WMENC_AUDIO, 0)

' Retrieve a value indicating the video stream's bit rate.
  Dim lVidStreamBRate As Long
  lVidStreamBRate = Audnc.StreamBitrate(WMENC_VIDEO, 0)

Requirements

Reference: Windows Media Encoder

Library: wmenc.exe

See Also