Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration question/issues #927

Open
stonehencs opened this issue Mar 14, 2025 · 4 comments
Open

Configuration question/issues #927

stonehencs opened this issue Mar 14, 2025 · 4 comments

Comments

@stonehencs
Copy link

Hello!

I would like to ask if it is possible to do a separate motion detection and if motion is detected then run the object detector if it finds an object on it then save the recording?

But I would like it so that if it finds any object, I don't necessarily want to specify all acceptable objects, because anything can happen.

And could you please help me with this that I turned on "draw_motion" but it doesn't do anything. I set it as in the example config.

Thanks in advance!

My config:

 
ffmpeg:
  camera:
    camera_1:
      name: vigi_kamera_1
      host: !secret camera1_ip
      port: 554
      path: !secret camera1_path1
      username: !secret camera1_user
      password: !secret camera1_pswd
      fps: 25
      width: 2304
      height: 1296
      stream_format: rtsp
      mjpeg_streams:
        my_stream:
          width: 704
          height: 576
          draw_objects: true
        objects:
          draw_objects: true
          draw_zones: true
          draw_motion: true
          draw_motion_mask: true
          draw_object_mask: true
      substream:
        path: !secret camera1_path2
        port: 554
        stream_format: rtsp
        fps: 15
        width: 704
        height: 576
      recorder:
        lookback: 15 #esemény elött
        idle_timeout: 15 #esemény utan
        retain: 30  #meddig tarol nap


mog2:
  motion_detector:
    cameras:
      camera_1:
        recorder_keepalive: true
        #threshold: 8
        fps: 10
        #area: 0.009
        #history: 200
        #detect_shadows: true
        trigger_recorder: true
        width: 704
        height: 576

nvr:
  camera_1:
@roflcoopter
Copy link
Owner

The default behaviour if you configure both motion and object detection is that object detection only runs while there is active motion. It is controlled by the scan_on_motion_only config option.

Currently you cant search for all labels, you need to specify the ones of interest. Will add that to the to-do list!

Motion not being drawn could be a bug, looking into it

@stonehencs
Copy link
Author

Thanks! I'll try it and if it doesn't work I'll get back to you.
Can I at least list it in the label? e.g.: label: cat, dog, person ....?

@roflcoopter
Copy link
Owner

Just did some testing with draw_motion and it works fine on my cameras.
Could you tell me a bit more what it is you are trying?

Can I at least list it in the label? e.g.: label: cat, dog, person ....?

Sadly no, you need separate entries for each label:

         labels:
           - label: person
             confidence: 0.7
             trigger_event_recording: true
           - label: car
             confidence: 0.6
             trigger_event_recording: true
           - label: vehicle
             confidence: 0.6
             trigger_event_recording: true

@stonehencs
Copy link
Author

stonehencs commented Mar 17, 2025

Thank you very much!

I tried what I saw on the page: (the code block after the text). And neither in the live view or in the saved recordings anything is visible.
By the way, should the viseron save the things it draws?
What should I see anyway? Some red rectangle around the movement?

mjpeg_streams:
        my_stream:
          width: 704
          height: 576
          draw_objects: true
        objects:
          draw_objects: true
          draw_zones: true
          draw_motion: true
          draw_motion_mask: true
          draw_object_mask: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants