Exit codes ? #96
-
Hi, Does DVR-Scan return exit codes ? I want to use it in window batch file to delete a processed video file which does not have any motion event. Currently 0 is returned irrespective of motion found / extracted or not - which cannot be used for deciding further processing. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
DVR-Scan always returns 0 after successfully processing videos, and only returns non-zero when an error occurred. This is typically what exit codes should be used for, not to convey information like number of detected events (if any). I would suggest searching the command output for the text "No motion events detected in input." On Windows, you can do this using the If you are so inclined, you could also modify the |
Beta Was this translation helpful? Give feedback.
DVR-Scan always returns 0 after successfully processing videos, and only returns non-zero when an error occurred. This is typically what exit codes should be used for, not to convey information like number of detected events (if any). I would suggest searching the command output for the text "No motion events detected in input." On Windows, you can do this using the
findstr
command.If you are so inclined, you could also modify the
run_dvr_scan()
function in cli/controller.py for your particular use case. Hope this helps!