lightweight-motion icon indicating copy to clipboard operation
lightweight-motion copied to clipboard

No output is written to disk

Open dAnjou opened this issue 11 years ago • 5 comments

I'm using the ArchLinux based distro Manjaro.

OpenCV: https://www.archlinux.org/packages/extra/x86_64/opencv/ Python 2.7: https://www.archlinux.org/packages/extra/x86_64/python2/

Problem is that I don't see anything written to disk in /tmp.

Command and terminal output:

$ lightweight-motion -v 0 -d /tmp -w
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
INFO:root:USB camera opened at 0
INFO:root:First frame gathered successfully
DEBUG:root:Device width: 640 Device height: 480
Process Process-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/home/max/.local/lib/python2.7/site-packages/lightweight_motion-0.0dev-py2.7.egg/lightweightmotion/outputs.py", line 99, in run
    for event in self.events:
  File "/home/max/.local/lib/python2.7/site-packages/lightweight_motion-0.0dev-py2.7.egg/lightweightmotion/camera.py", line 34, in events
    before = iter(deque(before, b_frames))
TypeError: an integer is required
^CTraceback (most recent call last):
  File "/home/max/.local/bin/lightweight-motion", line 9, in <module>
    load_entry_point('lightweight-motion==0.0dev', 'console_scripts', 'lightweight-motion')()
  File "/home/max/.local/lib/python2.7/site-packages/lightweight_motion-0.0dev-py2.7.egg/lightweightmotion/command.py", line 122, in main
    command.run()
  File "/home/max/.local/lib/python2.7/site-packages/lightweight_motion-0.0dev-py2.7.egg/lightweightmotion/command.py", line 110, in run
    sleep(1)
KeyboardInterrupt
Process Process-3:
Traceback (most recent call last):
  File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/home/max/.local/lib/python2.7/site-packages/lightweight_motion-0.0dev-py2.7.egg/lightweightmotion/outputs.py", line 15, in run
    for frame in self.frames:
  File "/home/max/.local/lib/python2.7/site-packages/lightweight_motion-0.0dev-py2.7.egg/lightweightmotion/camera.py", line 48, in watch
    for frame, motion in self.detect(threshold, sensitivity):
  File "/home/max/.local/lib/python2.7/site-packages/lightweight_motion-0.0dev-py2.7.egg/lightweightmotion/camera.py", line 57, in detect
    for frame in frames:
  File "/home/max/.local/lib/python2.7/site-packages/lightweight_motion-0.0dev-py2.7.egg/lightweightmotion/camera.py", line 124, in get_frames
    _, frame = self.capture.read()
KeyboardInterrupt

dAnjou avatar Jul 10 '13 22:07 dAnjou

Please, try giving lower threshold and sensitivity values (0.05 or so) and checkout if a red dot indicating movement appears on the window.

umazalakain avatar Jul 10 '13 22:07 umazalakain

Oh, I already moved my head around and there was a red dot. No files created though.

Maybe log movement events?

dAnjou avatar Jul 10 '13 22:07 dAnjou

Yes, I should really improve logging, I'm opening a new issue with it.

umazalakain avatar Jul 10 '13 23:07 umazalakain

Output handlers logging has been improved, give it a try please!

umazalakain avatar Jul 21 '13 22:07 umazalakain

Logging is better now. I can see when motion is detected but there is still no output on disk (same command as above). I "stop" the program with CTRL+c, is that alright?

dAnjou avatar Jul 21 '13 22:07 dAnjou