Why can’t two programs access my webcam simultaneously?

Posted by qdii on Super User See other posts from Super User or by qdii
Published on 2012-07-15T18:16:00Z Indexed on 2012/09/02 9:41 UTC
Read the original article Hit count: 660

Filed under:
|
|
|
|

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!

© Super User or respective owner

Related posts about linux

Related posts about video