Re: Getting g_wszVBRQuality property
- From: "The March Hare [MVP]" <phil@xxxxxxxxx>
- Date: Mon, 17 Oct 2005 04:56:42 -0600
On Mon, 17 Oct 2005 04:44:37 -0600, The March Hare [MVP] wrote:
> On Thu, 13 Oct 2005 06:57:09 -0700, Olivier Antoine wrote:
>
>> g_wszVBREnabled
>
> Isn't the type of this property BOOL?
>
> So you should have:
>
> WMT_ATTR_DATATYPE WMTAttrType=WMT_TYPE_BOOL;
> BOOL Tmp=0,Size=sizeof(BOOL);
> hr =
> pPropVault->GetPropertyByName(g_wszVBRQuality,&WMTAttrType,(BYTE*)&Tmp,&Size);
My mistake. You aren't trying to get the g_wszVBREnabled property.
However, perhaps the pPropVault you *are* using isn't the correct one.
Have you checked the value of g_wszVBREnabled by getting it from this
pPropVault? Are you performing the steps in getting it that you are
required to in the docs:
To Configure Quality-Based VBR
You can use quality-based variable bit rate (VBR) encoding on a stream to
specify a quality level that will be maintained for the entire stream,
regardless of the bit-rate requirements that result.
For quality-based VBR video streams, you must specify a quality level from
1 to 100, with 100 representing the highest quality. At present there are
only 30 discrete quality settings. The following quality levels equate to
discrete quality settings: 1, 4, 8, 11, 15, 18, 22, 25, 29, 33, 36, 40, 43,
47, 50, 54, 58, 61, 65, 68, 72, 75, 79, 83, 86, 90, 93, 97, 100. Numbers
between two consecutive values in the preceding list equate to the same
quality setting as the lower number. For example, 1 and 4 are listed, so 2
and 3 both result in the same quality setting as 1.
For audio streams, you can enumerate the available modes and retrieve a
stream configuration object. For more information, see To Enumerate Codec
Formats.
When using quality-based VBR video, you must set the dwBitrate member of
the WMVIDEOINFOHEADER structure to a positive value. This value is not used
by the writer, but passing zero or a negative number can cause errors when
writing.
To configure a stream in a profile to be encoded with quality-based VBR,
perform the following steps.
Create a profile manager object by calling the WMCreateProfileManager
function.
Open an existing profile to which you want to add VBR support. For more
information about opening profiles, see Working with Profiles.
Get a stream configuration object for the stream you want to use by calling
either IWMProfile::GetStream or IWMProfile::GetStreamByNumber.
Get a pointer to the IWMPropertyVault interface of the stream configuration
object by calling IWMStreamConfig::QueryInterface.
Enable VBR for the stream by calling IWMPropertyVault::SetProperty for the
g_wszVBREnabled property.
Set the quality level for the VBR stream by calling
IWMPropertyVault::SetProperty for the g_wszVBRQuality property.
Set g_wszVBRBitrateMax and g_wszVBRBufferWindowMax both to zero with
IWMPropertyVault::SetProperty.
Save the changes made to the stream by calling IWMProfile::ReconfigStream.
Save the profile, or pass it to the writer object and start writing.
--
Please read this before replying:
1. Dshow & posting help: http://tmhare.mvps.org/help.htm
2. Trim & respond inline (please don't top post or snip everything)
3. Benefit others: follow up if you are helped or you found a solution
.
- References:
- Re: Getting g_wszVBRQuality property
- From: The March Hare [MVP]
- Re: Getting g_wszVBRQuality property
- Prev by Date: Re: Getting g_wszVBRQuality property
- Next by Date: Re: Error controling a capture graph for preview and capture
- Previous by thread: Re: Getting g_wszVBRQuality property
- Next by thread: Re: Getting g_wszVBRQuality property
- Index(es):
Relevant Pages
|
Loading