UVC Windows下UVC摄像头数据分析
2020-10-23
5847
0
这里我们分析一款UVC摄像头来进行数据分析。
- 环境:win10 x64
- 工具:bushound,usbviewer
将摄像头插入PC后,打开usbviewer工具,可以看到关于此摄像头的相关信息。
可以看到,这个摄像头其实是一个USB复合设备,所以其对应的系统驱动为USBCCGP,然后再由USB复合设备驱动枚举出2个设备,一个为摄像头(UVC设备),一个为音频输入设备(UAV设备)。
描述符分析
由于USBViewer这个工具是按USB端口来显示设备信息的,所以这里显示的是复合设备的信息,当然这里也包括摄像头和音频输入设备。这里我们只分析UVC摄像头的描述符。
设备描述符
设备描述符和USB设备描述符的数据格式一致,各字段的解释详见USB设备描述符。
===>Device Descriptor<===
bLength: 0x12
bDescriptorType: 0x01
bcdUSB: 0x0200
bDeviceClass: 0xEF -> This is a Multi-interface Function Code Device
bDeviceSubClass: 0x02 -> This is the Common Class Sub Class
bDeviceProtocol: 0x01 -> This is the Interface Association Descriptor protocol
bMaxPacketSize0: 0x40 = (64) Bytes
idVendor: 0x1D6B = The Linux Foundation
idProduct: 0x0102
bcdDevice: 0x0409
iManufacturer: 0x01
English (United States) "Linux Foundation"
iProduct: 0x02
English (United States) "USB Webcam gadget"
iSerialNumber: 0x00
bNumConfigurations: 0x01
配置描述符
配置描述符包含的信息比较多,包括配置描述符本身,也包括关联接口描述符,接口描述符,端点描述符和UVC定义的其它描述符如输入端点描述符等。
第一个当然是配置描述符:
===>Configuration Descriptor<===
bLength: 0x09
bDescriptorType: 0x02
wTotalLength: 0x032B -> Validated
bNumInterfaces: 0x04
bConfigurationValue: 0x01
iConfiguration: 0x04
English (United States) "Video"
bmAttributes: 0xC0 -> Self Powered
MaxPower: 0x01 = 2 mA
UVC的接口关联描述符
===>IAD Descriptor<===
bLength: 0x08
bDescriptorType: 0x0B
bFirstInterface: 0x00
bInterfaceCount: 0x02
bFunctionClass: 0x0E -> Video Interface Class
bFunctionSubClass: 0x03 -> Video Interface Collection
bFunctionProtocol: 0x00 -> PC_PROTOCOL_UNDEFINED protocol
iFunction: 0x05
English (United States) "UVC HD Camera"
控制接口描述符,为标准的描述符,后跟类特定视频控制接口头描述符.
===>Interface Descriptor<===
bLength: 0x09
bDescriptorType: 0x04
bInterfaceNumber: 0x00
bAlternateSetting: 0x00
bNumEndpoints: 0x01
bInterfaceClass: 0x0E -> Video Interface Class
bInterfaceSubClass: 0x01 -> Video Control Interface SubClass
bInterfaceProtocol: 0x00
iInterface: 0x05
English (United States) "UVC HD Camera"
===>Class-Specific Video Control Interface Header Descriptor<===
bLength: 0x0D
bDescriptorType: 0x24
bDescriptorSubtype: 0x01
bcdVDC: 0x0100
wTotalLength: 0x0069 -> Validated
dwClockFreq: 0x02DC6C00 = (48000000) Hz
bInCollection: 0x01
baInterfaceNr[1]: 0x01
USB Video Class device: spec version 1.0
输入端点描述符:
===>Video Control Input Terminal Descriptor<===
bLength: 0x12
bDescriptorType: 0x24
bDescriptorSubtype: 0x02
bTerminalID: 0x01
wTerminalType: 0x0201 = (ITT_CAMERA)
bAssocTerminal: 0x00
iTerminal: 0x00
===>Camera Input Terminal Data
wObjectiveFocalLengthMin: 0x0000
wObjectiveFocalLengthMax: 0x0000
wOcularFocalLength: 0x0000
bControlSize: 0x03
bmControls : 0x02 0x00 0x00
D00 = 0 no - Scanning Mode
D01 = 1 yes - Auto-Exposure Mode
D02 = 0 no - Auto-Exposure Priority
D03 = 0 no - Exposure Time (Absolute)
D04 = 0 no - Exposure Time (Relative)
D05 = 0 no - Focus (Absolute)
D06 = 0 no - Focus (Relative)
D07 = 0 no - Iris (Absolute)
D08 = 0 no - Iris (Relative)
D09 = 0 no - Zoom (Absolute)
D10 = 0 no - Zoom (Relative)
D11 = 0 no - PanTilt (Absolute)
D12 = 0 no - PanTilt (Relative)
D13 = 0 no - Roll (Absolute)
D14 = 0 no - Roll (Relative)
D15 = 0 no - Reserved
D16 = 0 no - Reserved
D17 = 0 no - Focus, Auto
D18 = 0 no - Privacy
D19 = 0 no - Focus, Simple
D20 = 0 no - Window
D21 = 0 no - Region of Interest
D22 = 0 no - Reserved
D23 = 0 no - Reserved
===>Video Control Processing Unit Descriptor<===
bLength: 0x0B
bDescriptorType: 0x24
bDescriptorSubtype: 0x05
bUnitID: 0x04
bSourceID: 0x01
wMaxMultiplier: 0x4000
bControlSize: 0x02
bmControls : 0x1F 0x04
D00 = 1 yes - Brightness
D01 = 1 yes - Contrast
D02 = 1 yes - Hue
D03 = 1 yes - Saturation
D04 = 1 yes - Sharpness
D05 = 0 no - Gamma
D06 = 0 no - White Balance Temperature
D07 = 0 no - White Balance Component
D08 = 0 no - Backlight Compensation
D09 = 0 no - Gain
D10 = 1 yes - Power Line Frequency
D11 = 0 no - Hue, Auto
D12 = 0 no - White Balance Temperature, Auto
D13 = 0 no - White Balance Component, Auto
D14 = 0 no - Digital Multiplier
D15 = 0 no - Digital Multiplier Limit
iProcessing : 0x00
===>Video Control Extension Unit Descriptor<===
bLength: 0x1B
bDescriptorType: 0x24
bDescriptorSubtype: 0x06
bUnitID: 0x06
guidExtensionCode: {23E49ED0-1178-4F31-AE52-D2FB8A8D3B48}
bNumControls: 0x0E
bNrInPins: 0x01
===>List of Connected Units and Terminal ID's
baSourceID[1]: 0x04
bControlSize: 0x02
bmControls : 0xFF 0x6F
D00 = 1 yes - Vendor-Specific (Optional)
D01 = 1 yes - Vendor-Specific (Optional)
D02 = 1 yes - Vendor-Specific (Optional)
D03 = 1 yes - Vendor-Specific (Optional)
D04 = 1 yes - Vendor-Specific (Optional)
D05 = 1 yes - Vendor-Specific (Optional)
D06 = 1 yes - Vendor-Specific (Optional)
D07 = 1 yes - Vendor-Specific (Optional)
D08 = 1 yes - Vendor-Specific (Optional)
D09 = 1 yes - Vendor-Specific (Optional)
D10 = 1 yes - Vendor-Specific (Optional)
D11 = 1 yes - Vendor-Specific (Optional)
D12 = 0 no - Vendor-Specific (Optional)
D13 = 1 yes - Vendor-Specific (Optional)
D14 = 1 yes - Vendor-Specific (Optional)
D15 = 0 no - Vendor-Specific (Optional)
iExtension: 0x00
第二个扩展单元描述符:
===>Video Control Extension Unit Descriptor<===
bLength: 0x1B
bDescriptorType: 0x24
bDescriptorSubtype: 0x06
bUnitID: 0x02
guidExtensionCode: {2C49D16A-32B8-4485-3EA8-643A152362F2}
bNumControls: 0x06
bNrInPins: 0x01
===>List of Connected Units and Terminal ID's
baSourceID[1]: 0x06
bControlSize: 0x02
bmControls : 0x3F 0x00
D00 = 1 yes - Vendor-Specific (Optional)
D01 = 1 yes - Vendor-Specific (Optional)
D02 = 1 yes - Vendor-Specific (Optional)
D03 = 1 yes - Vendor-Specific (Optional)
D04 = 1 yes - Vendor-Specific (Optional)
D05 = 1 yes - Vendor-Specific (Optional)
D06 = 0 no - Vendor-Specific (Optional)
D07 = 0 no - Vendor-Specific (Optional)
D08 = 0 no - Vendor-Specific (Optional)
D09 = 0 no - Vendor-Specific (Optional)
D10 = 0 no - Vendor-Specific (Optional)
D11 = 0 no - Vendor-Specific (Optional)
D12 = 0 no - Vendor-Specific (Optional)
D13 = 0 no - Vendor-Specific (Optional)
D14 = 0 no - Vendor-Specific (Optional)
D15 = 0 no - Vendor-Specific (Optional)
iExtension: 0x00
输出端点描述符:
===>Video Control Output Terminal Descriptor<===
bLength: 0x09
bDescriptorType: 0x24
bDescriptorSubtype: 0x03
bTerminalID: 0x03
wTerminalType: 0x0101 = (TT_STREAMING)
bAssocTerminal: 0x00
bSourceID: 0x02
iTerminal: 0x00
用于中断返回的状返回端点描述符:
===>Endpoint Descriptor<===
bLength: 0x07
bDescriptorType: 0x05
bEndpointAddress: 0x83 -> Direction: IN - EndpointID: 3
bmAttributes: 0x03 -> Interrupt Transfer Type
wMaxPacketSize: 0x0010 = 1 transactions per microframe, 0x10 max bytes
bInterval: 0x08
===>Class-specific VC Interrupt Endpoint Descriptor<===
bLength: 0x05
bDescriptorType: 0x25
bDescriptorSubtype: 0x03
wMaxTransferSize: 0x0010 = (16) Bytes
`
视频流接口描述符
===>Interface Descriptor<===
bLength: 0x09
bDescriptorType: 0x04
bInterfaceNumber: 0x01
bAlternateSetting: 0x00
bNumEndpoints: 0x00
bInterfaceClass: 0x0E -> Video Interface Class
bInterfaceSubClass: 0x02 -> Video Streaming Interface SubClass
bInterfaceProtocol: 0x00
iInterface: 0x06
English (United States) "Video Streaming"
视频流输入头描述符
===>Video Class-Specific VS Video Input Header Descriptor<===
bLength: 0x11
bDescriptorType: 0x24
bDescriptorSubtype: 0x01
bNumFormats: 0x04
wTotalLength: 0x0217 -> Validated
bEndpointAddress: 0x81 -> Direction: IN - EndpointID: 1
bmInfo: 0x00 -> Dynamic Format Change not Supported
bTerminalLink: 0x03
bStillCaptureMethod: 0x00 -> No Still Capture
bTriggerSupport: 0x00 -> No Hardware Triggering Support
bTriggerUsage: 0x00
bControlSize: 0x01
Video Payload Format 1 0x00
D00 = 0 no - Key Frame Rate
D01 = 0 no - P Frame Rate
D02 = 0 no - Compression Quality
D03 = 0 no - Compression Window Size
D04 = 0 no - Generate Key Frame
D05 = 0 no - Update Frame Segment
D06 = 0 no - Reserved
D07 = 0 no - Reserved
Video Payload Format 2 0x00
D00 = 0 no - Key Frame Rate
D01 = 0 no - P Frame Rate
D02 = 0 no - Compression Quality
D03 = 0 no - Compression Window Size
D04 = 0 no - Generate Key Frame
D05 = 0 no - Update Frame Segment
D06 = 0 no - Reserved
D07 = 0 no - Reserved
Video Payload Format 3 0x04
D00 = 0 no - Key Frame Rate
D01 = 0 no - P Frame Rate
D02 = 1 yes - Compression Quality
D03 = 0 no - Compression Window Size
D04 = 0 no - Generate Key Frame
D05 = 0 no - Update Frame Segment
D06 = 0 no - Reserved
D07 = 0 no - Reserved
Video Payload Format 4 0x04
D00 = 0 no - Key Frame Rate
D01 = 0 no - P Frame Rate
D02 = 1 yes - Compression Quality
D03 = 0 no - Compression Window Size
D04 = 0 no - Generate Key Frame
D05 = 0 no - Update Frame Segment
D06 = 0 no - Reserved
D07 = 0 no - Reserved
支持的三种分辩率的MJPG数据格式和帧格式描述符:
bFormatIndex | bFrameIndex | 分辩率及及帧率 |
---|---|---|
1 | 1 | 640x480x(30,15,10) |
1 | 2 | 1280x720x(30,15,10) |
1 | 3 | 1920x1080x(30,15,10) |
===>Video Streaming MJPEG Format Type Descriptor<===
bLength: 0x0B
bDescriptorType: 0x24
bDescriptorSubtype: 0x06
bFormatIndex: 0x01
bNumFrameDescriptors: 0x03
bmFlags: 0x00 -> Sample Size is Not Fixed
bDefaultFrameIndex: 0x03
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
===>Video Streaming MJPEG Frame Type Descriptor<===
bLength: 0x26
bDescriptorType: 0x24
bDescriptorSubtype: 0x07
bFrameIndex: 0x01
bmCapabilities: 0x00
wWidth: 0x0280 = 640
wHeight: 0x01E0 = 480
dwMinBitRate: 0x02EE0000
dwMaxBitRate: 0x08CA0000
dwMaxVideoFrameBufferSize: 0x00096000
dwDefaultFrameInterval: 0x00051615 = 33.333300 mSec (30.00 Hz)
bFrameIntervalType: 0x03
===>Additional Discrete Frame TypeData
dwFrameInterval[1]: 0x00051615 = 33.333300 mSec (30.00 Hz)
dwFrameInterval[2]: 0x000A2C2A = 66.666600 mSec (15.00 Hz)
dwFrameInterval[3]: 0x000F4240 = 100.000000 mSec (10.00 Hz)
===>Video Streaming MJPEG Frame Type Descriptor<===
bLength: 0x26
bDescriptorType: 0x24
bDescriptorSubtype: 0x07
bFrameIndex: 0x02
bmCapabilities: 0x00
wWidth: 0x0500 = 1280
wHeight: 0x02D0 = 720
dwMinBitRate: 0x08CA0000
dwMaxBitRate: 0x1A5E0000
dwMaxVideoFrameBufferSize: 0x001C2000
dwDefaultFrameInterval: 0x00051615 = 33.333300 mSec (30.00 Hz)
bFrameIntervalType: 0x03
===>Additional Discrete Frame TypeData
dwFrameInterval[1]: 0x00051615 = 33.333300 mSec (30.00 Hz)
dwFrameInterval[2]: 0x000A2C2A = 66.666600 mSec (15.00 Hz)
dwFrameInterval[3]: 0x000F4240 = 100.000000 mSec (10.00 Hz)
===>Video Streaming MJPEG Frame Type Descriptor<===
--->This is the Default (optimum) Frame index
bLength: 0x26
bDescriptorType: 0x24
bDescriptorSubtype: 0x07
bFrameIndex: 0x03
bmCapabilities: 0x00
wWidth: 0x0780 = 1920
wHeight: 0x0438 = 1080
dwMinBitRate: 0x13C68000
dwMaxBitRate: 0x3B538000
dwMaxVideoFrameBufferSize: 0x003F4800
dwDefaultFrameInterval: 0x00051615 = 33.333300 mSec (30.00 Hz)
bFrameIntervalType: 0x03
===>Additional Discrete Frame TypeData
dwFrameInterval[1]: 0x00051615 = 33.333300 mSec (30.00 Hz)
dwFrameInterval[2]: 0x000A2C2A = 66.666600 mSec (15.00 Hz)
dwFrameInterval[3]: 0x000F4240 = 100.000000 mSec (10.00 Hz)
VS_FORMAT_FRAME_BASED和VS_FRAME_FRAME_BASED的YUV格式描述符:
bFormatIndex | bFrameIndex | 分辩率及及帧率 |
---|---|---|
2 | 1 | 640x480x(30,15,10) |
2 | 2 | 1280x720x(30,15,10) |
===>Video Streaming Uncompressed Format Type Descriptor<===
bLength: 0x1B
bDescriptorType: 0x24
bDescriptorSubtype: 0x04
bFormatIndex: 0x02
bNumFrameDescriptors: 0x02
guidFormat: {32595559-0000-0010-8000-00AA00389B71} = YUY2 Format
bBitsPerPixel: 0x10
bDefaultFrameIndex: 0x01
bAspectRatioX: 0x00
bAspectRatioY: 0x00
bmInterlaceFlags: 0x00
D0 = 0x00 Interlaced stream or variable: No
D1 = 0x00 Fields per frame: 2 fields
D2 = 0x00 Field 1 first: No
D3 = 0x00 Reserved
D4..5 = 0x00 Field patterns -> Field 1 only
D6..7 = 0x00 Display Mode -> Bob only
bCopyProtect: 0x00 -> Duplication Unrestricted
===>Video Streaming Uncompressed Frame Type Descriptor<===
--->This is the Default (optimum) Frame index
bLength: 0x26
bDescriptorType: 0x24
bDescriptorSubtype: 0x05
bFrameIndex: 0x01
bmCapabilities: 0x00
wWidth: 0x0280 = 640
wHeight: 0x01E0 = 480
dwMinBitRate: 0x02EE0000
dwMaxBitRate: 0x08CA0000
dwMaxVideoFrameBufferSize: 0x00096000
dwDefaultFrameInterval: 0x00051615 = 33.333300 mSec (30.00 Hz)
bFrameIntervalType: 0x03
===>Additional Discrete Frame Type Data
dwFrameInterval[1]: 0x00051615 = 33.333300 mSec (30.00 Hz)
dwFrameInterval[2]: 0x000A2C2A = 66.666600 mSec (15.00 Hz)
dwFrameInterval[3]: 0x000F4240 = 100.000000 mSec (10.00 Hz)
===>Video Streaming Uncompressed Frame Type Descriptor<===
bLength: 0x26
bDescriptorType: 0x24
bDescriptorSubtype: 0x05
bFrameIndex: 0x02
bmCapabilities: 0x00
wWidth: 0x0500 = 1280
wHeight: 0x02D0 = 720
dwMinBitRate: 0x08CA0000
dwMaxBitRate: 0x1A5E0000
dwMaxVideoFrameBufferSize: 0x001C2000
dwDefaultFrameInterval: 0x00051615 = 33.333300 mSec (30.00 Hz)
bFrameIntervalType: 0x03
===>Additional Discrete Frame Type Data
dwFrameInterval[1]: 0x00051615 = 33.333300 mSec (30.00 Hz)
dwFrameInterval[2]: 0x000A2C2A = 66.666600 mSec (15.00 Hz)
dwFrameInterval[3]: 0x000F4240 = 100.000000 mSec (10.00 Hz)
H264数据格式
---- VS Frame Based Payload Format Type Descriptor ----
*!*ERROR: This format is NOT ALLOWED for UVC 1.0 devices
bLength : 0x1C (28 bytes)
bDescriptorType : 0x24 (Video Streaming Interface)
bDescriptorSubtype : 0x10 (Frame Based Format Type)
bFormatIndex : 0x03 (3)
bNumFrameDescriptors : 0x03 (3)
guidFormat : {34363248-0000-0010-8000-00AA00389B71} (H264)
bBitsPerPixel : 0x10 (16 bits)
bDefaultFrameIndex : 0x03 (3)
bAspectRatioX : 0x00
bAspectRatioY : 0x00
bmInterlaceFlags : 0x00
D0 IL stream or variable: 0 (no)
D1 Fields per frame : 0 (2 fields)
D2 Field 1 first : 0 (no)
D3 Reserved : 0
D4..5 Field pattern : 0 (Field 1 only)
D6..7 Display Mode : 0 (Bob only)
bCopyProtect : 0x00 (No restrictions)
bVariableSize : 0x01 (Variable Size)
*!*ERROR: Found 6 frame descriptors (should be 3)
Data (HexDump) : 1C 24 10 03 03 48 32 36 34 00 00 10 00 80 00 00 .$...H264.......
AA 00 38 9B 71 10 03 00 00 00 00 01 ..8.q.......
GUID来源于:https://uuid.pirate-server.com/
帧格式为:
第一个为640X480
----- VS Frame Based Payload Frame Type Descriptor ----
*!*ERROR bDescriptorSubtype did not exist in UVC 1.0
bLength : 0x26 (38 bytes)
bDescriptorType : 0x24 (Video Streaming Interface)
bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type)
bFrameIndex : 0x01
bmCapabilities : 0x00
wWidth : 0x0280 (640)
wHeight : 0x01E0 (480)
dwMinBitRate : 0x02EE0000 (49152000 bps -> 6.144 MB/s)
dwMaxBitRate : 0x08CA0000 (147456000 bps -> 18.432 MB/s)
dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps)
bFrameIntervalType : 0x03 (3 discrete frame intervals supported)
dwBytesPerLine : 0x00 (0 bytes)
adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps)
adwFrameInterval[2] : 0x000A2C2A (66.6666 ms -> 15.000 fps)
adwFrameInterval[3] : 0x000F4240 (100.0000 ms -> 10.000 fps)
Data (HexDump) : 26 24 11 01 00 80 02 E0 01 00 00 EE 02 00 00 CA &$..............
08 15 16 05 00 03 00 00 00 00 15 16 05 00 2A 2C ..............*,
0A 00 40 42 0F 00 ..@B..
第二个为1280x720
----- VS Frame Based Payload Frame Type Descriptor ----
*!*ERROR bDescriptorSubtype did not exist in UVC 1.0
bLength : 0x26 (38 bytes)
bDescriptorType : 0x24 (Video Streaming Interface)
bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type)
bFrameIndex : 0x02
bmCapabilities : 0x00
wWidth : 0x0500 (1280)
wHeight : 0x02D0 (720)
dwMinBitRate : 0x08CA0000 (147456000 bps -> 18.432 MB/s)
dwMaxBitRate : 0x1A5E0000 (442368000 bps -> 55.296 MB/s)
dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps)
bFrameIntervalType : 0x03 (3 discrete frame intervals supported)
dwBytesPerLine : 0x00 (0 bytes)
adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps)
adwFrameInterval[2] : 0x000A2C2A (66.6666 ms -> 15.000 fps)
adwFrameInterval[3] : 0x000F4240 (100.0000 ms -> 10.000 fps)
Data (HexDump) : 26 24 11 02 00 00 05 D0 02 00 00 CA 08 00 00 5E &$.............^
1A 15 16 05 00 03 00 00 00 00 15 16 05 00 2A 2C ..............*,
0A 00 40 42 0F 00 ..@B..
第三个为:1920x1080
----- VS Frame Based Payload Frame Type Descriptor ----
*!*ERROR bDescriptorSubtype did not exist in UVC 1.0
bLength : 0x26 (38 bytes)
bDescriptorType : 0x24 (Video Streaming Interface)
bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type)
bFrameIndex : 0x03
bmCapabilities : 0x00
wWidth : 0x0780 (1920)
wHeight : 0x0438 (1080)
dwMinBitRate : 0x13C68000 (331776000 bps -> 41.472 MB/s)
dwMaxBitRate : 0x3B538000 (995328000 bps -> 124.416 MB/s)
dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps)
bFrameIntervalType : 0x03 (3 discrete frame intervals supported)
dwBytesPerLine : 0x00 (0 bytes)
adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps)
adwFrameInterval[2] : 0x000A2C2A (66.6666 ms -> 15.000 fps)
adwFrameInterval[3] : 0x000F4240 (100.0000 ms -> 10.000 fps)
Data (HexDump) : 26 24 11 03 00 80 07 38 04 00 80 C6 13 00 80 53 &$.....8.......S
3B 15 16 05 00 03 00 00 00 00 15 16 05 00 2A 2C ;.............*,
0A 00 40 42 0F 00 ..@B..
H265数据格式
---- VS Frame Based Payload Format Type Descriptor ----
*!*ERROR: This format is NOT ALLOWED for UVC 1.0 devices
bLength : 0x1C (28 bytes)
bDescriptorType : 0x24 (Video Streaming Interface)
bDescriptorSubtype : 0x10 (Frame Based Format Type)
bFormatIndex : 0x04 (4)
bNumFrameDescriptors : 0x03 (3)
guidFormat : {35363248-0000-0010-8000-00AA00389B71} (H265)
bBitsPerPixel : 0x10 (16 bits)
bDefaultFrameIndex : 0x03 (3)
bAspectRatioX : 0x00
bAspectRatioY : 0x00
bmInterlaceFlags : 0x00
D0 IL stream or variable: 0 (no)
D1 Fields per frame : 0 (2 fields)
D2 Field 1 first : 0 (no)
D3 Reserved : 0
D4..5 Field pattern : 0 (Field 1 only)
D6..7 Display Mode : 0 (Bob only)
bCopyProtect : 0x00 (No restrictions)
bVariableSize : 0x01 (Variable Size)
Data (HexDump) : 1C 24 10 04 03 48 32 36 35 00 00 10 00 80 00 00 .$...H265.......
AA 00 38 9B 71 10 03 00 00 00 00 01 ..8.q.......
帧格式为:
第一个为640X480
----- VS Frame Based Payload Frame Type Descriptor ----
*!*ERROR bDescriptorSubtype did not exist in UVC 1.0
bLength : 0x26 (38 bytes)
bDescriptorType : 0x24 (Video Streaming Interface)
bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type)
bFrameIndex : 0x01
bmCapabilities : 0x00
wWidth : 0x0280 (640)
wHeight : 0x01E0 (480)
dwMinBitRate : 0x02EE0000 (49152000 bps -> 6.144 MB/s)
dwMaxBitRate : 0x08CA0000 (147456000 bps -> 18.432 MB/s)
dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps)
bFrameIntervalType : 0x03 (3 discrete frame intervals supported)
dwBytesPerLine : 0x00 (0 bytes)
adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps)
adwFrameInterval[2] : 0x000A2C2A (66.6666 ms -> 15.000 fps)
adwFrameInterval[3] : 0x000F4240 (100.0000 ms -> 10.000 fps)
Data (HexDump) : 26 24 11 01 00 80 02 E0 01 00 00 EE 02 00 00 CA &$..............
08 15 16 05 00 03 00 00 00 00 15 16 05 00 2A 2C ..............*,
0A 00 40 42 0F 00 ..@B..
第二个为1280x720
----- VS Frame Based Payload Frame Type Descriptor ----
*!*ERROR bDescriptorSubtype did not exist in UVC 1.0
bLength : 0x26 (38 bytes)
bDescriptorType : 0x24 (Video Streaming Interface)
bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type)
bFrameIndex : 0x02
bmCapabilities : 0x00
wWidth : 0x0500 (1280)
wHeight : 0x02D0 (720)
dwMinBitRate : 0x08CA0000 (147456000 bps -> 18.432 MB/s)
dwMaxBitRate : 0x1A5E0000 (442368000 bps -> 55.296 MB/s)
dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps)
bFrameIntervalType : 0x03 (3 discrete frame intervals supported)
dwBytesPerLine : 0x00 (0 bytes)
adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps)
adwFrameInterval[2] : 0x000A2C2A (66.6666 ms -> 15.000 fps)
adwFrameInterval[3] : 0x000F4240 (100.0000 ms -> 10.000 fps)
Data (HexDump) : 26 24 11 02 00 00 05 D0 02 00 00 CA 08 00 00 5E &$.............^
1A 15 16 05 00 03 00 00 00 00 15 16 05 00 2A 2C ..............*,
0A 00 40 42 0F 00 ..@B..
第三个为:1920x1080
----- VS Frame Based Payload Frame Type Descriptor ----
*!*ERROR bDescriptorSubtype did not exist in UVC 1.0
bLength : 0x26 (38 bytes)
bDescriptorType : 0x24 (Video Streaming Interface)
bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type)
bFrameIndex : 0x03
bmCapabilities : 0x00
wWidth : 0x0780 (1920)
wHeight : 0x0438 (1080)
dwMinBitRate : 0x13C68000 (331776000 bps -> 41.472 MB/s)
dwMaxBitRate : 0x3B538000 (995328000 bps -> 124.416 MB/s)
dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps)
bFrameIntervalType : 0x03 (3 discrete frame intervals supported)
dwBytesPerLine : 0x00 (0 bytes)
adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps)
adwFrameInterval[2] : 0x000A2C2A (66.6666 ms -> 15.000 fps)
adwFrameInterval[3] : 0x000F4240 (100.0000 ms -> 10.000 fps)
Data (HexDump) : 26 24 11 03 00 80 07 38 04 00 80 C6 13 00 80 53 &$.....8.......S
3B 15 16 05 00 03 00 00 00 00 15 16 05 00 2A 2C ;.............*,
0A 00 40 42 0F 00 ..@B..
===>Color Matching Descriptor<===
bLength: 0x06
bDescriptorType: 0x24
bDescriptorSubtype: 0x0D
bColorPrimaries: 0x01
bTransferCharacteristics: 0x01
bMatrixCoefficients: 0x04
用于转换的接口描述符,包含一个81端点用于数据接收视频数据,方式为等时/同步传输方式。
===>Interface Descriptor<===
bLength: 0x09
bDescriptorType: 0x04
bInterfaceNumber: 0x01
bAlternateSetting: 0x01
bNumEndpoints: 0x01
bInterfaceClass: 0x0E -> Video Interface Class
bInterfaceSubClass: 0x02 -> Video Streaming Interface SubClass
bInterfaceProtocol: 0x00
iInterface: 0x06
English (United States) "Video Streaming"
===>Endpoint Descriptor<===
bLength: 0x07
bDescriptorType: 0x05
bEndpointAddress: 0x81 -> Direction: IN - EndpointID: 1
bmAttributes: 0x05 -> Isochronous Transfer Type, Synchronization Type = Asynchronous, Usage Type = Data Endpoint
wMaxPacketSize: 0x1400 = 3 transactions per microframe, 0x400 max bytes
bInterval: 0x01
HID人机交互QQ群:564808376
UAC音频QQ群:218581009
UVC相机QQ群:331552032
BOT&UASP大容量存储QQ群:258159197
STC-USB单片机QQ群:315457461
USB技术交流QQ群2:580684376
USB技术交流QQ群:952873936