5

我有一个logitech c920呈现编码h264 capture pin(子类型:)的网络摄像头MEDIASUBTYPE_H264

h264 管脚支持以下分辨率:

FORMAT_VideoInfo - 子类型:MEDIASUBTYPE_H264 640x480 @ 30 fps  
FORMAT_VideoInfo - 子类型:MEDIASUBTYPE_H264 160x90 @ 30 fps  
FORMAT_VideoInfo - 子类型:MEDIASUBTYPE_H264 160x120 @ 30 fps  
FORMAT_VideoInfo - 子类型:MEDIASUBTYPE_H264 176x144 @ 30 fps  
FORMAT_VideoInfo - 子类型:MEDIASUBTYPE_H264 320x180 @ 30 fps  
FORMAT_VideoInfo - 子类型:MEDIASUBTYPE_H264 320x240 @ 30 fps  
FORMAT_VideoInfo - 子类型:MEDIASUBTYPE_H264 352x288 @ 30 fps  
FORMAT_VideoInfo - 子类型:MEDIASUBTYPE_H264 432x240 @ 30 fps  
FORMAT_VideoInfo - 子类型:MEDIASUBTYPE_H264 640x360 @ 30 fps  
FORMAT_VideoInfo - 子类型:MEDIASUBTYPE_H264 800x448 @ 30 fps  
FORMAT_VideoInfo - 子类型:MEDIASUBTYPE_H264 800x600 @ 30 fps  
FORMAT_VideoInfo - 子类型:MEDIASUBTYPE_H264 864x480 @ 30 fps  
FORMAT_VideoInfo - 子类型:MEDIASUBTYPE_H264 960x720 @ 30 fps  
FORMAT_VideoInfo - 子类型:MEDIASUBTYPE_H264 1024x576 @ 30 fps  
FORMAT_VideoInfo - 子类型:MEDIASUBTYPE_H264 1280x720 @ 30 fps  
FORMAT_VideoInfo - 子类型:MEDIASUBTYPE_H264 1600x896 @ 30 fps  
FORMAT_VideoInfo - 子类型:MEDIASUBTYPE_H264 1920x1080 @ 30 fps  

在我的测试中,无论选择的分辨率如何,它总是使用 3 Mbits。这有点太多了,尤其是对于较低的分辨率。

关于如何使用 directshow 以编程方式选择所需比特率的任何想法?或者也许是其他 API?

4

2 回答 2

2

IAMStreamConfig 接口的查询引脚,通过 GetStreamCaps() 获取此格式列表,选择您需要的格式,它将包含指向包含 dwBitRate 字段的 VIDEOINFO 结构的指针 pFormat。将此字段更改为所需的比特率并使用此新数据调用 IAMStreamConfig::SetFormat。

于 2012-07-31T11:31:57.757 回答
1

从罗技支持答案可以看出,编码是 80/20 HW/SW,并且比特率(和 GOP)无法控制。然而,他们的捆绑软件显然可以做到这一点。除此之外,经过一些限制后,比特率会下降,尽管它发生在非常低​​的分辨率/fps组合中:

Required bandwidth for size:  ( 1920 , 1080 )  @ 30  is 2.81771 Mbit 
Required bandwidth for size:  ( 1920 , 1080 )  @ 25  is 2.81672 Mbit 
Required bandwidth for size:  ( 1920 , 1080 )  @ 20  is 2.82701 Mbit 
Required bandwidth for size:  ( 1920 , 1080 )  @ 15  is 2.83327 Mbit 
Required bandwidth for size:  ( 1920 , 1080 )  @ 10  is 2.83594 Mbit 
Required bandwidth for size:  ( 1920 , 1080 )  @ 5  is 2.8431 Mbit 
Required bandwidth for size:  ( 1280 , 720 )  @ 30  is 2.82013 Mbit 
Required bandwidth for size:  ( 1280 , 720 )  @ 25  is 2.82436 Mbit 
Required bandwidth for size:  ( 1280 , 720 )  @ 20  is 2.83217 Mbit 
Required bandwidth for size:  ( 1280 , 720 )  @ 15  is 2.83696 Mbit 
Required bandwidth for size:  ( 1280 , 720 )  @ 10  is 2.83721 Mbit 
Required bandwidth for size:  ( 1280 , 720 )  @ 5  is 2.45272 Mbit 
Required bandwidth for size:  ( 864 , 480 )  @ 30  is 2.82089 Mbit 
Required bandwidth for size:  ( 864 , 480 )  @ 25  is 2.82313 Mbit 
Required bandwidth for size:  ( 864 , 480 )  @ 20  is 2.83131 Mbit 
Required bandwidth for size:  ( 864 , 480 )  @ 15  is 2.83343 Mbit 
Required bandwidth for size:  ( 864 , 480 )  @ 10  is 2.79526 Mbit 
Required bandwidth for size:  ( 864 , 480 )  @ 5  is 1.15564 Mbit 
Required bandwidth for size:  ( 320 , 180 )  @ 30  is 1.90123 Mbit 
Required bandwidth for size:  ( 320 , 180 )  @ 25  is 1.89367 Mbit 
Required bandwidth for size:  ( 320 , 180 )  @ 20  is 1.26006 Mbit 
Required bandwidth for size:  ( 320 , 180 )  @ 15  is 0.957935 Mbit 
Required bandwidth for size:  ( 320 , 180 )  @ 10  is 0.637158 Mbit 
Required bandwidth for size:  ( 320 , 180 )  @ 5  is 0.328456 Mbit

如果您想出了解决方案,请分享。谢谢!

于 2012-11-18T07:43:20.673 回答