trigger_detector: false would make Viseron always run object detection. trigger_detector: true would make Viseron only run object detection when motion is detected.
However, if motion is detected, then an object is detected, the recording will not stop until both motion or an object is no longer detected.
Am i getting you right that you would like Viseron to stop recording if either no motion or no object is detected?
Thanks for the clarification and no problem on the missed reply.
Yeah, I guess that is what I was thinking, but I think its more I should just drop the objects that will always be there from detection at all. I am just use to zoneminder where the object detection is a result of motion and is used in more of a classification way. So I can easily see 2 people are 2 cars were detected. I was thinking that trigger_detector: true was doing it in more of that way and the motion was the controlling event. Iāll try changing the detection objects and playing around with it again.
yeah i guess you could remove the car from the detections, or add trigger_recording: false to it (if you still want to get get binary sensors that a car is there), because as soon as someone gets out of the car the recording would start.
I finally have viseron working with my Reolink camera. Wonderfull development!
The object detection is working and a screenshot and video is saved when an object is detected.
The video looks fine, but the screenshot is scrambled:
today I gave this a try in order to compare the performance with my currently active ZoneMinder. When idle Viseron uses significantly less CPU (x264 stream with VA-API), which is great.
However, I still struggle to get recording working. And to compare with my object-unaware ZoneMinder, Iād like to actually just have motion detection, not object detection (which lets the CPU go up to >300% utilization, this was mentioned here before I believe). But to me it seems as if object detection always is applied as soon as motion has been detected. Did I miss the option to completely disable motion detection?
Sadly its only possible to record using object detection atm.
However it shouldnt be a problem to get motion detection to trigger the recorder, ill open a ticket on GitHub as a reminder
I have (occasionally) seen similarily scrambled images like that before in ZoneMinder. In my case the problem was, that the stream was using UDP for transport. After switching to TCP the images were fine. Not sure if that applies to your setup. But if youāre using UDP, it might be worth a try.
@roflcoopter
Hi! Could you please explain whether Viseron can display camera stream it captures from settings to Home assistant Lovelace?
In my case itās empty.
Whatās recommended stream types? H264/MJPEG?
# See the README for the full list of configuration options.
cameras:
- name: AxisPTZ
host: 192.168.0.8
port: 554
username: root
password: pass
path: /axis-media/media.amp?streamprofile=1
publish_image: true
# MQTT is optional
mqtt:
broker: 192.168.0.3
port: 1883
username: admin
password: pass
Can we track what was the reason of crashing?
Besides, is it possible to increase frame rate or scan interval so that picture would be more alive?
Thanks!
For testing purposes I would like to pull picture with higher framerate. Is it possible for testing purposes?
Looks like CPU load is quite high when motion/object is detected. I have properly installed Nvidia drivers with FFMPEG (nvidia-smi displays it working). Maybe I need to specify some parameter in config to properly utilize my GPU & codecs?
Besides, facing such errors from time to time:
[2021-03-23 20:57:04] [lib.recorder.axisptz ] [ERROR ] - Could not get duration for: /segments/AxisPTZ/20210323205631.mp4. Error: [mov,mp4,m4a,3gp,3g2,mj2 @ 0x563c50da5b00] moov atom not found
/segments/AxisPTZ/20210323205631.mp4: Invalid data found when processing input
You can adjust interval under object_detection and motion_detection to detect at a higher rate. interval is in seconds, so 0.5 means 2fps, 0.25 means 4 fps etc etc.
What container are you running? If youāre running the cuda container it should create the FFmpeg command automatically.
As to why its crashing its hard to say, i never experienced this. A start is to turn up the log_level of both Viseron and FFmpeg
Yes, Iām running CUDA container. Now it works rather stable.
I experience problems in small objects detection though (static camera, people/cars moving in the farther perspective). Could you advise how can precision of detection be increased?
PTZ camera, that zooms in objects works well, but itās impossible to point the area/zone where object detection should give alarm.
@roflcoopter
When motion/object detection process is executed, CPU load goes up to 50%.
And itās only 1 camera, while I need to utilize 7 of them.
FFMPEG is working (visible in ānvidia-smiā), I wonder why CPU load is quite high when itās CUDA-based processingā¦
Main CPU resource consumption is by āpythonā process, which is supposed to use FFMPEG (also as I see from ānvidia-smiā getting processed by GPU)
I see the Python there, and GPU is getting loaded pretty well in load meter (%), but I was expecting CPU to be unloaded more than it is in fact:
The CPU is still used to prepare frames for motion and object detection.
Whats the resolution of your camera? Large resolutions and high FPS impacts the performance a lot.
What would you recommend to configure to make smaller objects (people walking far away from camera) to be detected? Area, Threshold ?
Atm there is nothing that can be done about this. The generic detection model that is used is not trained to detected small objects properly. One solution is to crop the image and enlarge it to make the objects appear larger for the detector, but this is not in development right now and will come sometime in the future.
Is there possibility not to record MP4 at all but just to detect objects (JPG) that would be after all sent as notifications (alarm)?
Sounds like might want to use triggers_recording that is explained in the README if you follow the link