我尝试运行以下命令:
$ vlc -I dummy v4l2:///dev/video0 --video-filter scene --no-audio --scene-path webcam.png --scene-prefix image_prefix --scene-format png vlc://quit --run-time=1
VLC media player 2.0.7 Twoflower (revision 2.0.6-54-g7dd7e4d)
[0x1f4a1c8] dummy interface: using the dummy interface module...
[0x7fc19c001238] 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
[0x7fc19c007f18] v4l2 access error: cannot set input 0: Device or resource busy
[0x7fc19c007f18] v4l2 access error: cannot set input 0: Device or resource busy
[0x7fc1a4000b28] main input error: open of `v4l2:///dev/video0' failed
[0x7fc1a4000b28] main input error: Your input can't be opened
[0x7fc1a4000b28] main input error: VLC is unable to open the MRL 'v4l2:///dev/video0'. Check the log for details.
[0x7fc19c007cc8] idummy demux: command `quit'
因此,我假设当前有一个程序正在访问我的网络摄像头,这很麻烦,因为它的灯熄灭并且lsof | grep /dev/video
什么也不返回。还有另一种正确的方法来检查当前正在使用我的网络摄像头的进程吗?还是性质完全不同的问题?
是同一USB控制器上的第二个网络摄像头吗?
—
Dee 2014年
如果您描述了您的相机类型,Linux发行版等,那么可能会有所帮助。也许debianic
—
Dee
dmesg | grep -i 'warn|fail|error|usb|video'
可以给您一些帮助
就其
—
炫龙
lsusb
而言,它是使用usb视频模块的BisonCam 。我正在运行Gentoo。下次发生错误时,我会发布更多信息,但实际上我只是对如何找出正在使用cam的进程感兴趣。