Logitech Streamcam 未在 Manjaro 上提供所有模式

Logitech Streamcam 未在 Manjaro 上提供所有模式

我买了一个 Logitech Streamcam 来获取 1080p60 网络摄像头输入,我习惯于在 Linux 中使用网络摄像头。它确实可以工作,但对于未压缩的视频,我可以设置的最佳模式是 1080p,全部 5 fps。我无法使用此相机支持的 ​​1080p60 模式(镜头上方甚至都这么说)。即使是压缩的 MJPEG 在 1920x1080 上也只能达到 30fps。v4l2-ctl 完全拒绝尝试设置更高的 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

这是来自 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)

最后,我拥有了两者/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)

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

$ uname -r
5.6.3-2-MANJARO

答案1

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

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

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

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

旧答案

我认为这可能与 Linux 缺乏对 UVC(USB 视频类)v1.5 的全面支持有关。UVC 的维基百科页面关于 Linux 支持,有以下说明:

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

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

答案2

我的 StreamCam 也遇到了类似的问题。我运行的是 Arch Linux,对我来说,使用 usb-c 转 usb-a 适配器插入后问题就解决了。

相关内容