拓扑看起来并不健康:连续三个颜色空间转换器意味着过滤器图很难将屏幕捕获媒体类型(像素格式)与 VP8 编码器接受的内容相匹配。
您遇到的问题是,当质量严重下降时,任一编码器设置为低比特率模式,或者编码最大化 CPU 并跳过帧,或两者兼而有之。显然,您有兴趣平衡它以使设置有意义并提供合理的输出。
VPB 编码器过滤器是使用 IVP8Encoder 接口设置的,您可以在源代码包文件中找到其定义(和内联注释)\IDL\vp8encoder.idl
:
[
object,
uuid(ED311151-5211-11DF-94AF-0026B977EEAA),
helpstring("VP8 Encoder Filter Interface")
]
interface IVP8Encoder : IUnknown
{
//ApplySettings
//
//The filter maintains a set of encoder configuration values, held
//in cache. Any parameters set (using the methods below) are always
//applied to the cached value, irrespective of the state of the graph.
//
//When the graph is started, the filter initializes the VP8 encoder
//using the cached configuration values. This is done automatically,
//as part of the activities associated with transitioning the filter
//from the stopped state.
//
//If the graph has been started, then any parameters set by the user
//are still applied to the cache (as before). However, to apply the
//configuration values in cache to the VP8 encoder, the user must also
//call ApplySettings.
//
//It is harmless to call ApplySettings while the graph is stopped.
HRESULT ApplySettings();
//ResetSettings
//
//Sets the configuration values in cache to their defaults, the same
//as they had when the filter instance was originally created.
HRESULT ResetSettings();
//Deadline
//
//Time to spend encoding, in microseconds. (0=infinite)
HRESULT SetDeadline([in] int Deadline);
HRESULT GetDeadline([out] int* pDeadline);
//ThreadCount
//
//For multi-threaded implementations, use no more than this number of
//threads. The codec may use fewer threads than allowed. The value
//0 is equivalent to the value 1.
HRESULT SetThreadCount([in] int Threads);
HRESULT GetThreadCount([out] int* pThreads);
...
也可以看看: