UVC 入门

UVC

市面上 UVC摄像头很多,本文通过win10自带的工具 ,分析摄像头能力。同时通过抓包实现基本调试。

usbview.exe (window debug 神器)

参照 https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/usbview

安装驱动,同时安装VS 时 选择安装 Windows 开发kits 。就能在kits中找到
Windows Kits\10\Debuggers\x64
在这里插入图片描述

UVC SPEC

UVC 拓扑图

在这里插入图片描述

UVC 描述符层次图

在这里插入图片描述

UVC view获取的信息

根据上述的拓扑图 和层次图,USBview能获取对应的信息

设备描述符

设备描述符和USB设备描述符的数据格式一致,各字段的解释详见USB设备描述符。
在这里插入图片描述

配置描述符

配置描述符包含的信息比较多,包括配置描述符本身,也包括关联接口描述符,接口描述符,端点描述符和UVC定义的其它描述符如输入端点描述符等。

第一个当然是配置描述符:
在这里插入图片描述

UVC的接口关联描述符(Interface Association Descriptor )

在这里插入图片描述

控制接口描述符

为标准的描述符,后跟类特定视频控制接口头描述符.

在这里插入图片描述

Class-Specific 视频控制接口头描述符

在这里插入图片描述

其他描述符 也可以一一对应。

视频流输入头描述符

在这里插入图片描述

MJPEG
         ===>Video Streaming MJPEG Format Type Descriptor<===
bLength:                           0x0B
bDescriptorType:                   0x24
bDescriptorSubtype:                0x06
bFormatIndex:                      0x01
bNumFrameDescriptors:              0x06
bmFlags:                           0x01  -> Sample Size is Fixed
bDefaultFrameIndex:                0x01
bAspectRatioX:                     0x00
bAspectRatioY:                     0x00
bmInterlaceFlags:                  0x00
     D00   = 0  non-Interlaced stream or variable
     D01   = 0  2 fields per frame
     D02   = 0  Field 1 not first
     D03   = 0  Reserved
     D4..5 = 0  Field patterns  -> Field 1 only
     D6..7 = 0  Display Mode  -> Bob only
bCopyProtect:                      0x00  -> Duplication Unrestricted
*!*ERROR:  no Color Matching Descriptor for this format          
       
          ===>Video Streaming MJPEG Frame Type Descriptor<===
          --->This is the Default (optimum) Frame index
bLength:                           0x1E
bDescriptorType:                   0x24
bDescriptorSubtype:                0x07
bFrameIndex:                       0x01
bmCapabilities:                    0x00
wWidth:                          0x0A00 = 2560
wHeight:                         0x05A0 = 1440
dwMinBitRate:                0x69780000
dwMaxBitRate:                0x69780000
dwMaxVideoFrameBufferSize:   0x00708000
dwDefaultFrameInterval:      0x00051615 = 33.333300 mSec (30.00 Hz)
bFrameIntervalType:                0x01
===>Additional Discrete Frame TypeData
dwFrameInterval[1]:          0x00051615 = 33.333300 mSec (30.00 Hz)

          ===>Video Streaming MJPEG Frame Type Descriptor<===
bLength:                           0x1E
bDescriptorType:                   0x24
bDescriptorSubtype:                0x07
bFrameIndex:                       0x02
bmCapabilities:                    0x00
wWidth:                          0x0900 = 2304
wHeight:                         0x0510 = 1296
dwMinBitRate:                0x556E0000
dwMaxBitRate:                0x556E0000
dwMaxVideoFrameBufferSize:   0x005B2000
dwDefaultFrameInterval:      0x00051615 = 33.333300 mSec (30.00 Hz)
bFrameIntervalType:                0x01
===>Additional Discrete Frame TypeData
dwFrameInterval[1]:          0x00051615 = 33.333300 mSec (30.00 Hz)

          ===>Video Streaming MJPEG Frame Type Descriptor<===
bLength:                           0x1E
bDescriptorType:                   0x24
bDescriptorSubtype:                0x07
bFrameIndex:                       0x03
bmCapabilities:                    0x00
wWidth:                          0x0780 = 1920
wHeight:                         0x0438 = 1080
dwMinBitRate:                0x3B538000
dwMaxBitRate:                0x3B538000
dwMaxVideoFrameBufferSize:   0x003F4800
dwDefaultFrameInterval:      0x00051615 = 33.333300 mSec (30.00 Hz)
bFrameIntervalType:                0x01
===>Additional Discrete Frame TypeData
dwFrameInterval[1]:          0x00051615 = 33.333300 mSec (30.00 Hz)

          ===>Video Streaming MJPEG Frame Type Descriptor<===
bLength:                           0x1E
bDescriptorType:                   0x24
bDescriptorSubtype:                0x07
bFrameIndex:                       0x04
bmCapabilities:                    0x00
wWidth:                          0x0500 = 1280
wHeight:                         0x02D0 = 720
dwMinBitRate:                0x1A5E0000
dwMaxBitRate:                0x1A5E0000
dwMaxVideoFrameBufferSize:   0x001C2000
dwDefaultFrameInterval:      0x00051615 = 33.333300 mSec (30.00 Hz)
bFrameIntervalType:                0x01
===>Additional Discrete Frame TypeData
dwFrameInterval[1]:          0x00051615 = 33.333300 mSec (30.00 Hz)

          ===>Video Streaming MJPEG Frame Type Descriptor<===
bLength:                           0x1E
bDescriptorType:                   0x24
bDescriptorSubtype:                0x07
bFrameIndex:                       0x05
bmCapabilities:                    0x00
wWidth:                          0x0280 = 640
wHeight:                         0x01E0 = 480
dwMinBitRate:                0x08CA0000
dwMaxBitRate:                0x08CA0000
dwMaxVideoFrameBufferSize:   0x00096000
dwDefaultFrameInterval:      0x00051615 = 33.333300 mSec (30.00 Hz)
bFrameIntervalType:                0x01
===>Additional Discrete Frame TypeData
dwFrameInterval[1]:          0x00051615 = 33.333300 mSec (30.00 Hz)

          ===>Video Streaming MJPEG Frame Type Descriptor<===
bLength:                           0x1E
bDescriptorType:                   0x24
bDescriptorSubtype:                0x07
bFrameIndex:                       0x06
bmCapabilities:                    0x00
wWidth:                          0x0280 = 640
wHeight:                         0x0168 = 360
dwMinBitRate:                0x06978000
dwMaxBitRate:                0x06978000
dwMaxVideoFrameBufferSize:   0x00070800
dwDefaultFrameInterval:      0x00051615 = 33.333300 mSec (30.00 Hz)
bFrameIntervalType:                0x01
===>Additional Discrete Frame TypeData
dwFrameInterval[1]:          0x00051615 = 33.333300 mSec (30.00 Hz)

可以明显看到 设备支持MJPEG

bFormatIndexbFrameIndexwidth X height
112560 X 1440
122304 X 1296
131920 X 1080
141280 X 720
15640 X 480
16640X 360

喜欢作者的文章 或者探讨 关注如下公众号

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

lin_AIOS

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值