为什么 VLC 无法打开我的 USB 摄像头但 zoom 可以?(在 Windows 10 中)

为什么 VLC 无法打开我的 USB 摄像头但 zoom 可以?(在 Windows 10 中)

当我尝试使用 VLC 打开我的 USB 摄像头时,我得到了

Capture failed:
The device you selected cannot be used, because its type is not supported.
Capture failed:
VLC cannot open ANY capture device. Check the error log for details.
Capture failed:
The device you selected cannot be used, because its type is not supported.
Capture failed:
VLC cannot open ANY capture device. Check the error log for details.

但奇怪的是,zoom 可以毫无问题地打开它。

我正在运行最新的 vlc 版本 3.0.12

默认情况下,日志记录显然是禁用的,我通过以下方式启用了它:

Tools -> Preferences -> Select "ALL" -> Advanced -> Logging

检查日志没有发现任何有用的信息,只是“directshow”无法打开此相机

dshow error: can't use device: USB CAMERA, unsupported device type

我增加了日志级别以进行调试,但这并没有揭示更多信息

dshow debug:dshow-vdev:USB 摄像头 dshow debug:找到设备:USB 摄像头

我尝试查找 USB ID,但不确定是否正确,但可能

USB\VID_0AC8&PID_3420\5&22ac01e1&0&3

相机的外观如下

这是一款带有 C 型接口的 USB 或 HDMI 输出摄像头,它用作显微镜摄像头,但我将它用作具有可更换镜头的普通网络摄像头。

谢谢 !

答案1

这几乎肯定是因为分辨率太高、错误或者 USB 总线不支持吞吐量(特别是当您使用 USB 2 集线器时)。

您需要运行v4l2-ctl --all这个程序,它会显示现在在 vlc 中工作的所有设备,然后运行这个程序v4l2-ctl --list-devices,它会显示一个类似这样的设备列表,

Integrated Camera: Integrated C (usbid):
    /dev/video2
    /dev/video3
    /dev/video4
    /dev/video5
    /dev/media0
    /dev/media1

UC70: UC70 (usbid):
    /dev/video6
    /dev/video7
    /dev/media2

找到所需的视频*设备。在本例中,UC70 是我的网络摄像头,它公开两个设备 /dev/video6 和 /dev/video7。

然后找到它们支持的格式,像这样

v4l2-ctl -d /dev/video6 --list-formats-ext
v4l2-ctl -d /dev/video7 --list-formats-ext

对我来说,只有video6任何支持的格式,它才会返回这个(注意你想要的是视频流而不是 MJPG),

    [1]: 'YUYV' (YUYV 4:2:2)
        Size: Discrete 1920x1080
            Interval: Discrete 0.500s (2.000 fps)
        Size: Discrete 3840x2160
            Interval: Discrete 1.000s (1.000 fps)
        Size: Discrete 1280x720
            Interval: Discrete 0.133s (7.500 fps)
            Interval: Discrete 0.200s (5.000 fps)
            Interval: Discrete 0.500s (2.000 fps)
        Size: Discrete 2048x1536
            Interval: Discrete 0.500s (2.000 fps)
        Size: Discrete 2560x1440
            Interval: Discrete 0.500s (2.000 fps)
        Size: Discrete 640x480
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.040s (25.000 fps)
            Interval: Discrete 0.050s (20.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
            Interval: Discrete 0.133s (7.500 fps)
            Interval: Discrete 0.200s (5.000 fps)
            Interval: Discrete 0.500s (2.000 fps)
            Interval: Discrete 1.000s (1.000 fps)

现在,在执行任何操作之前,我可以通过运行来检查 vlc 的默认值vlc v4l2:///dev/video6 -vv,我看到了这一点,

[00007f1b64001170] v4l2 demux debug:  best discrete frame size: 3840x2160
[00007f1b5c000c30] lua art finder debug: skipping script (unmatched scope) /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/03_lastfm.luac
[00007f1b5c000c30] lua art finder debug: Trying Lua scripts in /usr/share/vlc/lua/meta/art
[00007f1b5c000c30] main art finder debug: no art finder modules matched
[0000563402032240] qt interface debug: IM: Setting an input
[00007f1b64001170] v4l2 demux warning: cannot reset cropping limits: Inappropriate ioctl for device
[00007f1b64001170] v4l2 demux debug: 16588800 bytes maximum for complete image
[00007f1b64001170] v4l2 demux debug: Interlacing setting: progressive
[00007f1b64001170] v4l2 demux debug: color primaries: 8
[00007f1b64001170] v4l2 demux debug: transfer function: 1
[00007f1b64001170] v4l2 demux debug: YCbCr encoding: 1
[00007f1b64001170] v4l2 demux debug: quantization: 0
[00007f1b64001170] v4l2 demux debug: added new video ES YUY2 3840x2160 (3840x2160)
[00007f1b64001170] v4l2 demux debug:  frame rate: 1/1
[00007f1b64001170] v4l2 demux debug:  aspect ratio: 1/1
[00007f1b70000c90] main input debug: selecting program id=0
libv4l2: error turning on stream: Input/output error
[00007f1b64001170] v4l2 demux error: cannot start streaming: Input/output error
[00007f1b64001170] v4l2 demux debug: opening device '/dev/video6'
[00007f1b64001170] v4l2 demux debug: device UC70: UC70 using driver uvcvideo (version 6.1.27) on usb-0000:52:00.0-2.2.2.2
[00007f1b64001170] v4l2 demux debug:  with capabilities 0x05200001 (overall 0x85A00001)
[00007f1b64001170] v4l2 demux error: not a radio tuner device

让我们尝试其他分辨率(不是 3840x2160)

vlc v4l2:///dev/video6 -vv --v4l2-width=640 --v4l2-height=470

工作正常。

tldr;VLC 打开最高分辨率流,而 Zoom 和其他客户端则不能。

相关内容