How to set bitrate of IVP8Encoder filter in a Dire

2019-09-05 06:27发布

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条回答
放我归山
2楼-- · 2019-09-05 06:46

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);
查看更多
登录 后发表回答