[Config Support]: motion mask seems to be ignored #10218
-
Describe the problem you are havingMy camera see part of a public road. Can you help me solve this problem? Version0.13.2-6476F8A Frigate config filemqtt:
enabled: true
host: 192.168.20.240
topic_prefix: frigate
client_id: frigate
stats_interval: 60
ffmpeg:
hwaccel_args: preset-nvidia-h264
detectors:
tensorrt:
type: tensorrt
device: 0 #This is the default, select the first GPU
model:
path: /config/model_cache/tensorrt/yolov7-320.trt
input_tensor: nchw
input_pixel_format: rgb
width: 320
height: 320
#Global Object Settings
objects:
track:
- person
cameras:
portoncino: # <--- this will be changed to your actual camera later
enabled: true
ffmpeg:
inputs:
- path: rtsp://admin:[email protected]:554/Streaming/Channels/102
roles:
- detect
motion:
mask:
- 0,720,212,720,656,462,661,263,29,74,0,90
- 963,311,985,180,636,259,606,330
objects:
track:
- person
snapshots:
enabled: true
record:
enabled: true
retain:
days: 5
events:
retain:
default: 10
carrabile: # <--- this will be changed to your actual camera later
enabled: true
ffmpeg:
inputs:
- path: rtsp://admin:[email protected]:554/Streaming/Channels/102
roles:
- detect
motion:
mask:
- 0,74,814,238,816,403,699,408,488,571,291,533,0,622
- 1108,0,1087,49,650,56,646,0
objects:
track:
- person
snapshots:
enabled: true
record:
enabled: true
retain:
days: 5
events:
retain:
default: 10
ingresso:
enabled: true
ffmpeg:
inputs:
- path: rtsp://admin:[email protected]:554/Streaming/Channels/102
roles:
- detect
motion:
mask:
- 317,0,305,85,361,87,421,93,479,99,564,109,639,125,719,143,811,190,1010,308,1079,89,1280,110,1280,0
objects:
track:
- person
snapshots:
enabled: true
record:
enabled: true
retain:
days: 5
events:
retain:
default: 10
piscina:
enabled: true
ffmpeg:
inputs:
- path: rtsp://admin:[email protected]:554/Streaming/Channels/102
roles:
- detect
motion:
mask:
- 910,0,1280,0,1280,54,1280,186
- 263,85,159,133,139,180,209,207,326,205,367,194,467,170,520,119,497,86,383,60
objects:
track:
- person
snapshots:
enabled: true
record:
enabled: true
retain:
days: 5
events:
retain:
default: 10
piazzale:
enabled: true
ffmpeg:
inputs:
- path: rtsp://admin:[email protected]:554/Streaming/Channels/102
roles:
- detect
motion:
mask:
- 475,0,509,116,714,82,732,144,909,107,881,0
- 0,0,0,468,232,368,385,311,480,290,457,154,508,112,492,0
objects:
track:
- person
snapshots:
enabled: true
record:
enabled: true
retain:
days: 5
events:
retain:
default: 10
nord:
enabled: true
ffmpeg:
inputs:
- path: rtsp://admin:[email protected]:554/Streaming/Channels/103
roles:
- detect
motion:
mask:
- 539,112,375,120,369,52,213,75,0,118,0,0,1280,0,1280,390,1129,310,980,247
objects:
track:
- person
snapshots:
enabled: true
record:
enabled: true
retain:
days: 5
events:
retain:
default: 10 Relevant log outputna Frigate stats{"cameras":{"carrabile":{"audio_dBFS":0.0,"audio_rms":0.0,"camera_fps":5.0,"capture_pid":992,"detection_enabled":1,"detection_fps":0.0,"ffmpeg_pid":999,"pid":962,"process_fps":5.0,"skipped_fps":0.0},"ingresso":{"audio_dBFS":0.0,"audio_rms":0.0,"camera_fps":5.1,"capture_pid":996,"detection_enabled":1,"detection_fps":0.0,"ffmpeg_pid":1003,"pid":964,"process_fps":5.1,"skipped_fps":0.0},"nord":{"audio_dBFS":0.0,"audio_rms":0.0,"camera_fps":5.1,"capture_pid":1009,"detection_enabled":1,"detection_fps":0.0,"ffmpeg_pid":1018,"pid":970,"process_fps":5.1,"skipped_fps":0.0},"piazzale":{"audio_dBFS":0.0,"audio_rms":0.0,"camera_fps":5.0,"capture_pid":1006,"detection_enabled":1,"detection_fps":0.0,"ffmpeg_pid":1015,"pid":968,"process_fps":5.0,"skipped_fps":0.0},"piscina":{"audio_dBFS":0.0,"audio_rms":0.0,"camera_fps":5.0,"capture_pid":1001,"detection_enabled":1,"detection_fps":0.5,"ffmpeg_pid":1008,"pid":966,"process_fps":5.0,"skipped_fps":0.0},"portoncino":{"audio_dBFS":0.0,"audio_rms":0.0,"camera_fps":5.1,"capture_pid":983,"detection_enabled":1,"detection_fps":1.5,"ffmpeg_pid":10126,"pid":961,"process_fps":5.1,"skipped_fps":0.0}},"cpu_usages":{"1":{"cmdline":"/package/admin/s6/command/s6-svscan -d4 -- /run/service","cpu":"0.0","cpu_average":"0","mem":"0.0"},"15":{"cmdline":"s6-supervise s6-linux-init-shutdownd","cpu":"0.0","cpu_average":"0","mem":"0.0"},"16":{"cmdline":"/package/admin/s6-linux-init/command/s6-linux-init-shutdownd -c /run/s6/basedir -g 3000 -C -B","cpu":"0.0","cpu_average":"0","mem":"0.0"},"24":{"cmdline":"s6-supervise go2rtc-log","cpu":"0.0","cpu_average":"0","mem":"0.0"},"25":{"cmdline":"s6-supervise s6rc-oneshot-runner","cpu":"0.0","cpu_average":"0","mem":"0.0"},"26":{"cmdline":"s6-supervise s6rc-fdholder","cpu":"0.0","cpu_average":"0","mem":"0.0"},"27":{"cmdline":"s6-supervise go2rtc","cpu":"0.0","cpu_average":"0","mem":"0.0"},"28":{"cmdline":"s6-supervise go2rtc-healthcheck","cpu":"0.0","cpu_average":"0","mem":"0.0"},"29":{"cmdline":"s6-supervise nginx","cpu":"0.0","cpu_average":"0","mem":"0.0"},"30":{"cmdline":"s6-supervise frigate","cpu":"0.0","cpu_average":"0","mem":"0.0"},"31":{"cmdline":"s6-supervise frigate-log","cpu":"0.0","cpu_average":"0","mem":"0.0"},"32":{"cmdline":"s6-supervise nginx-log","cpu":"0.0","cpu_average":"0","mem":"0.0"},"43":{"cmdline":"/package/admin/s6-2.11.3.2/command/s6-fdholderd -1 -i data/rules","cpu":"0.0","cpu_average":"0","mem":"0.0"},"44":{"cmdline":"/package/admin/s6/command/s6-ipcserverd -1 -- /package/admin/s6/command/s6-ipcserver-access -v0 -E -l0 -i data/rules -- /package/admin/s6/command/s6-sudod -t 30000 -- /package/admin/s6-rc/command/s6-rc-oneshot-run -l ../.. --","cpu":"0.0","cpu_average":"0","mem":"0.0"},"87":{"cmdline":"s6-log -b -- T 1 n0 s10000000 T /dev/shm/logs/go2rtc","cpu":"0.0","cpu_average":"0","mem":"0.0"},"88":{"cmdline":"s6-log -b -- T 1 n0 s10000000 T /dev/shm/logs/nginx","cpu":"0.0","cpu_average":"0","mem":"0.0"},"89":{"cmdline":"s6-log -b -- T 1 n0 s10000000 T /dev/shm/logs/frigate","cpu":"0.0","cpu_average":"0","mem":"0.0"},"96":{"cmdline":"/usr/local/go2rtc/bin/go2rtc -config=/dev/shm/go2rtc.yaml","cpu":"0.0","cpu_average":"0","mem":"0.1"},"111":{"cmdline":"bash ./run.user go2rtc-healthcheck","cpu":"0.0","cpu_average":"0","mem":"0.0"},"125":{"cmdline":"python3 -u -m frigate","cpu":"2.2","cpu_average":"2","mem":"1.9"},"130":{"cmdline":"nginx: master process nginx","cpu":"0.0","cpu_average":"0","mem":"0.1"},"155":{"cmdline":"nginx: worker process","cpu":"0.0","cpu_average":"0","mem":"0.0"},"156":{"cmdline":"nginx: worker process","cpu":"0.0","cpu_average":"0","mem":"0.0"},"157":{"cmdline":"nginx: worker process","cpu":"0.0","cpu_average":"0","mem":"0.0"},"158":{"cmdline":"nginx: worker process","cpu":"0.0","cpu_average":"0","mem":"0.0"},"159":{"cmdline":"nginx: worker process","cpu":"0.0","cpu_average":"0","mem":"0.0"},"161":{"cmdline":"nginx: worker process","cpu":"0.0","cpu_average":"0","mem":"0.0"},"165":{"cmdline":"nginx: worker process","cpu":"0.0","cpu_average":"0","mem":"0.1"},"177":{"cmdline":"nginx: worker process","cpu":"0.0","cpu_average":"0","mem":"0.0"},"191":{"cmdline":"nginx: worker process","cpu":"0.0","cpu_average":"0","mem":"0.0"},"203":{"cmdline":"nginx: worker process","cpu":"0.0","cpu_average":"0","mem":"0.0"},"216":{"cmdline":"nginx: worker process","cpu":"0.0","cpu_average":"0","mem":"0.0"},"238":{"cmdline":"nginx: worker process","cpu":"0.0","cpu_average":"0","mem":"0.1"},"267":{"cmdline":"nginx: worker process","cpu":"0.0","cpu_average":"0","mem":"0.0"},"287":{"cmdline":"nginx: worker process","cpu":"0.0","cpu_average":"0","mem":"0.0"},"312":{"cmdline":"nginx: worker process","cpu":"0.0","cpu_average":"0","mem":"0.0"},"340":{"cmdline":"nginx: worker process","cpu":"0.0","cpu_average":"0","mem":"0.0"},"361":{"cmdline":"nginx: cache manager process","cpu":"0.0","cpu_average":"0","mem":"0.0"},"736":{"cmdline":"frigate.logger ","cpu":"0.0","cpu_average":"0","mem":"0.7"},"843":{"cmdline":"frigate.recording_manager","cpu":"2.3","cpu_average":"1","mem":"0.9"},"851":{"cmdline":"/usr/bin/python3 -c from multiprocessing.resource_tracker import main;main(59)","cpu":"0.5","cpu_average":"0","mem":"0.0"},"852":{"cmdline":"frigate.detector.tensorrt","cpu":"7.8","cpu_average":"14","mem":"2.1"},"854":{"cmdline":"frigate.output ","cpu":"0.8","cpu_average":"0","mem":"0.8"},"857":{"cmdline":"ffmpeg -f rawvideo -pix_fmt yuv420p -video_size 704x576 -i pipe: -f mpegts -s 880x720 -codec:v mpeg1video -q 8 -bf 0 pipe:","cpu":"0.0","cpu_average":"0","mem":"0.1"},"858":{"cmdline":"ffmpeg -f rawvideo -pix_fmt yuv420p -video_size 704x576 -i pipe: -f mpegts -s 880x720 -codec:v mpeg1video -q 8 -bf 0 pipe:","cpu":"0.0","cpu_average":"0","mem":"0.1"},"859":{"cmdline":"ffmpeg -f rawvideo -pix_fmt yuv420p -video_size 1280x720 -i pipe: -f mpegts -s 1280x720 -codec:v mpeg1video -q 8 -bf 0 pipe:","cpu":"0.0","cpu_average":"0","mem":"0.1"},"860":{"cmdline":"ffmpeg -f rawvideo -pix_fmt yuv420p -video_size 1280x720 -i pipe: -f mpegts -s 1280x720 -codec:v mpeg1video -q 8 -bf 0 pipe:","cpu":"0.0","cpu_average":"0","mem":"0.1"},"861":{"cmdline":"ffmpeg -f rawvideo -pix_fmt yuv420p -video_size 1280x720 -i pipe: -f mpegts -s 1280x720 -codec:v mpeg1video -q 8 -bf 0 pipe:","cpu":"0.0","cpu_average":"0","mem":"0.2"},"862":{"cmdline":"ffmpeg -f rawvideo -pix_fmt yuv420p -video_size 1280x720 -i pipe: -f mpegts -s 1280x720 -codec:v mpeg1video -q 8 -bf 0 pipe:","cpu":"0.0","cpu_average":"0","mem":"0.1"},"863":{"cmdline":"ffmpeg -f rawvideo -pix_fmt yuv420p -video_size 1280x720 -i pipe: -f mpegts -s 1280x720 -codec:v mpeg1video -q 8 -bf 0 pipe:","cpu":"0.0","cpu_average":"0","mem":"0.1"},"961":{"cmdline":"frigate.process:portoncino","cpu":"1.1","cpu_average":"0","mem":"0.8"},"962":{"cmdline":"frigate.process:carrabile","cpu":"0.6","cpu_average":"0","mem":"0.8"},"964":{"cmdline":"frigate.process:ingresso","cpu":"0.7","cpu_average":"0","mem":"0.8"},"966":{"cmdline":"frigate.process:piscina","cpu":"1.0","cpu_average":"2","mem":"0.8"},"968":{"cmdline":"frigate.process:piazzale","cpu":"0.7","cpu_average":"1","mem":"0.8"},"970":{"cmdline":"frigate.process:nord ","cpu":"0.7","cpu_average":"1","mem":"0.9"},"983":{"cmdline":"frigate.capture:portoncino","cpu":"0.5","cpu_average":"0","mem":"0.8"},"992":{"cmdline":"frigate.capture:carrabile","cpu":"0.5","cpu_average":"0","mem":"0.7"},"996":{"cmdline":"frigate.capture:ingresso","cpu":"0.7","cpu_average":"0","mem":"0.8"},"999":{"cmdline":"ffmpeg -hide_banner -loglevel warning -threads 2 -hwaccel cuda -hwaccel_output_format cuda -user_agent FFmpeg Frigate/0.13.2-6476f8a -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://*:*@192.168.8.201:554/Streaming/Channels/102 -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an /tmp/cache/carrabile@%Y%m%d%H%M%S%z.mp4 -r 5 -vf fps=5,scale_cuda=w=704:h=576:format=nv12,hwdownload,format=nv12,format=yuv420p -threads 2 -f rawvideo -pix_fmt yuv420p pipe:","cpu":"4.0","cpu_average":"3","mem":"0.6"},"1001":{"cmdline":"frigate.capture:piscina","cpu":"0.7","cpu_average":"0","mem":"0.8"},"1003":{"cmdline":"ffmpeg -hide_banner -loglevel warning -threads 2 -hwaccel cuda -hwaccel_output_format cuda -user_agent FFmpeg Frigate/0.13.2-6476f8a -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://*:*@192.168.8.210:554/Streaming/Channels/102 -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an /tmp/cache/ingresso@%Y%m%d%H%M%S%z.mp4 -r 5 -vf fps=5,scale_cuda=w=1280:h=720:format=nv12,hwdownload,format=nv12,format=yuv420p -threads 2 -f rawvideo -pix_fmt yuv420p pipe:","cpu":"2.9","cpu_average":"2","mem":"0.6"},"1006":{"cmdline":"frigate.capture:piazzale","cpu":"0.7","cpu_average":"0","mem":"0.8"},"1008":{"cmdline":"ffmpeg -hide_banner -loglevel warning -threads 2 -hwaccel cuda -hwaccel_output_format cuda -user_agent FFmpeg Frigate/0.13.2-6476f8a -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://*:*@192.168.8.223:554/Streaming/Channels/102 -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an /tmp/cache/piscina@%Y%m%d%H%M%S%z.mp4 -r 5 -vf fps=5,scale_cuda=w=1280:h=720:format=nv12,hwdownload,format=nv12,format=yuv420p -threads 2 -f rawvideo -pix_fmt yuv420p pipe:","cpu":"2.7","cpu_average":"2","mem":"0.6"},"1009":{"cmdline":"frigate.capture:nord ","cpu":"0.7","cpu_average":"0","mem":"0.8"},"1015":{"cmdline":"ffmpeg -hide_banner -loglevel warning -threads 2 -hwaccel cuda -hwaccel_output_format cuda -user_agent FFmpeg Frigate/0.13.2-6476f8a -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://*:*@192.168.8.206:554/Streaming/Channels/102 -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an /tmp/cache/piazzale@%Y%m%d%H%M%S%z.mp4 -r 5 -vf fps=5,scale_cuda=w=1280:h=720:format=nv12,hwdownload,format=nv12,format=yuv420p -threads 2 -f rawvideo -pix_fmt yuv420p pipe:","cpu":"2.5","cpu_average":"2","mem":"0.6"},"1018":{"cmdline":"ffmpeg -hide_banner -loglevel warning -threads 2 -hwaccel cuda -hwaccel_output_format cuda -user_agent FFmpeg Frigate/0.13.2-6476f8a -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://*:*@192.168.8.140:554/Streaming/Channels/103 -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an /tmp/cache/nord@%Y%m%d%H%M%S%z.mp4 -r 5 -vf fps=5,scale_cuda=w=1280:h=720:format=nv12,hwdownload,format=nv12,format=yuv420p -threads 2 -f rawvideo -pix_fmt yuv420p pipe:","cpu":"2.4","cpu_average":"2","mem":"0.6"},"3307":{"cmdline":"sleep 30s","cpu":"0.0","cpu_average":"0","mem":"0.0"},"10126":{"cmdline":"ffmpeg -hide_banner -loglevel warning -threads 2 -hwaccel cuda -hwaccel_output_format cuda -user_agent FFmpeg Frigate/0.13.2-6476f8a -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://*:*@192.168.8.202:554/Streaming/Channels/102 -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an /tmp/cache/portoncino@%Y%m%d%H%M%S%z.mp4 -r 5 -vf fps=5,scale_cuda=w=704:h=576:format=nv12,hwdownload,format=nv12,format=yuv420p -threads 2 -f rawvideo -pix_fmt yuv420p pipe:","cpu":"3.7","cpu_average":"3","mem":"0.6"}},"detection_fps":2.0,"detectors":{"tensorrt":{"detection_start":0.0,"inference_speed":47.28,"pid":852}},"gpu_usages":{"NVIDIA GeForce RTX 2060":{"dec":"10.0%","enc":"0.0%","gpu":"7.0%","mem":"41.54%"}},"processes":{"go2rtc":{"pid":96},"logger":{"pid":736},"recording":{"pid":843}},"service":{"last_updated":1709504692,"latest_version":"0.13.2","storage":{"/dev/shm":{"free":501.9,"mount_type":"tmpfs","total":512.0,"used":10.1},"/media/frigate/clips":{"free":34868.4,"mount_type":"9p","total":976745.0,"used":941876.6},"/media/frigate/recordings":{"free":34868.4,"mount_type":"9p","total":976745.0,"used":941876.6},"/tmp/cache":{"free":225768.7,"mount_type":"overlay","total":257006.1,"used":18114.2}},"temperatures":{},"uptime":2977,"version":"0.13.2-6476f8a"}} Operating systemWindows Install methodDocker Compose Coral versionCPU (no coral) Any other information that may be helpfulNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
motion masks will not stop objects from being detected and the way you are using motion masks is not how they should be used. you should be using required zones to restrict events to areas you care about https://docs.frigate.video/configuration/zones |
Beta Was this translation helpful? Give feedback.
-
This would be wonderful! how can i do it? |
Beta Was this translation helpful? Give feedback.
motion masks will not stop objects from being detected and the way you are using motion masks is not how they should be used.
you should be using required zones to restrict events to areas you care about https://docs.frigate.video/configuration/zones