{
  "start-before": {
    "cameraId": 101,
    "recServerId": "REC-DEMO",
    "recCameraId": "101",
    "rtspUrl": "rtsp://example.invalid/live/demo",
    "startWallTimeMs": 1790557200000,
    "rtpClockRate": 90000,
    "scenarios": [
      {
        "scenarioCode": "INTRUSION",
        "enabled": true,
        "rois": [],
        "parameters": {
          "person_confidence": 0.5,
          "dwell_seconds": 0.5,
          "rearm_seconds": 1.0,
          "grace_seconds": 0.5
        }
      },
      {
        "scenarioCode": "LOITERING",
        "enabled": true,
        "rois": [],
        "parameters": {
          "person_confidence": 0.5,
          "dwell_seconds": 5.0,
          "rearm_seconds": 1.0,
          "grace_seconds": 1.0
        }
      },
      {
        "scenarioCode": "FALL",
        "enabled": true,
        "rois": [],
        "parameters": {
          "person_confidence": 0.15,
          "pose_confidence": 0.1,
          "down_angle_deg": 50,
          "recovery_hold_seconds": 1.0
        }
      },
      {
        "scenarioCode": "FIGHT",
        "enabled": true,
        "rois": [],
        "parameters": {
          "person_confidence": 0.15,
          "pose_confidence": 0.1,
          "pair_distance_ratio": 1.8,
          "pair_close_hold_seconds": 0.1,
          "arm_motion_ratio": 0.1,
          "required_bursts": 1
        }
      },
      {
        "scenarioCode": "FIRE",
        "enabled": true,
        "rois": [],
        "parameters": {
          "flame_confidence": 0.5,
          "flame_window_seconds": 2.0,
          "flame_positive_ratio": 0.6,
          "smoke_confidence": 0.5,
          "smoke_window_seconds": 2.0,
          "smoke_positive_ratio": 0.6,
          "clear_seconds": 5.0
        }
      },
      {
        "scenarioCode": "CROWD",
        "enabled": true,
        "rois": [
          {
            "label": "군중 영역",
            "points": [
              [
                0.0,
                0.0
              ],
              [
                1.0,
                0.0
              ],
              [
                1.0,
                1.0
              ],
              [
                0.0,
                1.0
              ]
            ]
          }
        ],
        "parameters": {
          "person_confidence": 0.45,
          "head_confidence": 0.45,
          "window_seconds": 3.0,
          "report_seconds": 3.0
        }
      }
    ]
  },
  "start-after": {
    "cameraId": 101,
    "recServerId": "REC-DEMO",
    "recCameraId": "101",
    "rtspUrl": "rtsp://example.invalid/live/demo",
    "startWallTimeMs": 1790557200000,
    "rtpClockRate": 90000,
    "scenarios": [
      {
        "scenarioCode": "INTRUSION",
        "enabled": true,
        "rois": [],
        "parameters": {
          "person_confidence": 0.5,
          "dwell_seconds": 0.5,
          "rearm_seconds": 1.0,
          "grace_seconds": 0.5,
          "cooldown_seconds": 10
        }
      },
      {
        "scenarioCode": "LOITERING",
        "enabled": true,
        "rois": [],
        "parameters": {
          "person_confidence": 0.5,
          "dwell_seconds": 5.0,
          "rearm_seconds": 1.0,
          "grace_seconds": 1.0,
          "cooldown_seconds": 10
        }
      },
      {
        "scenarioCode": "FALL",
        "enabled": true,
        "rois": [],
        "parameters": {
          "person_confidence": 0.15,
          "pose_confidence": 0.1,
          "down_angle_deg": 50,
          "recovery_hold_seconds": 1.0,
          "cooldown_seconds": 10
        }
      },
      {
        "scenarioCode": "FIGHT",
        "enabled": true,
        "rois": [],
        "parameters": {
          "person_confidence": 0.15,
          "pose_confidence": 0.1,
          "pair_distance_ratio": 1.8,
          "pair_close_hold_seconds": 0.1,
          "arm_motion_ratio": 0.1,
          "required_bursts": 1,
          "cooldown_seconds": 10
        }
      },
      {
        "scenarioCode": "FIRE",
        "enabled": true,
        "rois": [],
        "parameters": {
          "flame_confidence": 0.5,
          "flame_window_seconds": 2.0,
          "flame_positive_ratio": 0.6,
          "smoke_confidence": 0.5,
          "smoke_window_seconds": 2.0,
          "smoke_positive_ratio": 0.6,
          "clear_seconds": 5.0,
          "cooldown_seconds": 10
        }
      },
      {
        "scenarioCode": "CROWD",
        "enabled": true,
        "rois": [
          {
            "label": "군중 영역",
            "points": [
              [
                0.0,
                0.0
              ],
              [
                1.0,
                0.0
              ],
              [
                1.0,
                1.0
              ],
              [
                0.0,
                1.0
              ]
            ]
          }
        ],
        "parameters": {
          "person_confidence": 0.45,
          "head_confidence": 0.45,
          "window_seconds": 3.0,
          "report_seconds": 3.0,
          "cooldown_seconds": 10,
          "reference_count": 20,
          "safe_ratio": 0.25,
          "caution_ratio": 0.5,
          "warning_ratio": 0.75,
          "danger_ratio": 0.9
        }
      }
    ]
  },
  "redis-before": {
    "schemaVersion": "1",
    "cameraId": 101,
    "sourceId": "101",
    "serverId": "AI-DEMO",
    "streamId": "camera-demo",
    "runId": "run-demo",
    "runGeneration": 1,
    "frameSeq": 100,
    "ptsNs": 10000000000,
    "ingestTimeWallMs": 1790557210020,
    "frameWidth": 1920,
    "frameHeight": 1080,
    "coordinateSpace": "SOURCE_FRAME",
    "format": "XYXY",
    "normalized": true,
    "origin": "TOP_LEFT",
    "configVersion": "config-demo",
    "frameTime": {
      "anchorId": "anchor-demo",
      "startWallTimeMs": 1790557200000,
      "anchorRtpTimestamp": 0,
      "rtpClockRate": 90000,
      "rtpTimestamp": 900000,
      "rtpTimestampExt": 900000,
      "detectedAtWallMs": 1790557210000,
      "syncStatus": "SYNCED",
      "timeSource": "RTP_ZERO_BASE"
    },
    "providerKey": "crowd",
    "providerModel": "Awiros_person_and_head_detection",
    "requiredProviders": [
      "pose",
      "fire",
      "crowd"
    ],
    "objects": [
      {
        "objectRef": "0",
        "classId": 0,
        "modelKey": "Awiros_person_and_head_detection",
        "confidence": 0.9,
        "bbox": [
          0.1,
          0.2,
          0.2,
          0.8
        ],
        "trackId": null,
        "eventIds": [],
        "labelText": "person | P≈12",
        "color": "#00CC66",
        "visible": true
      },
      {
        "objectRef": "1",
        "classId": 1,
        "modelKey": "Awiros_person_and_head_detection",
        "confidence": 0.9,
        "bbox": [
          0.12,
          0.2,
          0.17,
          0.27
        ],
        "trackId": null,
        "eventIds": [],
        "labelText": "head | H≈18",
        "color": "#00B8D9",
        "visible": true
      }
    ],
    "scenarioConfig": {
      "CROWD": {
        "enabled": true,
        "roi_id": "primary",
        "roi_name": "군중 영역",
        "roi": [
          [
            0.0,
            0.0
          ],
          [
            1.0,
            0.0
          ],
          [
            1.0,
            1.0
          ],
          [
            0.0,
            1.0
          ]
        ],
        "debug_roi": true,
        "confidence": 0.45
      }
    },
    "scenarioRevision": "scenario-demo",
    "events": []
  },
  "redis-after": {
    "schemaVersion": "1",
    "cameraId": 101,
    "sourceId": "101",
    "serverId": "AI-DEMO",
    "streamId": "camera-demo",
    "runId": "run-demo",
    "runGeneration": 1,
    "frameSeq": 100,
    "ptsNs": 10000000000,
    "ingestTimeWallMs": 1790557210020,
    "frameWidth": 1920,
    "frameHeight": 1080,
    "coordinateSpace": "SOURCE_FRAME",
    "format": "XYXY",
    "normalized": true,
    "origin": "TOP_LEFT",
    "configVersion": "config-demo",
    "frameTime": {
      "anchorId": "anchor-demo",
      "startWallTimeMs": 1790557200000,
      "anchorRtpTimestamp": 0,
      "rtpClockRate": 90000,
      "rtpTimestamp": 900000,
      "rtpTimestampExt": 900000,
      "detectedAtWallMs": 1790557210000,
      "syncStatus": "SYNCED",
      "timeSource": "RTP_ZERO_BASE"
    },
    "providerKey": "crowd",
    "providerModel": "Awiros_person_and_head_detection",
    "requiredProviders": [
      "pose",
      "fire",
      "crowd"
    ],
    "objects": [
      {
        "objectRef": "0",
        "classId": 0,
        "modelKey": "Awiros_person_and_head_detection",
        "confidence": 0.9,
        "bbox": [
          0.1,
          0.2,
          0.2,
          0.8
        ],
        "trackId": null,
        "eventIds": [],
        "labelText": "person | P≈12",
        "color": "#00CC66",
        "visible": true
      },
      {
        "objectRef": "1",
        "classId": 1,
        "modelKey": "Awiros_person_and_head_detection",
        "confidence": 0.9,
        "bbox": [
          0.12,
          0.2,
          0.17,
          0.27
        ],
        "trackId": null,
        "eventIds": [],
        "labelText": "head | H≈18",
        "color": "#00B8D9",
        "visible": true
      }
    ],
    "scenarioConfig": {
      "CROWD": {
        "enabled": true,
        "roi_id": "primary",
        "roi_name": "군중 영역",
        "roi": [
          [
            0.0,
            0.0
          ],
          [
            1.0,
            0.0
          ],
          [
            1.0,
            1.0
          ],
          [
            0.0,
            1.0
          ]
        ],
        "debug_roi": true,
        "confidence": 0.45
      }
    },
    "scenarioRevision": "scenario-demo",
    "events": [],
    "crowd": {
      "regions": [
        {
          "roiIndex": 0,
          "roiLabel": "군중 영역",
          "headCount": 18,
          "personCount": 12,
          "count": 18,
          "referenceCount": 20,
          "densityRatio": 0.9,
          "status": "DANGER"
        }
      ]
    }
  },
  "event-before": {
    "serverId": "AI-DEMO",
    "events": [
      {
        "eventId": "event-intrusion-001",
        "cameraId": 101,
        "eventType": "INTRUSION",
        "detectedAtWallMs": 1790557210000,
        "score": 0.7,
        "severityCode": "WARNING",
        "detail": {
          "aiRecordedAtWallMs": 1790557210040,
          "aiRecordedStage": "EVENT_CONFIRMED_BEFORE_ENQUEUE",
          "aiRecordedStageDescription": "Event confirmed; AI reference clock sampled once before asynchronous enqueue.",
          "scoreMeaning": "TEMPORARY_FIXED",
          "scoreMeasured": false,
          "runId": "run-demo",
          "runGeneration": 1,
          "streamId": "camera-demo",
          "frameSeq": 100,
          "ptsNs": 10000000000,
          "frameTime": {
            "anchorId": "anchor-demo",
            "startWallTimeMs": 1790557200000,
            "anchorRtpTimestamp": 0,
            "rtpClockRate": 90000,
            "rtpTimestamp": 900000,
            "rtpTimestampExt": 900000,
            "detectedAtWallMs": 1790557210000,
            "syncStatus": "SYNCED",
            "timeSource": "RTP_ZERO_BASE"
          },
          "trackId": 7,
          "roiId": "primary",
          "artifact": {
            "clip": true,
            "thumbnail": true
          },
          "artifactError": null,
          "roiLabel": "침입 영역"
        },
        "rtpTimestamp": 900000,
        "startWallTimeMs": 1790557200000,
        "clipUrl": "https://example.invalid/artifacts/cameras/101/2026-09-28/AI_100010.040+0900_INTRUSION_event-intrusion-001/clip.mp4",
        "thumbnailUrl": "https://example.invalid/artifacts/cameras/101/2026-09-28/AI_100010.040+0900_INTRUSION_event-intrusion-001/thumbnail.jpg"
      }
    ]
  },
  "event-after": {
    "serverId": "AI-DEMO",
    "events": [
      {
        "eventId": "event-crowd-001",
        "cameraId": 101,
        "eventType": "CROWD",
        "detectedAtWallMs": 1790557210000,
        "score": 0.7,
        "severityCode": "DANGER",
        "detail": {
          "aiRecordedAtWallMs": 1790557210040,
          "aiRecordedStage": "EVENT_CONFIRMED_BEFORE_ENQUEUE",
          "aiRecordedStageDescription": "Event confirmed; AI reference clock sampled once before asynchronous enqueue.",
          "scoreMeaning": "TEMPORARY_FIXED",
          "scoreMeasured": false,
          "runId": "run-demo",
          "runGeneration": 1,
          "streamId": "camera-demo",
          "frameSeq": 100,
          "ptsNs": 10000000000,
          "frameTime": {
            "anchorId": "anchor-demo",
            "startWallTimeMs": 1790557200000,
            "anchorRtpTimestamp": 0,
            "rtpClockRate": 90000,
            "rtpTimestamp": 900000,
            "rtpTimestampExt": 900000,
            "detectedAtWallMs": 1790557210000,
            "syncStatus": "SYNCED",
            "timeSource": "RTP_ZERO_BASE"
          },
          "trackId": null,
          "roiId": "primary",
          "artifact": {
            "clip": true,
            "thumbnail": true
          },
          "artifactError": null,
          "roiLabel": "군중 영역",
          "crowd": {
            "roiIndex": 0,
            "roiLabel": "군중 영역",
            "headCount": 18,
            "personCount": 12,
            "count": 18,
            "referenceCount": 20,
            "densityRatio": 0.9,
            "status": "DANGER"
          }
        },
        "rtpTimestamp": 900000,
        "startWallTimeMs": 1790557200000,
        "clipUrl": "https://example.invalid/artifacts/cameras/101/2026-09-28/AI_100010.040+0900_CROWD_event-crowd-001/clip.mp4",
        "thumbnailUrl": "https://example.invalid/artifacts/cameras/101/2026-09-28/AI_100010.040+0900_CROWD_event-crowd-001/thumbnail.jpg"
      }
    ]
  }
}