罗技 Streamcam 未在 Manjaro 上提供所有模式

Anp*_*pan 7 linux usb webcam logitech-webcam

我买了一个罗技 Streamcam 来获得 1080p60 网络摄像头输入,我已经习惯了只在 Linux 中工作的网络摄像头。它确实有效,但对于未压缩的视频,我可以设置的最佳模式是 1080p,全部为 5 fps。我无法使用这台相机支持的 ​​1080p60 模式(它甚至在镜头上方这么说)。即使压缩的 MJPEG 在 1920x1080 上也只能达到 30fps。v4l2-ctl flat out 拒绝尝试设置更高的 fps 值,只是回落到 5fps。

当我插入时 dmesg 会说以下内容:

[  415.860457] usb 3-4: New USB device found, idVendor=046d, idProduct=0893, bcdDevice= 0.17
[  415.860460] usb 3-4: New USB device strings: Mfr=0, Product=2, SerialNumber=3
[  415.860462] usb 3-4: Product: Logitech StreamCam
[  415.860463] usb 3-4: SerialNumber: 599D4A05
[  415.908735] uvcvideo: Found UVC 1.00 device Logitech StreamCam (046d:0893)
[  415.919323] uvcvideo 3-4:1.0: Entity type for entity Processing 3 was not initialized!
[  415.919326] uvcvideo 3-4:1.0: Entity type for entity Extension 14 was not initialized!
[  415.919327] uvcvideo 3-4:1.0: Entity type for entity Extension 6 was not initialized!
[  415.919329] uvcvideo 3-4:1.0: Entity type for entity Extension 8 was not initialized!
[  415.919330] uvcvideo 3-4:1.0: Entity type for entity Extension 9 was not initialized!
[  415.919332] uvcvideo 3-4:1.0: Entity type for entity Extension 10 was not initialized!
[  415.919333] uvcvideo 3-4:1.0: Entity type for entity Extension 11 was not initialized!
[  415.919334] uvcvideo 3-4:1.0: Entity type for entity Camera 1 was not initialized!
[  415.919400] input: Logitech StreamCam as /devices/pci0000:00/0000:00:01.2/0000:01:00.0/0000:02:08.0/0000:04:00.3/usb3/3-4/3-4:1.0/input/input19
[  415.942811] usb 3-4: current rate 16000 is different from the runtime rate 24000
[  415.958807] usb 3-4: current rate 16000 is different from the runtime rate 32000
[  415.974807] usb 3-4: current rate 16000 is different from the runtime rate 48000
[  415.997674] hid-generic 0003:046D:0893.0006: hiddev0,hidraw0: USB HID v1.11 Device [Logitech StreamCam] on usb-0000:04:00.3-4/input5
[  416.646810] usb 3-4: current rate 16000 is different from the runtime rate 48000
[  416.678806] usb 3-4: current rate 16000 is different from the runtime rate 48000
[  416.710805] usb 3-4: current rate 16000 is different from the runtime rate 48000
Run Code Online (Sandbox Code Playgroud)

这是来自 v4l2-ctl:

ioctl: VIDIOC_ENUM_FMT
    Type: Video Capture

    [0]: 'YUYV' (YUYV 4:2:2)
        Size: Discrete 640x480
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.042s (24.000 fps)
            Interval: Discrete 0.050s (20.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
            Interval: Discrete 0.100s (10.000 fps)
            Interval: Discrete 0.133s (7.500 fps)
            Interval: Discrete 0.200s (5.000 fps)
        Size: Discrete 176x144
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.042s (24.000 fps)
            Interval: Discrete 0.050s (20.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
            Interval: Discrete 0.100s (10.000 fps)
            Interval: Discrete 0.133s (7.500 fps)
            Interval: Discrete 0.200s (5.000 fps)
        Size: Discrete 320x240
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.042s (24.000 fps)
            Interval: Discrete 0.050s (20.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
            Interval: Discrete 0.100s (10.000 fps)
            Interval: Discrete 0.133s (7.500 fps)
            Interval: Discrete 0.200s (5.000 fps)
        Size: Discrete 424x240
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.042s (24.000 fps)
            Interval: Discrete 0.050s (20.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
            Interval: Discrete 0.100s (10.000 fps)
            Interval: Discrete 0.133s (7.500 fps)
            Interval: Discrete 0.200s (5.000 fps)
        Size: Discrete 640x360
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.042s (24.000 fps)
            Interval: Discrete 0.050s (20.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
            Interval: Discrete 0.100s (10.000 fps)
            Interval: Discrete 0.133s (7.500 fps)
            Interval: Discrete 0.200s (5.000 fps)
        Size: Discrete 848x480
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.042s (24.000 fps)
            Interval: Discrete 0.050s (20.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
            Interval: Discrete 0.100s (10.000 fps)
            Interval: Discrete 0.133s (7.500 fps)
            Interval: Discrete 0.200s (5.000 fps)
        Size: Discrete 960x540
            Interval: Discrete 0.067s (15.000 fps)
            Interval: Discrete 0.100s (10.000 fps)
            Interval: Discrete 0.133s (7.500 fps)
            Interval: Discrete 0.200s (5.000 fps)
        Size: Discrete 1280x720
            Interval: Discrete 0.100s (10.000 fps)
            Interval: Discrete 0.133s (7.500 fps)
            Interval: Discrete 0.200s (5.000 fps)
        Size: Discrete 1600x896
            Interval: Discrete 0.133s (7.500 fps)
            Interval: Discrete 0.200s (5.000 fps)
        Size: Discrete 1920x1080
            Interval: Discrete 0.200s (5.000 fps)
    [1]: 'MJPG' (Motion-JPEG, compressed)
        Size: Discrete 640x480
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.042s (24.000 fps)
            Interval: Discrete 0.050s (20.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
            Interval: Discrete 0.100s (10.000 fps)
            Interval: Discrete 0.133s (7.500 fps)
            Interval: Discrete 0.200s (5.000 fps)
        Size: Discrete 176x144
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.042s (24.000 fps)
            Interval: Discrete 0.050s (20.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
            Interval: Discrete 0.100s (10.000 fps)
            Interval: Discrete 0.133s (7.500 fps)
            Interval: Discrete 0.200s (5.000 fps)
        Size: Discrete 320x240
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.042s (24.000 fps)
            Interval: Discrete 0.050s (20.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
            Interval: Discrete 0.100s (10.000 fps)
            Interval: Discrete 0.133s (7.500 fps)
            Interval: Discrete 0.200s (5.000 fps)
        Size: Discrete 424x240
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.042s (24.000 fps)
            Interval: Discrete 0.050s (20.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
            Interval: Discrete 0.100s (10.000 fps)
            Interval: Discrete 0.133s (7.500 fps)
            Interval: Discrete 0.200s (5.000 fps)
        Size: Discrete 640x360
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.042s (24.000 fps)
            Interval: Discrete 0.050s (20.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
            Interval: Discrete 0.100s (10.000 fps)
            Interval: Discrete 0.133s (7.500 fps)
            Interval: Discrete 0.200s (5.000 fps)
        Size: Discrete 848x480
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.042s (24.000 fps)
            Interval: Discrete 0.050s (20.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
            Interval: Discrete 0.100s (10.000 fps)
            Interval: Discrete 0.133s (7.500 fps)
            Interval: Discrete 0.200s (5.000 fps)
        Size: Discrete 960x540
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.042s (24.000 fps)
            Interval: Discrete 0.050s (20.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
            Interval: Discrete 0.100s (10.000 fps)
            Interval: Discrete 0.133s (7.500 fps)
            Interval: Discrete 0.200s (5.000 fps)
        Size: Discrete 1280x720
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.042s (24.000 fps)
            Interval: Discrete 0.050s (20.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
            Interval: Discrete 0.100s (10.000 fps)
            Interval: Discrete 0.133s (7.500 fps)
            Interval: Discrete 0.200s (5.000 fps)
        Size: Discrete 1600x896
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.042s (24.000 fps)
            Interval: Discrete 0.050s (20.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
            Interval: Discrete 0.100s (10.000 fps)
            Interval: Discrete 0.133s (7.500 fps)
            Interval: Discrete 0.200s (5.000 fps)
        Size: Discrete 1920x1080
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.042s (24.000 fps)
            Interval: Discrete 0.050s (20.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
            Interval: Discrete 0.100s (10.000 fps)
            Interval: Discrete 0.133s (7.500 fps)
            Interval: Discrete 0.200s (5.000 fps)
Run Code Online (Sandbox Code Playgroud)

最后,我在插入相机后同时拥有/dev/video0/dev/video1,但只能video0工作。

我不认为这是因为它没有被识别为 USB3,因此没有足够的带宽用于未压缩的 1080p60,因为检查它lsusb -vvv我得到了这个:

Bus 004 Device 003: ID 046d:0893 Logitech, Inc. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               3.20
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0         9
  idVendor           0x046d Logitech, Inc.
  idProduct          0x0893 
  bcdDevice            3.17
  iManufacturer           0 
  iProduct                2 Logitech StreamCam
[...]
  SuperSpeed USB Device Capability:
    bLength                10
    bDescriptorType        16
    bDevCapabilityType      3
    bmAttributes         0x00
    wSpeedsSupported   0x000e
      Device can operate at Full Speed (12Mbps)
      Device can operate at High Speed (480Mbps)
      Device can operate at SuperSpeed (5Gbps)
Run Code Online (Sandbox Code Playgroud)

最后,我使用的是最近的 5.6 内核:

$ uname -r
5.6.3-2-MANJARO
Run Code Online (Sandbox Code Playgroud)

ph0*_*nix 5

我想我的旧答案是错误的。我最近自己购买了 Logitech StreamCam,它在我的基于 Intel 的笔记本电脑上运行于 Ubuntu 20.04(内核 5.4.0)下。我得到了与 @Anpan 在 OP 中发布的相同的内核消息(另请参阅我在 AskUbuntu 上对 @adam-przedniczek\'s 问题的回答。使用guvcview我设法以 1920\xc3\x971080@60fps 录制视频(注意,Cheese不以 60fps 录制,但这可能是因为我无法在其设置中的任何位置设置该选项)。

\n

guvcview但是,当我尝试在配备 AMD B450 芯片组和 Ryzen 的台式电脑上以 1920\xc3\x971080(任何帧速率)运行 StreamCam 时,出现不稳定的行为(内核错误、StreamCam 从 USB 总线中消失、挂起) 5个3600CPU。

\n

因此,您的问题可能与您使用的 USB 控制器有关。您有 Intel CPU 还是 AMD CPU?StreamCam 连接的 USB 控制器是什么?在我的基于英特尔的笔记本电脑上,它是:

\n
$ sudo lspci -v -s 00:14.0|less\n00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21) (prog-if 30 [XHCI])\n        Subsystem: Lenovo Sunrise Point-LP USB 3.0 xHCI Controller\n        Flags: bus master, medium devsel, latency 0, IRQ 125\n        Memory at 2fe1010000 (64-bit, non-prefetchable) [size=64K]\n        Capabilities: [70] Power Management version 2\n        Capabilities: [80] MSI: Enable+ Count=1/8 Maskable- 64bit+\n        Kernel driver in use: xhci_hcd\n
Run Code Online (Sandbox Code Playgroud)\n

旧答案

\n

我认为这可能与Linux中缺乏对UVC(USB Video Class)v1.5的完全支持有关。UVC 的维基百科页面对 Linux 支持做了以下说明:

\n
\n

Linux 内核版本\n4.5 中引入了对 UVC 1.5 设备的检测,但驱动程序中未添加对 UVC 1.5 特定功能或特定 UVC 1.5 设备的支持,并且不支持 MPEG-2 TS、H.264 和 VP8\n有效负载然而。结果是一些也支持 UVC 1.1 的 UVC 1.5\n设备可以正常工作。

\n
\n

您的日志信息显示相机被检测为 UVC v1.00。我猜想 60fps 需要 MPEG-2 TS 支持。

\n