0

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
0

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.

0

Try this link, it may solve your issue. It appears to be an identical situation.

VLC Forum post

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.