How to prevent the "Unable to open video device" generated image files?
Question
3.2.11 has a feature where the production of periodic snapshot images continues even after the camera is disconnected. These images show the text "Unable to open video device since..." followed by a time stamp.
(How) can motion be configured so as not to produce these files?
Alternatively, is there a reliable way to detect, by examining an image file, that it is one of these auto-generated images?
What might be the most expedient way of modifying the source code, if it comes to that, so as to suppress the production of these images?
In case it helps, my version of motion is shown as 3.2.11-2, a Debian package.
Paste in your error messages, config settings, terminal window output etc in this text field.
Environment
Motion version: |
3.2.11 |
ffmpeg version: |
|
Libraries: |
|
Server OS: |
|
--
NickWillson - 03 Feb 2010
Follow Up
Hi Nick,
Interesting , nevermind that it could be a "bug" , i think motion should not save snapshots or at least give you the chance to disable it.
It's not hard to avoid save snapshot when connection to video device is lost but probably you can upgrade to motion trunk where is defined
a motion trigger for camera lost :
on_camera_lost
using this trigger you can run a http query to change
snapshot_interval to 0.
i.ex :
on_camera_lost /home/motion/scripts/disable_snapshots.sh
#!/bin/bash
wget "http://127.0.0.1:8080/1/config/set?snapshot_interval=0" -O /tmp/last-query.log
You can take a look to new option names in trunk :
http://www.lavrsen.dk/foswiki/bin/view/Motion/IntuitiveOptionNamesDiscussion
--
AngelCarpintero - 24 Mar 2010
Answer