[Solved] Multiple webcams and VLC

*nix specific usage questions
xj25vm
Blank Cone
Blank Cone
Posts: 15
Joined: 19 Aug 2010 22:01

[Solved] Multiple webcams and VLC

Postby xj25vm » 19 Aug 2010 23:12

I'm having some trouble getting several webcams (at least two) and VLC working together - either streaming, or saving a file, or just displaying on the monitor.

I know there are issues with available bandwidth on a single USB root hub - but I've worked out so far that if the driver requests that the stream is sent compressed in mjpeg directly from the camera, there is enough bandwidth on the usb. I have managed this way to get working simultaneously 4 usb webcams on this computer (without additional USB pci cards) at 640x480, 10fps using ffmpeg.

The problem is that I can't manage to do the same with VLC. I am using the following command:

Code: Select all

vlc --no-audio v4l2:///dev/video0:width=640:height=480:fps=5:chroma=mjpeg
It works, but if I try to do the same thing, but with /dev/video1 at the same time, I get "Device or resource is busy" - which suggests not enough USB bandwidth. I have also tried v4l2c, but with same results.

Does anybody know a bit more about this? Is VLC really forcing the camera to send the stream in mjpeg, instead of raw? And if yes, why is there still a problem? By the way, if I try to save the with "access=file" in an avi, with no other options, it does save with mjpeg encoding - so it would appear that it is obeying the directive after all.

Could someone who has managed to get more than one webcam going please help out with some tips.

Thanks.
Last edited by xj25vm on 20 Aug 2010 14:12, edited 1 time in total.

xj25vm
Blank Cone
Blank Cone
Posts: 15
Joined: 19 Aug 2010 22:01

Re: Multiple webcams and VLC

Postby xj25vm » 20 Aug 2010 14:12

Answering my own question. It turns out that it is an issue with the Microsoft Lifecam Cinema. It is requesting the highest bandwidth regardless of resolution, frame rate or if using mjpeg or not. I've posted on the uvc driver developers list to see if anybody has come up with a workaround/patch - or if there is any hope of one ever being developed.

I've managed to get 3 cameras working simultaneously with the following command (two MS Lifecam VX-5000 and one Logitech QuickCam Pro 9000):

Code: Select all

vlc --no-audio v4l2c:///dev/video0:width=640:height=480
Repeat the above command for each camera.

The following also seems to work ok - so I assume it is equivalent - although the documentation doesn't exactly make it clear:

Code: Select all

vlc --no-audio v4l2:///dev/video0:width=640:height=480:chroma=mjpg


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 26 guests