Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I first launch cheese and my webcam turns on. I then run vlc to grab the output of /dev/video0 but it fails with:

[0x7f3ea40012e8] v4l2 demux error: cannot set input 0: Device or resource busy
[0x7f3ea40012e8] v4l2 demux error: cannot set input 0: Device or resource busy
[0x7f3ea4002168] v4l2 access error: cannot set input 0: Device or resource busy
[0x7f3ea4002168] v4l2 access error: cannot set input 0: Device or resource busy
[0x7f3eb4000b78] main input error: open of `v4l2:///dev/video0' failed

Whatever pair of video programs I run (skype, cheese, vlc, etc.), the result is always the same: the second program can no longer use the webcam when the first one has already grabbed the output.

However I find it curious as video4linux states:

In general, V4L2 devices can be opened more than once. When this is supported by the driver, users can for example start a "panel" application to change controls like brightness or audio volume, while another application captures video and audio.

My webcam is seen in lspci as 058f:a014 Alcor Micro Corp. Asus Integrated Webcam, but I don’t even know what the underlying driver is, so I can’t check whether my problem is driver-related or not. Any input would be more than welcome!

share|improve this question

1 Answer 1

up vote 3 down vote accepted

This is the same on Windows and perhaps all operating systems. The webcam is not a simple input device: to read frames from it you need to actively send commands according to some protocol. This makes it stateful and as such the application managing its state must have exclusive access to it.

On windows you can use splitcam to duplicate the feed. On Linux, you can use WebcamStudio.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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