Log in

View Full Version : IAMStreamConfig & Vorbis Encoder Filter


nasedo
31st January 2005, 18:04
Hi there,

i'm developping a delphi app (with dspack), and i'm kinda stuck.
in order to convert dvd audio to ogg, i'm building this graph :

.vob -> MPEG2Demux -> AC3Decoder -> Vorbis Encoder -> OggMux -> .ogg

which works very great -but- with default compression properties!

Now, i'd like to be able to change these properties (number of channels, samples per second, average bytes per sec, and bits per sample).
So i queried vorbis encoder output pin for IAMStreamConfig.
But i don't know what to do with this! Moreover, getnumberofcapabilities returns me zero :confused: Is this normal???

Thanks in advance for your help
:(

Bye

[Toff]
31st January 2005, 19:58
I think you can do what you want by querying for the IPropertyBag interface on the vorbis encoder filter.
IPropertyBag has 2 important method "Read" and "Write".

There is 4 properties available :
"MinBitrate"
"AvgBitrate"
"MaxBitrate"
"Quality"

More details here :
http://trac.xiph.org/cgi-bin/trac.cgi/file/branches/xiph/oggds/VorbEncDS/VorbEncDS.cpp?rev=5112
http://trac.xiph.org/cgi-bin/trac.cgi/file/branches/xiph/oggds/VorbEncDS/VorbEncDS.h?rev=5112

nasedo
31st January 2005, 21:12
Thanks a lot Toff!

I tried what you suggested to me, but delphi told me "unknown identifier" for IPropertyBag... :angry:
So i decided to change encoding parameters through registry, and this works fine!

But for stereo/mono mode, does anyone know a solution?

Bye :)