Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 4963  / 1 Year ago, mon, february 6, 2023, 7:47:00

Cannot open 2 USB cameras simultaneously on VLC player Ubuntu 12.04



How I open a Camera:
In terminal (text after the $ prompt = commands that I type):



$ 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.


Now, VLC starts playing camera output.



In another new terminal (text after the $ prompt = commands that I type):



$ 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





No video is played in this terminal's VLC window.



Primary Objective: I want to open two cameras simultaneously in opencv (c++) ... got similar errors with opencv .. so I'm using VLC Player to debug the issue.
The errors when opening two cameras simultaneously using c++ opencv ( the code is similar to 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

More From » video

 Answers
1

It's just that the bandwidth of the USB ports is not enough to stream the data from the cameras. Try enabling them at a low resolution, or connect them in different ports.


[#24003] Tuesday, February 7, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
altybol

Total Points: 364
Total Questions: 138
Total Answers: 121

Location: France
Member since Thu, May 6, 2021
3 Years ago
;