无法在 VLC 播放器 Ubuntu 12.04 上同时打开 2 个 USB 摄像头

无法在 VLC 播放器 Ubuntu 12.04 上同时打开 2 个 USB 摄像头

无法在 VLC 播放器 Ubuntu 12.04 上同时打开 2 个 USB 摄像头

如何打开相机:在终端中($ 提示符后的文本 = 我输入的命令):

$ ls /dev/video*
/dev/video0  /dev/video1
$ vlc v4l2:///dev/video0
VLC media player 2.0.8 Twoflower (revision 2.0.8a-0-g68cf50b)
[0x9f2d908] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.

现在,VLC 开始播放摄像机输出。

在另一个新终端中($ 提示符后的文本 = 我输入的命令):

$ vlc v4l2:///dev/video1
VLC media player 2.0.8 Twoflower (revision 2.0.8a-0-g68cf50b)
[0x9b24908] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[0xb0500960] v4l2 demux error: VIDIOC_STREAMON failed
libv4l2: error setting pixformat: Device or resource busy
libv4l2: error setting pixformat: Device or resource busy
libv4l2: error setting pixformat: Device or resource busy
libv4l2: error setting pixformat: Device or resource busy
libv4l2: error setting pixformat: Device or resource busy
libv4l2: error setting pixformat: Device or resource busy
libv4l2: error setting pixformat: Device or resource busy
libv4l2: error setting pixformat: Device or resource busy
libv4l2: error setting pixformat: Device or resource busy
libv4l2: error setting pixformat: Device or resource busy
[0xb0501188] v4l2 access error: cannot set input 0: Device or resource busy
[0xb0501188] v4l2 access error: cannot set input 0: Device or resource busy
[0xb5300618] main input error: open of `v4l2:///dev/video1' failed

该终端的 VLC 窗口中未播放任何视频。

主要目标:我想在 opencv (c++) 中同时打开两个摄像头... 使用 opencv 时出现类似错误。所以我使用 VLC Player 来调试该问题。使用 c++ opencv 同时打开两个摄像头时的错误(代码类似于https://code.ros.org/trac/opencv/browser/trunk/opencv/samples/cpp/starter_video.cpp?rev=4705

e557822@e557822-T740:~/Desktop/Camera/starter_video2$ ls /dev/video*
/dev/video0  /dev/video1  /dev/video2
e557822@e557822-T740:~/Desktop/Camera/starter_video2$ ./starter_video2 0 1
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
press space to save a picture. q or esc to quit
init done 
opengl support available 
libv4l2: error turning on stream: No space left on device
VIDIOC_STREAMON: No space left on device

答案1

只是 USB 端口的带宽不足以传输来自摄像头的数据。请尝试以低分辨率启用它们,或将它们连接到不同的端口。

答案2

尝试此链接,它可能会解决您的问题。它似乎是相同的情况。

VLC 论坛帖子

相关内容