diff --git a/configs/sample_ai_pipeline.json b/configs/sample_ai_pipeline.json deleted file mode 100644 index 2fba4a9..0000000 --- a/configs/sample_ai_pipeline.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "queue": { "size": 8, "strategy": "drop_oldest" }, - "graphs": [ - { - "name": "cam1_ai_pipeline", - "nodes": [ - { - "id": "in_cam1", - "type": "input_rtsp", - "role": "source", - "enable": true, - "url": "rtsp://10.0.0.9:8554/cam", - "fps": 25, - "width": 1920, - "height": 1080, - "use_mpp": false, - "use_ffmpeg": true, - "force_tcp": true - }, - { - "id": "pre_cam1", - "type": "preprocess", - "role": "filter", - "enable": true, - "dst_w": 640, - "dst_h": 640, - "dst_format": "rgb", - "keep_ratio": false, - "use_rga": true - }, - { - "id": "ai_cam1", - "type": "ai_yolo", - "role": "filter", - "enable": true, - "model_path": "./third_party/rknpu2/examples/rknn_yolov5_demo/model/RK3588/yolov5s-640-640.rknn", - "model_version": "v5", - "num_classes": 80, - "conf": 0.25, - "nms": 0.45, - "class_filter": [] - }, - { - "id": "osd_cam1", - "type": "osd", - "role": "filter", - "enable": true, - "draw_bbox": true, - "draw_text": true, - "line_width": 2, - "font_scale": 1, - "labels": [] - }, - { - "id": "post_cam1", - "type": "preprocess", - "role": "filter", - "enable": true, - "dst_w": 640, - "dst_h": 640, - "dst_format": "nv12", - "keep_ratio": false, - "use_rga": true - }, - { - "id": "pub_cam1", - "type": "publish", - "role": "sink", - "enable": true, - "codec": "h264", - "fps": 25, - "gop": 50, - "bitrate_kbps": 2000, - "use_mpp": true, - "use_ffmpeg_mux": true, - "outputs": [ - { "proto": "rtsp_server", "port": 8554, "path": "/live/cam1" }, - { "proto": "hls", "port": 8080, "path": "/hls/cam1", "segment_sec": 2 } - ] - } - ], - "edges": [ - ["in_cam1", "pre_cam1"], - ["pre_cam1", "ai_cam1"], - ["ai_cam1", "osd_cam1"], - ["osd_cam1", "post_cam1"], - ["post_cam1", "pub_cam1"] - ] - } - ] -} diff --git a/configs/sample_cam1.json b/configs/sample_cam1.json deleted file mode 100644 index d53e1c4..0000000 --- a/configs/sample_cam1.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "queue": { "size": 8, "strategy": "drop_oldest" }, - "graphs": [ - { - "name": "cam1", - "nodes": [ - { - "id": "in_cam1", - "type": "input_rtsp", - "role": "source", - "enable": true, - "url": "rtsp://10.0.0.9:8554/cam", - "fps": 25, - "width": 1920, - "height": 1080, - "use_mpp": false, - "use_ffmpeg": true, - "force_tcp": true - }, - { - "id": "pub_cam1", - "type": "publish", - "role": "sink", - "enable": true, - "codec": "h264", - "fps": 25, - "gop": 50, - "bitrate_kbps": 4000, - "use_mpp": true, - "use_ffmpeg_mux": true, - "outputs": [ - { "proto": "rtsp", "host": "10.0.0.9", "port": 8554, "path": "/live/cam1" }, - { "proto": "hls", "path": "/home/orangepi/Desktop/OrangePi3588Media/hls/cam1/index.m3u8", "segment_sec": 2 } - ] - } - ], - "edges": [ - ["in_cam1", "pub_cam1"] - ] - } - ] -} diff --git a/configs/sample_cam1_rtsp_server.json b/configs/sample_cam1_rtsp_server.json deleted file mode 100644 index c16a635..0000000 --- a/configs/sample_cam1_rtsp_server.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "queue": { "size": 8, "strategy": "drop_oldest" }, - "graphs": [ - { - "name": "cam1", - "nodes": [ - { - "id": "in_cam1", - "type": "input_rtsp", - "role": "source", - "enable": true, - "url": "rtsp://10.0.0.9:8554/cam", - "fps": 25, - "width": 1920, - "height": 1080, - "use_mpp": false, - "use_ffmpeg": true, - "force_tcp": true - }, - { - "id": "pub_cam1", - "type": "publish", - "role": "sink", - "enable": true, - "codec": "h264", - "fps": 25, - "gop": 50, - "bitrate_kbps": 4000, - "use_mpp": true, - "use_ffmpeg_mux": true, - "outputs": [ - { "proto": "rtsp_server", "port": 8554, "path": "/live/cam1" }, - { "proto": "hls", "path": "/home/orangepi/Desktop/OrangePi3588Media/hls/cam1/index.m3u8", "segment_sec": 2 } - ] - } - ], - "edges": [ - ["in_cam1", "pub_cam1"] - ] - } - ] -} diff --git a/configs/sample_custom_yolov8.json b/configs/sample_custom_yolov8.json deleted file mode 100644 index c36c0db..0000000 --- a/configs/sample_custom_yolov8.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "queue": { "size": 8, "strategy": "drop_oldest" }, - "graphs": [ - { - "name": "cam1_custom_yolov8", - "nodes": [ - { - "id": "in_cam1", - "type": "input_rtsp", - "role": "source", - "enable": true, - "url": "rtsp://192.168.1.100:554/stream", - "fps": 25, - "width": 1920, - "height": 1080, - "use_mpp": false, - "use_ffmpeg": true, - "force_tcp": true - }, - { - "id": "pre_cam1", - "type": "preprocess", - "role": "filter", - "enable": true, - "dst_w": 640, - "dst_h": 640, - "dst_format": "rgb", - "keep_ratio": false, - "use_rga": true - }, - { - "id": "ai_cam1", - "type": "ai_yolo", - "role": "filter", - "enable": true, - "model_path": "/models/your_custom_yolov8.rknn", - "model_version": "v8", - "num_classes": 5, - "conf": 0.5, - "nms": 0.45, - "class_filter": [] - }, - { - "id": "osd_cam1", - "type": "osd", - "role": "filter", - "enable": true, - "draw_bbox": true, - "draw_text": true, - "line_width": 3, - "font_scale": 2, - "labels": ["cat", "dog", "bird", "car", "person"] - }, - { - "id": "pub_cam1", - "type": "publish", - "role": "sink", - "enable": true, - "codec": "h264", - "fps": 25, - "gop": 50, - "bitrate_kbps": 2000, - "use_mpp": true, - "use_ffmpeg_mux": true, - "outputs": [ - { "proto": "rtsp_server", "port": 8554, "path": "/live/cam1" } - ] - } - ], - "edges": [ - ["in_cam1", "pre_cam1"], - ["pre_cam1", "ai_cam1"], - ["ai_cam1", "osd_cam1"], - ["osd_cam1", "pub_cam1"] - ] - } - ] -} diff --git a/configs/sample_preprocess.json b/configs/sample_preprocess.json deleted file mode 100644 index db3a07d..0000000 --- a/configs/sample_preprocess.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "queue": { "size": 8, "strategy": "drop_oldest" }, - "graphs": [ - { - "name": "cam1_preprocess", - "nodes": [ - { - "id": "in_cam1", - "type": "input_rtsp", - "role": "source", - "enable": true, - "url": "rtsp://10.0.0.9:8554/cam", - "fps": 25, - "width": 1920, - "height": 1080, - "use_mpp": false, - "use_ffmpeg": true, - "force_tcp": true - }, - { - "id": "pre_cam1", - "type": "preprocess", - "role": "filter", - "enable": true, - "dst_w": 640, - "dst_h": 640, - "keep_ratio": true, - "use_rga": true - }, - { - "id": "pub_cam1", - "type": "publish", - "role": "sink", - "enable": true, - "codec": "h264", - "fps": 25, - "gop": 50, - "bitrate_kbps": 2000, - "use_mpp": true, - "use_ffmpeg_mux": true, - "outputs": [ - { "proto": "rtsp_server", "port": 8554, "path": "/live/cam1" } - ] - } - ], - "edges": [ - ["in_cam1", "pre_cam1"], - ["pre_cam1", "pub_cam1"] - ] - } - ] -} diff --git a/configs/sample_security_pipeline.json b/configs/sample_security_pipeline.json deleted file mode 100644 index 59f7c45..0000000 --- a/configs/sample_security_pipeline.json +++ /dev/null @@ -1,151 +0,0 @@ -{ - "queue": { "size": 8, "strategy": "drop_oldest" }, - "graphs": [ - { - "name": "cam1_security_pipeline", - "nodes": [ - { - "id": "in_cam1", - "type": "input_rtsp", - "role": "source", - "enable": true, - "url": "rtsp://192.168.1.100:554/stream", - "fps": 25, - "width": 1920, - "height": 1080, - "use_mpp": false, - "use_ffmpeg": true, - "force_tcp": true - }, - { - "id": "pre_cam1", - "type": "preprocess", - "role": "filter", - "enable": true, - "dst_w": 640, - "dst_h": 640, - "dst_format": "rgb", - "keep_ratio": false, - "use_rga": true - }, - { - "id": "ai_cam1", - "type": "ai_yolo", - "role": "filter", - "enable": true, - "model_path": "/models/yolov8n.rknn", - "model_version": "v8", - "num_classes": 80, - "conf": 0.5, - "nms": 0.45, - "class_filter": [] - }, - { - "id": "alarm_cam1", - "type": "alarm", - "role": "sink", - "enable": true, - "labels": [], - "rules": [ - { - "name": "object_detection", - "class_ids": [0, 1, 2], - "roi": { "x": 0.1, "y": 0.1, "w": 0.8, "h": 0.8 }, - "min_duration_ms": 500, - "cooldown_ms": 5000 - } - ], - "actions": { - "log": { "enable": true, "level": "info" }, - "http": { - "enable": false, - "url": "http://localhost:8080/api/alarm", - "timeout_ms": 3000, - "include_media_url": true - }, - "snapshot": { - "enable": true, - "format": "jpg", - "quality": 85, - "upload": { - "type": "local", - "path": "/tmp/alarms" - } - }, - "clip": { - "enable": false, - "pre_sec": 5, - "post_sec": 10, - "format": "mp4", - "fps": 25, - "upload": { - "type": "local", - "path": "/tmp/alarms" - } - } - } - }, - { - "id": "osd_cam1", - "type": "osd", - "role": "filter", - "enable": true, - "draw_bbox": true, - "draw_text": true, - "line_width": 2, - "font_scale": 1, - "labels": [] - }, - { - "id": "post_cam1", - "type": "preprocess", - "role": "filter", - "enable": true, - "dst_w": 1920, - "dst_h": 1080, - "dst_format": "nv12", - "keep_ratio": false, - "use_rga": true - }, - { - "id": "storage_cam1", - "type": "storage", - "role": "sink", - "enable": true, - "mode": "continuous", - "format": "mp4", - "codec": "h264", - "segment_sec": 300, - "path": "/rec/cam1", - "filename_pattern": "%Y%m%d/%H%M%S", - "fps": 25, - "bitrate_kbps": 2000 - }, - { - "id": "pub_cam1", - "type": "publish", - "role": "sink", - "enable": true, - "codec": "h264", - "fps": 25, - "gop": 50, - "bitrate_kbps": 2000, - "use_mpp": true, - "use_ffmpeg_mux": true, - "outputs": [ - { "proto": "rtsp_server", "port": 8554, "path": "/live/cam1" } - ] - } - ], - "edges": [ - ["in_cam1", "pre_cam1"], - ["pre_cam1", "ai_cam1"], - ["ai_cam1", "alarm_cam1"], - ["ai_cam1", "osd_cam1"], - ["osd_cam1", "post_cam1"], - ["post_cam1", "storage_cam1"], - ["post_cam1", "pub_cam1"] - ] - } - ] -} diff --git a/configs/sprint5_cam1_security_instances.json b/configs/sprint5_cam1_security_instances.json deleted file mode 100644 index a2e52fb..0000000 --- a/configs/sprint5_cam1_security_instances.json +++ /dev/null @@ -1,161 +0,0 @@ -{ - "global": { - "hot_reload": { "enable": true } - }, - "queue": { "size": 8, "strategy": "drop_oldest" }, - - "templates": { - "security_pipeline": { - "nodes": [ - { - "id": "in", - "type": "input_rtsp", - "role": "source", - "enable": true, - "url": "${url}", - "fps": 25, - "width": 1920, - "height": 1080, - "use_mpp": false, - "use_ffmpeg": true, - "force_tcp": true - }, - { - "id": "pre", - "type": "preprocess", - "role": "filter", - "enable": true, - "dst_w": 640, - "dst_h": 640, - "dst_format": "rgb", - "keep_ratio": false, - "use_rga": true - }, - { - "id": "ai", - "type": "ai_yolo", - "role": "filter", - "enable": true, - "model_path": "${model_path}", - "model_version": "v8", - "num_classes": 80, - "conf": 0.5, - "nms": 0.45, - "class_filter": [] - }, - { - "id": "alarm", - "type": "alarm", - "role": "sink", - "enable": true, - "labels": [], - "rules": [ - { - "name": "object_detection", - "class_ids": [0], - "roi": { "x": 0.1, "y": 0.1, "w": 0.8, "h": 0.8 }, - "min_duration_ms": 500, - "cooldown_ms": 5000 - } - ], - "actions": { - "log": { "enable": true, "level": "info" }, - "http": { - "enable": false, - "url": "http://127.0.0.1:8080/api/alarm", - "timeout_ms": 3000, - "include_media_url": true - }, - "snapshot": { - "enable": true, - "format": "jpg", - "quality": 85, - "upload": { "type": "local", "path": "/tmp/alarms" } - }, - "clip": { - "enable": false, - "pre_sec": 5, - "post_sec": 10, - "format": "mp4", - "fps": 25, - "upload": { "type": "local", "path": "/tmp/alarms" } - } - } - }, - { - "id": "osd", - "type": "osd", - "role": "filter", - "enable": true, - "draw_bbox": true, - "draw_text": true, - "line_width": 2, - "font_scale": 1, - "labels": [] - }, - { - "id": "post", - "type": "preprocess", - "role": "filter", - "enable": true, - "dst_w": 1920, - "dst_h": 1080, - "dst_format": "nv12", - "keep_ratio": false, - "use_rga": true - }, - { - "id": "storage", - "type": "storage", - "role": "sink", - "enable": true, - "mode": "continuous", - "format": "mp4", - "codec": "h264", - "segment_sec": 300, - "path": "${rec_path}", - "filename_pattern": "%Y%m%d/%H%M%S", - "fps": 25, - "bitrate_kbps": 2000 - }, - { - "id": "pub", - "type": "publish", - "role": "sink", - "enable": true, - "codec": "h264", - "fps": 25, - "gop": 50, - "bitrate_kbps": 2000, - "use_mpp": true, - "use_ffmpeg_mux": true, - "outputs": [ - { "proto": "rtsp_server", "port": 8554, "path": "/live/${name}" } - ] - } - ], - "edges": [ - ["in", "pre"], - ["pre", "ai"], - ["ai", "alarm"], - ["ai", "osd"], - ["osd", "post"], - ["post", "storage"], - ["post", "pub"] - ] - } - }, - - "instances": [ - { - "name": "cam1", - "template": "security_pipeline", - "params": { - "name": "cam1", - "url": "rtsp://10.0.0.9:8554/cam", - "model_path": "/models/yolov8n.rknn", - "rec_path": "/rec/cam1" - } - } - ] -} diff --git a/configs/sprint5_cam1_transcode_instances.json b/configs/sprint5_cam1_transcode_instances.json deleted file mode 100644 index e3f9607..0000000 --- a/configs/sprint5_cam1_transcode_instances.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "global": { - "hot_reload": { "enable": true } - }, - "queue": { "size": 8, "strategy": "drop_oldest" }, - - "templates": { - "transcode_gateway": { - "nodes": [ - { - "id": "in", - "type": "input_rtsp", - "role": "source", - "enable": true, - "url": "${url}", - "fps": 25, - "width": 1920, - "height": 1080, - "use_mpp": false, - "use_ffmpeg": true, - "force_tcp": true - }, - { - "id": "pub", - "type": "publish", - "role": "sink", - "enable": true, - "codec": "h264", - "fps": 25, - "gop": 50, - "bitrate_kbps": 2000, - "use_mpp": true, - "use_ffmpeg_mux": true, - "outputs": [ - { "proto": "rtsp_server", "port": 8554, "path": "/live/${name}" } - ] - } - ], - "edges": [ - ["in", "pub"] - ] - } - }, - - "instances": [ - { - "name": "cam1", - "template": "transcode_gateway", - "params": { - "name": "cam1", - "url": "rtsp://10.0.0.9:8554/cam" - } - } - ] -} diff --git a/configs/stress_cam1_strict_minio_alarm_5ch_rtsp_hls.json b/configs/stress_cam1_strict_minio_alarm_5ch_rtsp_hls.json new file mode 100644 index 0000000..6d585a3 --- /dev/null +++ b/configs/stress_cam1_strict_minio_alarm_5ch_rtsp_hls.json @@ -0,0 +1,245 @@ +{ + "global": { + "metrics_port": 9000, + "web_root": "web" + }, + "queue": { "size": 32, "strategy": "drop_oldest" }, + + "templates": { + "strict_minio_alarm_pipeline": { + "nodes": [ + { + "id": "in", + "type": "input_rtsp", + "role": "source", + "enable": true, + "url": "${url}", + "fps": "${fps}", + "width": "${src_w}", + "height": "${src_h}", + "use_mpp": true, + "use_ffmpeg": false, + "force_tcp": true, + "reconnect_sec": 5, + "reconnect_backoff_max_sec": 30 + }, + { + "id": "pre", + "type": "preprocess", + "role": "filter", + "enable": true, + "dst_w": 640, + "dst_h": 640, + "dst_format": "rgb", + "keep_ratio": false, + "use_rga": true + }, + { + "id": "ai", + "type": "ai_yolo", + "role": "filter", + "enable": true, + "model_path": "${model_path}", + "model_version": "v5", + "num_classes": 80, + "conf": 0.25, + "nms": 0.45, + "class_filter": [] + }, + { + "id": "osd", + "type": "osd", + "role": "filter", + "enable": true, + "draw_bbox": true, + "draw_text": true, + "line_width": 2, + "font_scale": 1, + "labels": [] + }, + { + "id": "post", + "type": "preprocess", + "role": "filter", + "enable": true, + "dst_w": "${src_w}", + "dst_h": "${src_h}", + "dst_format": "nv12", + "keep_ratio": false, + "use_rga": true + }, + { + "id": "alarm", + "type": "alarm", + "role": "sink", + "enable": true, + "labels": [], + "rules": [ + { + "name": "person_in_view", + "class_ids": [0], + "roi": { "x": 0.0, "y": 0.0, "w": 1.0, "h": 1.0 }, + "min_duration_ms": 0, + "cooldown_ms": 3000 + } + ], + "actions": { + "log": { "enable": true, "level": "info" }, + "snapshot": { + "enable": true, + "format": "jpg", + "quality": 85, + "upload": { + "type": "minio", + "endpoint": "${minio_endpoint}", + "bucket": "${minio_bucket}", + "region": "us-east-1", + "access_key": "${minio_ak}", + "secret_key": "${minio_sk}" + } + }, + "clip": { + "enable": true, + "pre_sec": 5, + "post_sec": 10, + "format": "mp4", + "fps": "${fps}", + "upload": { + "type": "minio", + "endpoint": "${minio_endpoint}", + "bucket": "${minio_bucket}", + "region": "us-east-1", + "access_key": "${minio_ak}", + "secret_key": "${minio_sk}" + } + }, + "http": { + "enable": false, + "url": "http://127.0.0.1:8080/api/alarm", + "timeout_ms": 3000, + "include_media_url": true, + "method": "POST" + } + } + }, + { + "id": "pub", + "type": "publish", + "role": "sink", + "enable": true, + "codec": "h264", + "fps": "${fps}", + "gop": "${gop}", + "bitrate_kbps": "${bitrate_kbps}", + "use_mpp": true, + "use_ffmpeg_mux": true, + "outputs": [ + { "proto": "rtsp_server", "port": 8555, "path": "/live/${name}" }, + { "proto": "hls", "path": "./web/hls/${name}/index.m3u8", "segment_sec": 2 } + ] + } + ], + "edges": [ + ["in", "pre"], + ["pre", "ai"], + ["ai", "osd"], + ["osd", "post"], + ["post", "pub"], + ["post", "alarm"] + ] + } + }, + + "instances": [ + { + "name": "cam1", + "template": "strict_minio_alarm_pipeline", + "params": { + "name": "cam1", + "url": "rtsp://10.0.0.5:8554/cam", + "src_w": 1280, + "src_h": 720, + "fps": 30, + "gop": 60, + "bitrate_kbps": 2000, + "model_path": "./third_party/rknpu2/examples/rknn_yolov5_demo/model/RK3588/yolov5s-640-640.rknn", + "minio_endpoint": "http://10.0.0.5:9000", + "minio_bucket": "test", + "minio_ak": "minioadmin", + "minio_sk": "minioadmin" + } + }, + { + "name": "cam2", + "template": "strict_minio_alarm_pipeline", + "params": { + "name": "cam2", + "url": "rtsp://10.0.0.5:8554/cam", + "src_w": 1280, + "src_h": 720, + "fps": 30, + "gop": 60, + "bitrate_kbps": 2000, + "model_path": "./third_party/rknpu2/examples/rknn_yolov5_demo/model/RK3588/yolov5s-640-640.rknn", + "minio_endpoint": "http://10.0.0.5:9000", + "minio_bucket": "test", + "minio_ak": "minioadmin", + "minio_sk": "minioadmin" + } + }, + { + "name": "cam3", + "template": "strict_minio_alarm_pipeline", + "params": { + "name": "cam3", + "url": "rtsp://10.0.0.5:8554/cam", + "src_w": 1280, + "src_h": 720, + "fps": 30, + "gop": 60, + "bitrate_kbps": 2000, + "model_path": "./third_party/rknpu2/examples/rknn_yolov5_demo/model/RK3588/yolov5s-640-640.rknn", + "minio_endpoint": "http://10.0.0.5:9000", + "minio_bucket": "test", + "minio_ak": "minioadmin", + "minio_sk": "minioadmin" + } + }, + { + "name": "cam4", + "template": "strict_minio_alarm_pipeline", + "params": { + "name": "cam4", + "url": "rtsp://10.0.0.5:8554/cam", + "src_w": 1280, + "src_h": 720, + "fps": 30, + "gop": 60, + "bitrate_kbps": 2000, + "model_path": "./third_party/rknpu2/examples/rknn_yolov5_demo/model/RK3588/yolov5s-640-640.rknn", + "minio_endpoint": "http://10.0.0.5:9000", + "minio_bucket": "test", + "minio_ak": "minioadmin", + "minio_sk": "minioadmin" + } + }, + { + "name": "cam5", + "template": "strict_minio_alarm_pipeline", + "params": { + "name": "cam5", + "url": "rtsp://10.0.0.5:8554/cam", + "src_w": 1280, + "src_h": 720, + "fps": 30, + "gop": 60, + "bitrate_kbps": 2000, + "model_path": "./third_party/rknpu2/examples/rknn_yolov5_demo/model/RK3588/yolov5s-640-640.rknn", + "minio_endpoint": "http://10.0.0.5:9000", + "minio_bucket": "test", + "minio_ak": "minioadmin", + "minio_sk": "minioadmin" + } + } + ] +}