{ "@apiVersion": "1.1", "name": "EVRtoVideoSinkOnObjDetect", "properties": { "description": "Event-based video recording to Video Sink based on specific objects being detected by external inference engine", "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": "hubSourceInput", "type": "String", "description": "input name for hub source", "default": "recordingTrigger" }, { "name": "inferencingUrl", "type": "String", "description": "inferencing Url", "default": "http://yolov3/score" }, { "name": "inferencingUserName", "type": "String", "description": "inferencing endpoint user name.", "default": "dummyUserName" }, { "name": "inferencingPassword", "type": "String", "description": "inferencing endpoint password.", "default": "dummyPassword" }, { "name": "hubSinkOutputName", "type": "String", "description": "hub sink output name", "default": "detectedObjects" } ], "sources": [ { "@type": "#Microsoft.VideoAnalyzer.RtspSource", "name": "rtspSource", "endpoint": { "@type": "#Microsoft.VideoAnalyzer.UnsecuredEndpoint", "url": "${rtspUrl}", "credentials": { "@type": "#Microsoft.VideoAnalyzer.UsernamePasswordCredentials", "username": "${rtspUserName}", "password": "${rtspPassword}" } } }, { "@type": "#Microsoft.VideoAnalyzer.IotHubMessageSource", "name": "iotMessageSource", "hubInputName": "${hubSourceInput}" } ], "processors": [ { "@type": "#Microsoft.VideoAnalyzer.SignalGateProcessor", "name": "signalGateProcessor", "inputs": [ { "nodeName": "iotMessageSource" }, { "nodeName": "rtspSource" } ], "activationEvaluationWindow": "PT1S", "activationSignalOffset": "-PT5S", "minimumActivationTime": "PT30S", "maximumActivationTime": "PT30S" }, { "@type": "#Microsoft.VideoAnalyzer.HttpExtension", "name": "inferenceClient", "endpoint": { "@type": "#Microsoft.VideoAnalyzer.UnsecuredEndpoint", "url": "${inferencingUrl}", "credentials": { "@type": "#Microsoft.VideoAnalyzer.UsernamePasswordCredentials", "username": "${inferencingUserName}", "password": "${inferencingPassword}" } }, "image": { "scale": { "mode": "pad", "width": "416", "height": "416" }, "format": { "@type": "#Microsoft.VideoAnalyzer.ImageFormatBmp" } }, "samplingOptions": { "skipSamplesWithoutAnnotation": "false", "maximumSamplesPerSecond": "5" }, "inputs": [ { "nodeName": "rtspSource", "outputSelectors": [ { "property": "mediaType", "operator": "is", "value": "video" } ] } ] } ], "sinks": [ { "@type": "#Microsoft.VideoAnalyzer.IotHubMessageSink", "name": "hubSink", "hubOutputName": "${hubSinkOutputName}", "inputs": [ { "nodeName": "inferenceClient" } ] }, { "@type": "#Microsoft.VideoAnalyzer.VideoSink", "name": "videoSink", "videoName": "sample-hub-messages-video-sink", "inputs": [ { "nodeName": "signalGateProcessor", "outputSelectors": [ { "property": "mediaType", "operator": "is", "value": "video" } ] } ], "videoCreationProperties": { "title": "sample-hub-messages-video-sink", "description": "Sample video using hub messages to video sink", "segmentLength": "PT30S" }, "localMediaCachePath": "/var/lib/videoanalyzer/tmp/", "localMediaCacheMaximumSizeMiB": "2048" } ] } }