运动和fswebcam运行

问题描述 投票:3回答:3

收到电子邮件时,我正在使用fswebcam捕获和映像。我认为让Motion运行也很好。我安装了Motion,这很好用。但是,当我尝试使用fswebcam拍照时,

我收到了错误:

Error selecting input 0
VIDIOC_S_INPUT: Device or resource busy

然后我停止了Motion,再次尝试了。有效。所以,我一次只能有一个程序访问摄像机。这有什么办法吗?

input resources camera device motion
3个回答
2
投票

使用其中一个,两个应用程序无法同时读取同一个摄像机设备。

Motion能够在事件检测时运行脚本,因此如果您想在配置中查看on_area_detected或on_movie_start

然后让它调用某种附加当前照片的shell脚本并通过电子邮件发送给您。

希望你没有太多的事件,否则会有太多的电子邮件找到重要的事件。


1
投票

您可以使用基于Motion HTTP的控件。只需致电:

http://yourraspberrypi:XXXX/0/action/snapshot

使用cURL或您喜欢的任何其他方法。

yourraspberrypi应该是你的Pi的IP,而XXXX应该是在'control_port'下定义的端口,在/etc/motion/motion.conf中

Note: A symbolic link called lastsnap.jpg created in the target_dir will always point to the latest snapshot, unless snapshot_filename is exactly 'lastsnap'

例如,您还可以使用基于HTTP的控制来停止/开始运动检测

更多信息:http://www.lavrsen.dk/foswiki/bin/view/Motion/MotionHttpAPI


0
投票

卸载动作后,它对我有用。为此,请从终端运行以下命令:

sudo apt-get remove motion
© www.soinside.com 2019 - 2024. All rights reserved.