{ "@apiVersion": "1.1", "name": "EVRtoVideoSinkOnMotionDetection", "properties": { "description": "Event-based video recording to Video Sink based on motion events", "parameters": [ { "name": "rtspUserName", "type": "String", "description": "rtsp source user name.", "default": "dummyUserName" }, { "name": "rtspPassword", "type": "String", "description": "rtsp source password.", "default": "dummyPassword" }, { "name": "rtspUrl", "type": "String", "description": "rtsp Url" }, { "name": "motionSensitivity", "type": "String", "description": "motion detection sensitivity", "default": "medium" }, { "name": "hubSinkOutputName", "type": "String", "description": "hub sink output name", "default": "inferenceOutput" } ], "sources": [ { "@type": "#Microsoft.VideoAnalyzer.RtspSource", "name": "rtspSource", "endpoint": { "@type": "#Microsoft.VideoAnalyzer.UnsecuredEndpoint", "url": "${rtspUrl}", "credentials": { "@type": "#Microsoft.VideoAnalyzer.UsernamePasswordCredentials", "username": "${rtspUserName}", "password": "${rtspPassword}" } } } ], "processors": [ { "@type": "#Microsoft.VideoAnalyzer.MotionDetectionProcessor", "name": "motionDetection", "sensitivity": "${motionSensitivity}", "inputs": [ { "nodeName": "rtspSource", "outputSelectors": [ { "property": "mediaType", "operator": "is", "value": "video" } ] } ] }, { "@type": "#Microsoft.VideoAnalyzer.SignalGateProcessor", "name": "signalGateProcessor", "inputs": [ { "nodeName": "motionDetection" }, { "nodeName": "rtspSource", "outputSelectors": [ { "property": "mediaType", "operator": "is", "value": "video" } ] } ], "activationEvaluationWindow": "PT1S", "activationSignalOffset": "PT0S", "minimumActivationTime": "PT30S", "maximumActivationTime": "PT30S" } ], "sinks": [ { "@type": "#Microsoft.VideoAnalyzer.VideoSink", "name": "videoSink", "videoName": "sample-motion-video", "inputs": [ { "nodeName": "signalGateProcessor", "outputSelectors": [ { "property": "mediaType", "operator": "is", "value": "video" } ] } ], "videoCreationProperties": { "title": "sample-motion-video", "description": "Sample video using motion", "segmentLength": "PT30S" }, "localMediaCachePath": "/var/lib/videoanalyzer/tmp/", "localMediaCacheMaximumSizeMiB": "2048" }, { "@type": "#Microsoft.VideoAnalyzer.IotHubMessageSink", "name": "hubSink", "hubOutputName": "${hubSinkOutputName}", "inputs": [ { "nodeName": "motionDetection" } ] } ] } }