修改配置用于循环播放的视频检测

This commit is contained in:
haotian 2026-03-01 14:01:40 +08:00
parent 88b439558a
commit db2e393e86
2 changed files with 9 additions and 7 deletions

View File

@ -146,19 +146,19 @@
"type": "alarm",
"role": "sink",
"enable": true,
"eval_fps": 0,
"eval_fps": 10,
"labels": ["helmet", "gloves", "vest", "boots", "goggles", "none", "Person", "no_helmet", "no_goggle", "no_gloves", "no_boots", "violation"],
"rules": [
{
"name": "non_compliant_boots",
"class_ids": [10],
"roi": {"x": 0.0, "y": 0.0, "w": 1.0, "h": 1.0},
"min_score": 0.1,
"min_box_area_ratio": 0.005,
"require_track_id": false,
"min_duration_ms": 500,
"min_hits": 1,
"hit_window_ms": 500,
"min_score": 0.3,
"min_box_area_ratio": 0.01,
"require_track_id": true,
"min_duration_ms": 800,
"min_hits": 2,
"hit_window_ms": 1000,
"cooldown_ms": 5000,
"per_track_cooldown_ms": 5000
}

View File

@ -17,6 +17,8 @@ mediamtx.exe
- 推流到RTSP服务器设置摄像头的分辨率为720P
ffmpeg -f dshow -rtbufsize 100M -video_size 1280x720 -framerate 30 -vcodec mjpeg -i video="4K AutoFocus Webcam" -c:v libx264 -preset ultrafast -pix_fmt yuv420p -f rtsp rtsp://localhost:8554/cam
ffmpeg -stream_loop -1 -re -i "boots.mp4" -c:v libx264 -preset fast -tune zerolatency -r 30 -f rtsp -rtsp_transport tcp rtsp://localhost:8554/cam
- 本地验证RTSP拉流正确
ffplay rtsp://localhost:8554/cam