Configuring Video Capture
This microservice does not require GPU resources.
The Video Capture microservice processes video streams or files and writes the result to its target topic.
Environment Variables
VC_PROPERTY_FILE_PATHS
: property files path list.
Video Capture reads its configuration from the property files in the above list during startup. See the list of properties below.
Properties
The values of properties with the .file
extension are the paths of the .json
files, while the values of properties with the .data
extension are the .json
configurations themselves.
Attention! Setting
.data
and.file
properties are exclusive to each other, meaning setting bothultinous.service.vc.ms.config.data
andultinous.service.vc.ms.config.file
results in an error.
ultinous.service.vc.auth.defs.data
Property | ultinous.service.vc.auth.defs.data |
---|---|
Description | Authentication definition data in one-liner JSON format corresponding to the definitions described in Superconfig Authentication Definitions. |
Required | Optional |
Note | Required if ID based authentication is used in ultinous.service.vc.ms.config.* |
ultinous.service.vc.auth.defs.file
Property | ultinous.service.vc.auth.defs.file |
---|---|
Description | Authentication definition file path. Content of the file should be in JSON format described described in Superconfig Authentication Definitions. |
Required | Optional |
Note | Required if ID based authentication is used in ultinous.service.vc.ms.config.* |
ultinous.service.vc.monitoring.port
Property | ultinous.service.vc.monitoring.port |
---|---|
Description | Monitoring server port. |
Required | Required |
ultinous.service.vc.monitoring.threads
Property | ultinous.service.vc.monitoring.threads |
---|---|
Description | Monitoring server thread pool size. |
Required | Optional |
ultinous.service.vc.ms.config.data
Property | ultinous.service.vc.ms.config.data |
---|---|
Description | Video Capture microservice configuration, and optionally authentication and functional configuration. Content must be in one-liner JSON format described in Superconfig Topic Definitions. |
Required | Required |
ultinous.service.vc.ms.config.file
Property | ultinous.service.vc.ms.config.file |
---|---|
Description | Video Capture microservice configuration, and optionally authentication and functional configuration. Content must be the path to the JSON format configuration file. |
Required | Required |
ultinous.service.vc.config.data
Property | ultinous.service.vc.config.data |
---|---|
Description | Functional configuration. |
Required | Optional |
Note | Required if config_data is not defined in ultinous.service.vc.ms.config.* |
ultinous.service.vc.config.file
Property | ultinous.service.vc.config.file |
---|---|
Description | Functional configuration. |
Required | Optional |
Note | Required if config_data is not defined in ultinous.service.vc.ms.config.* |
Microservice Configuration
Configuration records are separated into the following three values:
VideoCaptureMSConfig
specified in Kafka Superconfiguration ProtoVideoCaptureConfigRecord
specified in Kafka Configuration ProtoAuthDef
specified in Kafka Superconfiguration Proto
Example of a VideoCaptureMSConfig from Kafka
This configuration provides the details of connecting the microservice to Kafka.
The example below can be the contents of a file given as the property value for
ultinous.service.vc.ms.config.file
.
{
"targets": [
{
"broker_list": "127.0.0.1:6494",
"name": "local_camera.vc.Packet.upw"
},
{
"broker_list": "127.0.0.1:6494",
"name": "network_camera.vc.Packet.upw"
}
]
}
In this example, two targets are defined with broker list and topic name, meaning that Video Capture will process two input streams and write the results in these topics.
The config_data
field is not given in this example, which means that the
configuration for the microservice functionality is given separately, see
Example of a VideoCaptureConfigRecord from Kafka.
Example of a VideoCaptureConfigRecord from Kafka
This configuration provides other details of themicroservice, e.g.
the input streams.
The example below can be the contents of a file given as the property value for
ultinous.service.vc.config.file
.
{
"streams": [
{
"url":"/dev/video0"
},
{
"url":"rtsp://192.168.0.1/"
}
]
}
In this example, two input video streams are saved: one is from the local camera, and the other is a network stream.