How to set bitrate of IVP8Encoder filter in a DirectShow application

泄露秘密 提交于 2019-12-11 19:00:12

问题


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


回答1:


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


来源:https://stackoverflow.com/questions/16850471/how-to-set-bitrate-of-ivp8encoder-filter-in-a-directshow-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!