问题描述
如何在directshow应用程序(c ++代码)中设置vp8encoder过滤器的比特率。
Webcam ---> Webm VP8编码器 - > AVI mux --->文件编写器(.avi)
我可以通过右键单击vp8encoder->属性来设置graphedit中的比特率。但我想在directshow应用程序中使用c ++代码设置比特率。我是新来的directshow请提供示例代码。提前感谢
主题表明您已经有了IVP8Encoder接口(这也符合您有IDL文件和它们的派生物)。
IVP8Encoder :: SetTargetBitrate
是做事情的方法。
//目标数据速率
//
//目标带宽用于此流,千比特每秒。
//值0表示使用编解码器默认值。
HRESULT SetTargetBitrate([in] int Bitrate);
HRESULT GetTargetBitrate([out] int * pBitrate);
How to set bitrate of vp8encoder filter in directshow application (c++ code). my graph looks like this.
Webcam --->Webm VP8 encoder -->AVI mux --->file writer(.avi)
I'm able to set bitrate in graphedit by right clicking vp8encoder->properties. But i want to set bitrate using c++ code in directshow application. I'm new to directshow please provide sample code . Thanks in advance
The subject suggests that you already have IVP8Encoder interface on hands (which also goes in line with the fact that you do have IDL files and their derivatives).
IVP8Encoder::SetTargetBitrate
is the method that does the thing.
//Target data rate
//
//Target bandwidth to use for this stream, in kilobits per second.
//The value 0 means "use the codec default".
HRESULT SetTargetBitrate([in] int Bitrate);
HRESULT GetTargetBitrate([out] int* pBitrate);
这篇关于如何在DirectShow应用程序中设置IVP8Encoder滤波器的比特率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!