Video IO & Storage (VIOS) Microservice#
Overview#
Video IO & Storage (VIOS) Microservice is a new addition to the Metropolis platform. It provides an efficient way to manage cameras and videos, especially in scenarios where AI is the main functionality.
VIOS features hardware-accelerated video decoding, streaming, and storage. VIOS is easy to integrate with your video analytics application, through its REST API. It also includes a reference web UI for efficient management of your devices.
Key Features#
VIOS auto-discovers ONVIF-S compliant IP cameras, and allows use of custom IP stream as video source. It then allows for video to be stored, played back at various speeds, or paused at any frame:
Support ONVIF S-profile devices, ONVIF profile-T for H.265 encoding devices, ONVIF discovery with control and data flow.
Manage devices manually by IP address and/or RTSP URLs.
Video storage and recording with aging policy.
RTSP proxy URL in pass-through and multi-cast mode.
Media streaming using hardware-accelerated WebRTC protocol for live and recorded videos.
Recorded playback supported with 2x,4x,8x FF, overlay & snapshot support.
Supports both H.264 and H.265 video formats.
Video wall feature which provides composite view of multiple webrtc streams.
Provide REST APIs to write client application to control and configure VIOS.
Support Redis/Kafka message bus to publish device add/remove events.
Prometheus/Grafana integration for publishing VIOS statistics.
Derive insights about the current status of VIOS.
Cloud native. Deploy as a container.
Supports AWS S3 storage for video playback.
Supports MinIO object storage as video storage backend for recording and playback.
Supports milestone adaptor for fetching data from milestone VMS.
We included binary for a web-based client that allows to view live and recorded content, as well as to modify camera and stream configuration (Web-UI Viewer).
VIOS Modular Diagram#
The diagram below shows an overview of the modular VIOS architecture. The VIOS is composed of multiple modules / services that are responsible for different aspects of the system.
Sensor Management Service: This service is a comprehensive system designed to facilitate the administration and control of sensor-related functionalities. It streamlines sensor operations, enhances monitoring capabilities, and provides efficient management of sensors across the network.
Storage Service: This service is designed to facilitate the management of media files. For NvStreamer, the media files are static media files that are scanned from the specified directory or uploaded by users. For VST, the media files are the recorded videos of sensors.
RTSP Server Service: This service is used to manage proxy RTSP URLs for sensors. This service provides a proxy layer for RTSP streaming with enhanced control and monitoring capabilities.
Live Stream Service: This service is designed to facilitate the live or real-time streaming of sensors. This service encompasses real-time video streaming capabilities with comprehensive control and monitoring features.
Replay Stream Service: This service is designed to facilitate the replay or recorded streaming of sensors. This service encompasses recorded video streaming capabilities with comprehensive control and monitoring features.
Recorder Service: This service is used to manage recording of sensors. This service provides comprehensive control over video recording operations for all connected sensors.
Ingress: A service that handles the ingress of the HTTP requests to the VIOS microservices.
MCP Gateway: A service that handles the MCP gateway for the AI/ML agent integration with VIOS APIs.
SDR Agent: A service that handles the workload distribution and service discovery for the scalable microservice instances.
Envoy: A service that handles the Envoy proxy for load balancing and routing requests to the scalable microservice instances.
VIOS MS Horizontal Scaling#
VIOS MS is designed to scale horizontally to handle increased workloads and provide high availability.
Horizontal Scaling Capabilities:
Multiple VIOS Microservices Instances: Deploy multiple VIOS microservices instances to distribute the workload
Load Distribution: Distribute camera streams and video processing across multiple MS microservices instances
High Availability: Ensure continuous operation even if individual instances fail
Shared Storage: All VIOS microservices instances can access shared storage (local filesystem or cloud storage like MinIO/S3)
Centralized Database: PostgreSQL database provides centralized configuration and metadata management across all VIOS microservices instances
The diagram below illustrates the horizontal scaling architecture:
VIOS Stream Processing Microservice Architecture#
The VIOS Stream Processing Microservices provide a unified video streaming and processing service that integrates RTSP, WebRTC, storage, recording, and additional supporting services. It offers a comprehensive platform capable of handling real-time video ingestion, low-latency streaming, and long-term archival.
Key Components:
Sensor Management Service: Handles sensor discovery, configuration, and stream management through dedicated sensor services and adaptors
Stream Processing Service: Central processing engine that handles video stream transformation, file ingestion, content download capabilities from ingested files, routing, and protocol conversion
Storage Layer: Multi-tier storage system supporting Redis for caching, PostgreSQL for metadata, and object storage for video content
Client Interfaces: Support for various client types including web applications, perception services, computer vision applications, and VSS UI
Note
The Stream Processing Microservice is available for use in development profiles only.
VIOS Microservices#
The following table lists all the microservices and containers that are part of the VIOS deployment.
| Microservice Name | Container Name | Functionality |
|---|---|---|
| VIOS Core Microservices | ||
| VIOS Ingress | vst-ingress-* |
NGINX reverse proxy for routing HTTP requests to appropriate microservices. |
| Sensor Management Service | sensor-ms-* |
Manages camera/sensor registration, configuration, and stream monitoring. |
| Storage Service | storage-ms-* |
Handles video data storage, aging policies, and video clip management. |
| RTSP Server Service † | rtspserver-ms-{1-5}-* |
Provides RTSP proxy functionality for video streams. Supports 1-5 container instances. |
| Recorder Service † | recorder-ms-{1-5}-* |
Handles continuous and event-based video recording. Supports 1-5 container instances. |
| Live Stream Service | livestream-ms-1-* |
Streams live video data to clients via WebRTC protocols. |
| Replay Stream Service | replaystream-ms-1-* |
Streams recorded video data for playback to clients. |
| MCP Gateway | vst-mcp-* |
Model Context Protocol gateway for AI/ML agent integration with VIOS APIs. |
| Stream Processing Service | streamprocessing-ms-dev |
Central processing engine for video stream transformation, routing, and protocol conversion. Available in development profiles only. |
| SDR (Sensor Distribution and Routing) Containers | ||
| SDR RTSP Server Agent | sdr-http-rtspserver-* |
Manages workload distribution and service discovery for RTSP Server microservice instances. |
| SDR Recorder Agent | sdr-http-recorder-* |
Manages workload distribution and service discovery for Recorder microservice instances. |
| SDR Live Stream Agent | sdr-http-livestream-* |
Manages workload distribution and service discovery for Live Stream microservice instances. |
| SDR Replay Stream Agent | sdr-http-replaystream-* |
Manages workload distribution and service discovery for Replay Stream microservice instances. |
| SDR Stream Processing Agent | sdr-streamprocessing |
Manages workload distribution and service discovery for Stream Processing microservice instances in development profiles. |
| Envoy Proxy Containers | ||
| Envoy RTSP Server Proxy | envoy-http-rtspserver-* |
Envoy proxy for load balancing and routing requests to RTSP Server instances. |
| Envoy Recorder Proxy | envoy-http-recorder-* |
Envoy proxy for load balancing and routing requests to Recorder instances. |
| Envoy Live Stream Proxy | envoy-http-livestream-* |
Envoy proxy for load balancing and routing requests to Live Stream instances. |
| Envoy Replay Stream Proxy | envoy-http-replaystream-* |
Envoy proxy for load balancing and routing requests to Replay Stream instances. |
| Envoy Stream Processing Proxy | envoy-streamprocessing |
Envoy proxy for load balancing and traffic management for Stream Processing service in development profiles. |
| OSS (Open Source Software) Containers | ||
| Centralized Database | centralizedb-* |
PostgreSQL database for storing sensor configurations, stream metadata, and system state. |
| MinIO Server | minio-server |
S3-compatible object storage for storing video clips. |
Notes:
1) The * in container names represents the blueprint suffix: smc, 2d, or 3d (e.g., vst-ingress-smc, vst-ingress-2d, vst-ingress-3d).
2) Scalable Services: RTSP Server and Recorder services (marked with †) support horizontal scaling with 1 to 5 container instances. The {1-5} indicates the instance number.
Storage Calculation#
The required storage can be calculated using the following formula:
Storage (GB) = (Bitrate (Mbps) × Duration (seconds)) / 8 / 1024
Example Calculation for 1 stream at 8 Mbps for 1 day:
Bitrate: 8 Mbps
Duration: 1 day = 24 hours × 60 minutes × 60 seconds = 86,400 seconds
Storage = (8 × 86,400) / 8 / 1024 = 84.375 GB per stream per day
General Formula:
Storage (GB/day) = Bitrate (Mbps) × 10.546875
For multiple streams, multiply by the stream count:
Total Storage (GB) = Number of Streams × Bitrate (Mbps) × Days × 10.546875
Note
For operational planning, actual storage requirements may vary based on encoding efficiency, variable bitrate settings etc. So add a buffer of ~10–20% to the calculated storage requirements.
To configure required storage, set the total_video_storage_size_MB parameter in the vst_storage.json file, refer to Storage Config.
Cameras Tested in VIOS#
Manufacturer |
Model |
|---|---|
ANNKE |
C500 |
ANNKE |
NC400 |
AMCREST |
IP8M-2493EW |
AMCREST |
IP8M-T2499E |
AMCREST |
IP8M-2496E |
AMCREST |
IP2M-841W-V3 |
AMCREST |
IP4M-1026E |
AMCREST |
IP5M-T1179E |
AXIS |
P3301 |
BOSCH |
Flexidome_IP_4000I |
CP PLUS |
CP-UNC-TB41L3-MDS-0360 |
JIDETECH |
IPC-3C1-5MP |
HANWHA |
QND-6012R |
HANWHA |
QND-6072R |
QSEE |
QTN8083B |
QSEE |
QTN8098B-N |
SONY |
SNV-VB640 |
SONY |
SNC-VB770 |
SONY |
SNC-XM632 |
SONY |
SNC-EM630 |
HIKVISION |
DS-2CD2043G0-I |
HIKVISION |
DS-2CD2T43G0-I5 |
HIKVISION |
DS-2CD2045FWD-I |
HIKVISION |
DS-2CD3121G0-I |
HIKVISION |
DS-2CD3023G0E-I |
Usage & Configuration#
Reference Web App#
Default URL: http://<IP_address>:30888/vst/
VIOS deployment can be verified using a web-based application binary. Please note: at this point the web-based application is only available for Chrome browser running on Linux, Windows or MacOS. The UI can be accessed on any viewing machine on local subnet. The following instructions refer to same host. Substitute ‘localhost’ with IP address of your viewing machine.
Launch Chrome browser
In the address bar enter
http://<IP_address>:30888/vst/
The VIOS web-based UI allows for seamless and hassle-free discovery of most ONVIF-S compliant cameras.
Although a relatively short list of models are guaranteed to work with VIOS release, any fully ONVIF-S compliant camera you might already have purchased should work with this release as well. Contact us if your cameras are not working.
VIOS will auto-discover, and attempt to communicate with any ONVIF-S camera attached downstream of the host. Once discovered, VIOS will attempt to communicate with the camera, to retrieve its settings and parameters, and populate the web UI.
There is a good chance that your camera has been secured by a custom username and password prior to the first VIOS use. In such a case (even though the camera would be discovered) VIOS might not be able to communicate with it immediately.
This short guide will explain how to ensure that you can see live and recorded content from new or previously used ONVIF-S cameras.
Dashboard#
Open a web browser (Chrome is required for best video streaming experience) at http://<IP_address>:30888/vst/. Enter admin for username and password if prompted otherwise ignore it. The following page will be displayed upon successful login:
As the page opens, it shows overall health of VIOS, information about VIOS Devices, Sensors discovered, Record Size. Also, it shows the vital information about sensors such as Record Status, Sensor Status etc.,
Note
User options like Home, Profile, Settings, etc., are not implemented in current release.
Sensor management#
Cameras that had been discovered will be listed. If VIOS discovered the camera, but was not able to communicate with it, the camera status indicates a lock icon. If the lock icon appears, navigate to ‘Sensor Management’ tab, and click on ‘Sensor Credentials’ section as displayed in the following image:
Click on the ‘Select Sensor’ drop down list, and select the sensor that cannot be streamed from. Then input that sensor’s username and password, and click ‘Submit’. An instantaneous message box will confirm if your credentials are valid. Repeat the same procedure for all cameras that cannot be streamed from.
It should now be possible to stream from all the cameras attached to VIOS.
If you do not remember your camera’s custom username or password, you might need to perform a hardware factory reset for that camera, re-start VIOS, and consult that camera’s guide to set its username and password again.
VIOS is now aware of usernames and passwords for all cameras, and is ready to stream live video from the auto-discovered ONVIF-S sources.
Add sensors#
Add Cameras/Streams from VIOS webUI: To manually add camera into VIOS, navigate to Sensor Management tab, and go to Add device manually option. To Add ONVIF compliant camera using IP option click on IP button then provide ip address, username, password fields. Remaining fields are optional. If you want to add direcly RTSP url, click on RTSP option and provide RTSP url, username, password.
Add Cameras/Streams from NVStreamer: To add streams from NVStreamer, VIOS provides a mechanism with the help of RTSP Stream Config file. You can provide the NVStreamer endpoint.
Add Cameras/Streams using RTSP URLs: To add streams from RTSP URLs, VIOS provides a mechanism with the help of RTSP Stream Config file. You can provide the RTSP URL, username, password.
You can see a screen as displayed in the following image:
Remove sensors#
To remove the sensor from VIOS, navigate to Sensor Management tab, and go to Remove sensor option. Select the sensor from dropdown list and click on Remove button as displayed in the following image:
Live streams#
Navigate back to the Live Streams tab, click on the center drop-down list, and select the first camera on the list. A black rectangle will appear on the UI, and the camera’s IP address will be displayed on top of the drop-down list. Repeat the same with up to max cameras supported. You should see a screen similar to the following:
From here on, you can control each of the video streams independently. Click on each triangle to see live video from your camera.
Note
It can take a few seconds for the VIOS to commence live streaming. If you see a constantly revolving crescent for a prolonged amount of time - please try to restart the browser.
VIOS has been tested extensively with Chrome and we are aware of existing problems while streaming through alternative browsers.
Recording management#
Setting#
Now that you are able to stream live video, it is time to try out recording. Navigate to the Record Setting tab, and select camera from drop down list:
Note
All recordings will be saved to your local storage; older recordings will be overwritten with newer ones automatically should VIOS run out of the disk space.
![]()
You can select a particular camera from the drop down list and set recording of that camera only.
Each camera can be assigned a separate recording schedule.
Click on the Live Streams tab again, and verify a red dot is displayed at the top right of the live video.
Click on the Recorded Streams tab, you can use a scrubber at the bottom of the video stream to go back in time and play back the recorded content for cameras the recordings are available.
Click back on the Live Streams tab to go back to view the live feeds.
Recorded videos will be stored at directory set to ‘“video_path”’ config parameter in ‘“storage_config_file”’ (Storage Config.) config parameter in ‘vst_config.json’ file and default video directory path is located at installation path inside ‘vst_video’ directory.
Playback recordings#
Now that you are able to record video, it is time to try out recorded playback feature of VIOS. To playback the recordings, navigate to Recorded Streams tab and select a video stream.
Some options:
It provides options such as pause, fast playback 2x,4x,8x etc.
Snapshot option to take screenshot of currently playing frame.
Other options like overlay, time-range playback, quality selection etc.
Playback overlay on Live and Recorded Streams#
Now that you are able to playback recorded video, it is time to try out Overlay Feature of VIOS in Live and Recorded Streams. To enable bounding boxes on the video, navigate to Recorded Streams tab or Live Streams tab and select a video stream then select overlay option from the video player and enable it.
Some options:
Analytics Overlay Settings tab is used to enable / disable Bounding Boxes, Debug Mode
Proximity Settings tab is used to set the proximity classes and entrant classes of the objects, along with the area factor and proximity animation.
Color Settings tab is used to set the color of the bounding boxes for different object classes also the proximity bubble colors.
Playback overlay on Video Wall#
Now that you are able to enable Overlay Feature of VIOS in Live and Recorded Streams, it is time to extend the Overlay Feature of VIOS in Video Wall. To enable bounding boxes on the video, navigate to Video Wall tab and select streams from the dropdown list and enable overlay option from the video player and enable it.
Some options:
Analytics Overlay Settings tab is used to enable / disable Bounding Boxes, Debug Mode, Include Floor Plan and setting the thickness of the bounding boxes.
Proximity Settings tab is used to set the proximity classes and entrant classes of the objects, along with the area factor and proximity animation.
Color Settings tab is used to set the color of the bounding boxes for different object classes also the proximity bubble colors.
Features:
Proximity Alert Bubble : a proximity bubble is drawn around the object of
Proximity class, the color of the bubble changes according to the distance of the object from theEntrant classobject. The default color of the bubble is green marking as safe zone and turns orange when the object is in the close proximity of the threshold and turns red when the object is in the danger zone.Proximity Alert Line : when an object is in the close proximity of the threshold or in the danger zone, a proximity line with approximate distance is drawn between the object of
Proximity class, and the object ofEntrant class.
Proximity Alert Bubble and Lines in Video Wall#
Proximity Alert Bubble and Line in Live Stream#
Upload media#
To upload media, navigate to Upload Media option in Media Management tab. You can drag and drop files or choose files to be uploaded with several optional configurations:
Transcode: Enable video transcoding if needed
Metadata Info: Add metadata information such as:
Sensor ID
Timestamp
Event Info
Stream Name
Tag
Checksum
Enable multi-part upload: Enable this option for large file uploads
Configuring upload file size limit#
The maximum upload file size in VIOS is controlled by two settings. The effective upload limit is the minimum of these two values, so both must be configured to allow larger uploads.
Stream-processor NGINX configuration (
client_max_body_size):Controls the maximum request body size accepted by the NGINX reverse proxy in the stream-processor. The default value is 500 MB. To allow larger uploads (for example, 10–20 GB), increase this value before deployment:
client_max_body_size 20G;
VIOS configuration (
nv_streamer_max_upload_file_size_MB):Controls the maximum file size accepted for upload in both VIOS and NVStreamer. The default value is 1000 MB. To allow larger uploads, set this parameter in the
datasection of the VIOS configuration file (refer to VIOS Config):{ "data": { "nv_streamer_max_upload_file_size_MB": 10000 } }
Note
Both settings are configurable pre-deployment. Set them according to your upload size requirements. The effective upload limit is determined by whichever value is lower.
Download recordings#
To download recorded video, select Download videos option in Media Management tab. Then choose the device and corresponding timeline.
Note
In case video download fails then you need to redeploy the VIOS with VST_INSTALL_ADDITIONAL_PACKAGES set to true
Storage utilization#
You can examine the amount of disk space used by clicking on Dashboard tab:
Configuration#
The active VIOS configuration can be viewed from the Settings tab:
Experimental#
Finally, the Experimental tab will allow you to create and examine a debug package. It will come handy if you ever need to contact us. Enjoy the VIOS experience!
MinIO Object Storage#
What is MinIO?
MinIO is a high-performance, S3-compatible object storage system. It is designed for large-scale private cloud infrastructure and can be used as an alternative storage backend for VIOS to store recorded videos.
Using MinIO with VIOS
VIOS can be configured to use MinIO as a cloud storage backend for recording and playing back videos. This allows you to:
Store recorded videos on MinIO object storage
Retrieve and playback videos from MinIO storage
Scale your storage independently from the VIOS deployment
MinIO Configuration
To configure VIOS to use MinIO object storage, configure the following parameters to your VIOS configuration file (refer to VIOS Config for complete configuration details):
{
"cloud_storage_type": "minio",
"cloud_storage_endpoint": "http://<minio_endpoint>:9000",
"cloud_storage_access_key": "<minio_access_key>",
"cloud_storage_secret_key": "<minio_secret_key>",
"cloud_storage_bucket": "vios-storage",
"cloud_storage_region": "us-east-1",
"cloud_storage_use_ssl": false
}
Configuration Parameters:
cloud_storage_type: Set to
"minio"to use MinIO storagecloud_storage_endpoint: MinIO server endpoint URL (e.g.,
http://<minio_endpoint>:9000)cloud_storage_access_key: MinIO access key for authentication (leave empty if not required)
cloud_storage_secret_key: MinIO secret key for authentication (leave empty if not required)
cloud_storage_bucket: Bucket name where videos will be stored (e.g.,
"minio-storage")cloud_storage_region: Region setting for MinIO (e.g.,
"us-east-1")cloud_storage_use_ssl: Set to
falsefor HTTP ortruefor HTTPS connections
Once configured, VIOS will automatically record videos to MinIO storage and retrieve them for playback through the VIOS APIs.
AWS S3 Object Storage#
What is AWS S3?
Amazon S3 (Simple Storage Service) is a highly scalable, secure, and durable object storage service provided by Amazon Web Services. VIOS can be configured to use AWS S3 as a cloud storage backend.
Using AWS S3 with VIOS
VIOS can be configured to use AWS S3 as a cloud storage backend for playing back and retrieving videos. This allows you to:
Retrieve and playback videos from S3 storage
Access videos stored in AWS S3 buckets
Leverage AWS’s global infrastructure for video storage
Note
Important: Currently, VIOS supports playback and retrieval only from AWS S3. Recording videos directly to S3 is not yet supported.
AWS S3 Configuration
To configure VIOS to use AWS S3 object storage, configure the following parameters to your VIOS configuration file (refer to VIOS Config for complete configuration details):
{
"enable_cloud_storage": true,
"cloud_storage_type": "s3",
"cloud_storage_endpoint": "https://s3.us-west-1.amazonaws.com",
"cloud_storage_access_key": "<aws_access_key>",
"cloud_storage_secret_key": "<aws_secret_key>",
"cloud_storage_bucket": "<aws_bucket_name>",
"cloud_storage_region": "us-west-1",
"cloud_storage_use_ssl": true
}
Configuration Parameters:
enable_cloud_storage: Set to
trueto enable cloud storagecloud_storage_type: Set to
"s3"to use AWS S3 storagecloud_storage_endpoint: AWS S3 endpoint URL as per region (e.g.,
https://s3.us-west-1.amazonaws.com)cloud_storage_access_key: AWS access key for authentication
cloud_storage_secret_key: AWS secret key for authentication
cloud_storage_bucket: S3 bucket name where videos are stored (e.g.,
"vios-storage")cloud_storage_region: AWS region of the S3 bucket (e.g.,
"us-west-1")cloud_storage_use_ssl: Set to
truefor HTTPS connections (recommended for AWS S3)
Once configured, VIOS will be able to retrieve and playback videos stored in the specified AWS S3 bucket through the VIOS APIs.
Milestone VMS#
What is Milestone VMS?
Milestone XProtect is a professional Video Management System (VMS) that provides centralized management of IP cameras and video streams. VIOS integrates with Milestone VMS through the ONVIF Bridge, enabling seamless access to cameras managed by Milestone.
Using Milestone VMS with VIOS
VIOS uses the Open Network Video Interface Forum (ONVIF) Bridge and AI Bridge from Milestone VMS to provide the following capabilities:
Retrieve RTSP live and Video on Demand (VOD) RTSP streams from Milestone VMS
Play live and VOD video streams
Download Video clips
Capture snapshots (download pictures)
Milestone VMS Configuration
To configure VIOS in MMS (Milestone Management System) mode, you need to:
Step 1: Adaptor Configuration
Add the following adaptor configuration to enable Milestone VMS integration (refer to Adaptor Config for complete configuration details):
{
"enabled": true,
"id": "<unique-adaptor-id>",
"name": "milestone_onvif",
"type": "mms",
"ip": "<milestone-server-ip>",
"user": "<onvif-username>",
"password": "<onvif-password>",
"port": "580",
"need_rtsp_server": true,
"need_stream_monitoring": true,
"need_recording": true,
"need_storage_management": true,
"control_adaptor_lib_path": "prebuilts/arch/onvif_client.so",
"media_adaptor_lib_path": "prebuilts/arch/vms_media.so"
}
Configuration Parameters:
enabled: Set to
trueto enable the adaptorid: Unique identifier for the adaptor (UUID format)
name: Name of the adaptor (e.g.,
"milestone_onvif")type: Set to
"mms"for Milestone VMS integrationip: IP address of the Milestone XProtect server
user: ONVIF username configured in Milestone
password: ONVIF password for authentication
port: Port number for ONVIF communication (typically
"580")need_rtsp_server: Enable RTSP server for video streaming
need_stream_monitoring: Enable stream health monitoring
need_recording: Enable recording capabilities
need_storage_management: Enable storage management features
control_adaptor_lib_path: Path to the ONVIF client control library
media_adaptor_lib_path: Path to the VMS media library
Environment Variables for Deployments Using Milestone VMS
For deployments using Milestone VMS, set the following environment variables:
VST_ADAPTOR=milestone_onvif
NGINX_MODE=mms
ADAPTOR_IP="<milestone-server-ip>"
ADAPTOR_USER="<onvif-username>"
ADAPTOR_PASSWORD="<onvif-password>"
AI_BRIDGE_ENDPOINT="<ai-bridge-endpoint-url>"
Step 2: AI Bridge Endpoint Configuration
Add the AI Bridge endpoint to the network section of your VIOS configuration (refer to VIOS Config for complete configuration details):
{
"ai_bridge_endpoint": "http://<ai-bridge-domain>:<port>/api/bridge/graphql"
}
Step 3: (Optional) Add AI Bridge Domain to Hosts File
If the AI Bridge domain is not resolvable via DNS, add an entry to the /etc/hosts file:
<ai-bridge-ip> <ai-bridge-domain>
Once configured, VIOS will connect to Milestone VMS through the ONVIF Bridge and provide access to all cameras and recordings managed by the VMS.
Remote Access Options#
Installation of STUN / TURN Server#
Installation and configuration of these servers are mandatory for WebRTC streaming. Below are the NAT type requirements for STUN/TURN:
Case |
NAT types |
STUN/TURN requirement |
|---|---|---|
1 |
Symmetric to Symmetric |
TURN |
2 |
Symmetric to Port-Restricted Cone |
TURN |
3 |
Symmetric to Address-Restricted Cone |
STUN (but probably not reliable) |
4 |
Symmetric to Full Cone |
STUN |
5 |
Everything else |
STUN |
Depending on your network type, you may choose to install STUN and/or TURN servers:
You can set the STUN server using
stunurlconfig parameter.You can set the TURN server using
turnurlconfig parameter.
VIOS web UI is verified with coturn server. To install, run the following command:
sudo apt-get install coturn
Note
TURN server is not mandatory, this is required only if Client and Server are in different networks.
VIOS configuration details can be found here: VIOS Config.
VIOS Storage Config details can be found here: Storage Config.
RTSP streams config file details can be found here: RTSP Stream Config.
VIOS Config#
Following table describes the parameters in VIOS config file, which should be provided as command-line option deploying helm chart:
VIOS config file# Key
Description
Typical Value
network
Section to define all Network related parameters
“server_domain_name”
Server domain name
“vst-service”
“stunurl_list”
STUN server address
[“stun.l.google.com:19302”]
“static_turnurl_list”
TURN server address
[]
“coturn_turnurl_list_with_secret”
Coturn Turnurl list with secret
[]
“use_coturn_auth_secret”
Enable/Disable Coturn Auth secret
FALSE
“use_twilio_stun_turn”
Enable/Disable Twilio
FALSE
“twilio_account_sid”
Twilio Account Sid
“”
“rx_socket_buffer_size”
RX socket buffer size
1000000
“tx_socket_buffer_size”
TX socket buffer size
1000000
“twilio_auth_token”
Auth token for Twilio
“”
“ntp_servers”
NTP server address
[“time.google.com”]
“use_sensor_ntp_time”
If true then forward camera/nvstreamer ntp time in SR reports to the clients. Otherwise provide current ntp time in SR report.
TRUE
“max_webrtc_out_connections”
Max number of webrtc output connections at a given time
8
“webservice_access_control_list”
An Access Control List allows restrictions to be put on the list of IP addresses which have access to the web server. The ACL is a comma separated list of IP subnets, where each subnet is pre-pended by either a - or a + sign. A plus sign means allow, where a minus sign means deny. If a subnet mask is omitted, such as -1.2.3.4, this means to deny only that single IP address.
“+10.42.0.0/32”
“rtsp_server_port”
User given rtsp port number
8554
“rtsp_preferred_network_iface”
Preferred network interface for RTSP streaming
“eth1”
“rtsp_streaming_over_tcp”
Enable / Disable RTSP Streaming over TCP
FALSE
“rtsp_server_reclamation_client_timeout_sec”
Timeout for RTSP Server reclamation client
10
“stream_monitor_interval_secs”
Stream Monitor interval in seconds
2
“webrtc_latency_ms”
Latency for webrtc in milliseconds
500
“enable_frame_drop”
Enable/Disable frame drop
TRUE
“webrtc_video_quality_tunning”
webRTC video quality tunning
{“resolution_2160”:{“bitrate_start”:20000,”bitrate_range”:[15000,25000],”qp_range_I”:[0,30],”qp_range_P”:[0,51]},”resolution_1440”:{“bitrate_start”:10000,”bitrate_range”:[8000,15000],”qp_range_I”:[10,30],”qp_range_P”:[10,30]},”resolution_1080”:{“bitrate_start”:5000,”bitrate_range”:[3000,8000],”qp_range_I”:[10,30],”qp_range_P”:[10,30]},”resolution_720”:{“bitrate_start”:3000,”bitrate_range”:[2000,5000],”qp_range_I”:[10,30],”qp_range_P”:[10,30]},”resolution_480”:{“bitrate_start”:1000,”bitrate_range”:[800,3000],”qp_range_I”:[10,30],”qp_range_P”:[10,30]}}
“webrtc_peer_conn_timeout_sec”
Timeout duration in seconds for peer connection establishment
10
“remote_vst_address”
Cloud VIOS Address
13.0.0.1:30000
“webrtc_port_range”
Min and Max Port Range for webRTC
“{min”:0 “max”:0}”””
“enable_websocket_pingpong”
Enable/Disable websocket ping pong messages
FALSE
“websocket_keep_alive_ms”
Timeout for websocket to keep alive
5000
“ai_bridge_endpoint”
AI Bridge endpoint URL
“http://<ai-bridge-domain>:<port>/api/bridge/graphql”
onvif
Section to define all ONVIF related parameters
device_discovery_timeout_secs”
Device discovery timeout to receive probe match message from device
10
“onvif_request_timeout_secs”
Timeout to receive ONVIF command response from device
10
“device_discovery_freq_secs”
device discovery frequency in secs
5
“device_discovery_interfaces”
Network interface for device discovery e.g eth0, eth1
[]
“max_devices_supported”
Limiting maximum number of devices
8
“bitrate_kbps”
Value of bitrate setting on device
8000
“framerate”
Value of framerate setting on device
30
“resolution”
Value of resolution setting on device
“1920x1080”
“max_gov_length”
Value of GOV length setting on device
60
data
Section to define all VIOS data related parameters
“storage_config_file”
Path to storage configuration JSON file
./configs/vst_storage.json
“storage_threshold_percentage”
% value of storage occupancy when aging policy triggers
95
“storage_monitoring_frequency_secs”
Monitor storage usage with frequency in seconds
2
“supported_video_codecs”
Video codec supported for video recording
[“h264”,”h265”]
“supported_audio_codecs”
Audio codec supported for audio recording and decode
[“pcmu”,”pcma”,”mpeg4-generic”]
“enable_aging_policy”
Enable/Disable aging policy of video files
TRUE
“nv_streamer_max_upload_file_size_MB”
Maximum file upload size in MB. Applicable for file upload in both VIOS and NVStreamer.
1000
“max_video_download_size_MB”
Limiting the maximum video download size
1000
“always_recording”
Enable/Disable always ON recording
FALSE
“use_software_path”
Enable allows processing on CPU otherwise on GPU
FALSE
“webrtc_sender_quality”
webrtc input quality
“pass_through”
“enable_rtsp_server_sei_metadata”
Enable SEI support for rtsp server
TRUE
“enable_proxy_server_sei_metadata”
Enable SEI support for proxy server
TRUE
“gpu_indices”
GPU indices
[]
“webrtc_out_enable_insert_sps_pps”
webRTC Out Enable / Disable SPS PPS insertion
TRUE
“webrtc_out_set_iframe_interval”
webRTC Out set I-Frame Interval
30
“webrtc_out_set_idr_interval”
webRTC Out set IDR Interval
256
“webrtc_out_min_drc_interval”
webRTC Out minimum interval between DRC requests
5
“device_name”
Device Name for edge VIOS
“VST_EDGE”
“device_location”
Device Location for edge VIOS
“6th_Floor”
“enable_dec_low_latency_mode”
Enable/Disable low latency in decoder
FALSE
“use_centralize_local_db”
Enable/Disable Centralized local db
TRUE
“cloud_storage_type”
Cloud storage type (minio/s3)
“minio”
“cloud_storage_endpoint”
MinIO endpoint or S3 bucket endpoint
“cloud_storage_access_key”
Access key for cloud storage authentication
“”
“cloud_storage_secret_key”
Secret key for cloud storage authentication
“”
“cloud_storage_bucket”
Bucket name where videos will be stored
“vios-storage”
“cloud_storage_region”
Region of the cloud storage bucket
“us-east-1”
“cloud_storage_use_ssl”
Enable HTTPS for cloud storage connection
FALSE
notifications
Section to define all Notifications related parameters
“enable_notification”
Enable notification of device events on message broker
FALSE
“use_message_broker”
Message Broker to use (Kafka/Redis)
“kafka”
“message_broker_topic”
Topic/event used in message broker
“vst.event”
“enable_notification_consumer”
Enable/Disable notification consumer
TRUE
“use_message_broker_consumer”
Message Broker to use (Kafka/Redis)
“kafka”
“message_broker_topic_consumer”
Topic/event used in message broker
“mdx-bev”
“message_broker_payload_key”
Payload key used in message broker
“sensor.id”
“redis_server_env_var”
Redis server address:port
REDIS_SVC_SERVICE_HOST:6379
“kafka_server_address”
Kafka server address and port
“10.0.0.1:9092”
debug
Section to define all Debug related parameters
“enable_perf_logging”
Enable/Disable perf logging
TRUE
“enable_qos_monitoring”
Enable/Disable QOS logging
TRUE
“qos_logfile_path”
QOS log file path
/root/vst_release/webroot/log/
“qos_data_capture_interval_sec”
QOS log capture interval
1
“qos_data_publish_interval_sec”
QOS log publish interval
5
“enable_gst_debug_probes”
Enable/Disable gstreamer probes
TRUE
“enable_prometheus”
Enable/Disable stats update on prometheus
FALSE
“prometheus_port”
prometheus port number
8080
“enable_highlighting_logs”
Enable certain logs highlighting by special colors
TRUE
“enable_debug_apis”
Enable/Disable Debug apis
TRUE
“dump_webrtc_input_stats”
Enable/Disable webRTC IN stats
FALSE
“enable_frameid_in_webrtc_stream”
Enable/Disable frameid in webRTC Stream
FALSE
“enable_network_bandwidth_notification”
Enable/Disable network bandwidth notification
FALSE
“enable_latency_logging”
Enable/Disable latency logging
FALSE
“update_record_details_in_sec”
Update record details in seconds
70
overlay
Section to define all overlay related parameters
“video_metadata_server”
Server to fetch Metadata from
“10.0.0.1:9200/mdx-raw*”
“video_metadata_query_batch_size_num_frames”
Size of metadata to fetch
300
“use_video_metadata_protobuf”
Use Protobuf spec for metadata parsing
TRUE
“enable_gem_drawing”
Enable/Disable GEM drawing
TRUE
“calibration_file_path”
Path to calibration file
“/home/vst/vst_release/configs/calibration.json”
“calibration_mode”
Calibration mode
“synthetic”
“use_camera_groups”
Enable/Disable camera groups
TRUE
“enable_recentering”
Enable/Disable recentering
FALSE
“floor_map_file_path”
Path to floor map file
“/home/vst/vst_release/configs/Top.png”
“3d_overlay_sensor_name”
3D overlay sensor name
“bev-sensor-1”
“bbox_tolerance_ms”
Bounding box tolerance in milliseconds
0
“analytic_server_address”
Analytic server address
“”
“overlay_color_code”
Overlay color code
“halo_safety_udp_port”
UDP port for halo safety communication
-1
“halo_safety_proximity_class”
Proximity class for halo safety detection
“Forklift”
“halo_safety_active_text”
Text displayed in halo safety active mode
“Standard Mode”
“halo_safety_active_text_color”
Text color in halo safety active mode
“black”
“halo_safety_active_text_bg_color”
Background color for text in halo safety active mode
“white”
“halo_safety_inactive_text”
Text displayed in halo safety inactive mode
“Efficient Mode”
“halo_safety_inactive_text_color”
Text color in halo safety inactive mode
“green”
“halo_safety_inactive_text_bg_color”
Background color for text in halo safety inactive mode
“white”
“halo_safety_text_size”
Text size for halo safety display
16
security
Section to define all security related parameters
“use_https”
Enable/Disable https
FALSE
“use_rtsp_authentication”
Enable/Disable RTSP proxy stream authentication
TRUE
“use_http_digest_authentication”
Enable/Disable HTTP user authentication
TRUE
“nv_org_id”
NGC ORG ID
ngc_org_id
“nv_ngc_key”
NGC Key
ngc_key
Adaptor Config#
Following table describes the parameters in VIOS adaptor config file:
VIOS adaptor config file# Key
Description
Typical Value
“enabled”
Enable/Disable the adaptor
true
“id”
Unique identifier for the adaptor
“8ada39c7-5e93-43c5-ae5e-21451c8a8d1b”
“name”
Name of the adaptor
“milestone_onvif”
“type”
Type of the adaptor (e.g., mms)
“mms”
“ip”
IP address of the adaptor server
“<milestone-server-ip>”
“user”
Username for adaptor authentication
“<onvif-username>”
“password”
Password for adaptor authentication
“<onvif-password>”
“port”
Port number for adaptor connection
“580”
“need_rtsp_server”
Enable/Disable RTSP server for this adaptor
true
“need_stream_monitoring”
Enable/Disable stream monitoring for this adaptor
true
“need_recording”
Enable/Disable recording for this adaptor
true
“need_storage_management”
Enable/Disable storage management for this adaptor
true
“control_adaptor_lib_path”
Path to the control adaptor library
“prebuilts/arch/onvif_client.so”
“media_adaptor_lib_path”
Path to the media adaptor library
“prebuilts/arch/vms_media.so”
Storage Config#
Following table describes the parameters in VIOS storage config file:
VIOS storage config file# Key
Description
Typical Value
“data_path”
Path where VIOS related data files are created
“./vst_data/”
“video_path”
Path to root folder where recorded videos to be stored
“./vst_video/”
“total_video_storage_size_MB”
Total size available to store recorded videos
1000000
RTSP Stream Config#
Following table describes the parameters in RTSP Streams config file:
RTSP Streams config file# Key
Description
Typical Value
streams
Array of streams in JSON format
“”
“enabled”
Enable / Disable stream
TRUE / FALSE
“stream_in”
Actual RTSP URL of camera
“rtsp://admin:admin@10.xx.xx.xx/h264”
“name”
Stream Name
Camera_Front_Door
“Nvstreamer”
Nvstreamer configuration
“enabled”
Enable / Disable Nvstreamer
TRUE / FALSE
“endpoint”
Nvstreamer endpoint
“localhost:31000”
“api”
Nvstreamer API
“/api/v1/sensor/streams”
“max_stream_count”
Maximum number of streams
4
{
"streams":
[
{
"enabled":false,
"stream_in":"rtsp://admin:admin@10.xx.xx.xx/h264",
"name":"Camera_1"
},
{
"enabled":false,
"stream_in":"rtsp://admin:admin@10.xx.xx.xx/h265",
"name":"Camera_2"
}
],
"Nvstreamer":
[
{
"enabled": false,
"endpoint": "10.xx.xx.xx:31000",
"api": "/api/v1/sensor/streams",
"max_stream_count": 4
},
{
"enabled": false,
"endpoint": "10.yy.yy.yy:31000",
"api": "/api/v1/sensor/streams",
"max_stream_count": 4
}
]
}
APIs#
VIOS microservice API documentation can be found in the following VIOS API references:
Components & Customization#
Adaptor Architecture#
Adaptor architecture has 3 interfaces. All the interfaces can be loaded automatically by the Adaptor loader in VIOS Microservice like Sensor Management Service, Storage Management Service.
1) Device Discovery Interface#
This adaptor interface is used to discover devices, for example, ONVIF Protocol or UPnP Protocol:
A new Device Discovery Adaptor should implement *ISensorDiscoveryInterface* Class (refer to the
include/sensor_discovery_adaptor.hheader file from VIOS container)Implement the following methods to create and destroy adaptor object:
typedef ISensorDiscoveryInterface* createDiscoveryObject(); typedef void destroyDiscoveryObject ( ISensorDiscoveryInterface* object );
2) Device Control Interface#
This adaptor interface controls the devices, for example, ONVIF Control Protocol:
A new Device Control Adaptor should implement
ISensorControlInterfaceClass (refer to theinclude/sensor_control_adaptor.hheader file from VIOS container)Implement the following methods to create and destroy adaptor object:
typedef ISensorControlInterface* createObject(); typedef void destroyObject( ISensorControlInterface* object );
3) Milestone Media Interface#
This adaptor interface to get media(snapshot and video recordings) from Milestone VMS using grpc protocol:
A new Milestone Media Adaptor should implement
IMediaInterfaceClass (refer to theinclude/vms_media_interface.hheader file from VIOS container)Implement the following methods to get media(snapshot and video recordings) from Milestone VMS server using grpc protocol:
typedef IMediaInterface* createMediaObject(); typedef void destroyMediaObject( IMediaInterface* object );
KPI#
Performance#
Runtime profiling of the VIOS microservice in terms of number of RTSP/WebRTC streams.
Description |
GPU Utilization |
CPU Memory |
CPU Utilization |
Comment |
|---|---|---|---|---|
RTSP Streams Perf |
Decoder: 11.33%, Encoder: 0%, GPU: 26% |
10.21 GiB |
28.41% |
Number of Streams: 30 GPU usage will go up based on how many users are accessing the UI and using the overlay feature. |
WebRTC Streams Perf |
Decoder: 35%, Encoder: 0%, GPU: 41% |
10.5 GiB |
73.00% |
Number of Streams: 30 GPU usage will go up based on how many users are accessing the UI and using the overlay feature. |
Metrics obtained on the below system configuration:
GPU: NVIDIA A100
CPU: AMD EPYC 7313P @ 3GHz - 16 Cores
How to run profiling tools#
Use below tools from inside any VIOS container at path: /home/vst/vst_release/tools.
These tools are based on x86_64 ubuntu22.04
To measure RTSP streams perf:
# Specify RTSP streams or VIOS/NVStreamer endpoint to play & get FPS. #./testRTSPClient Usage: ./testRTSPClient --urls "<rtsp-url-1>, <rtsp-url-12>, ... <rtsp-url-N>" (where each <rtsp-url-i> is a "rtsp://" URL) =================== Options ========================= --tcp => stream over tcp (Default is udp) --urls => Specify rtsp urls in "<rtsp-url-1>, <rtsp-url-12>, ... <rtsp-url-N>" --live555 or -l => use live555 stack instead of gst plugin --decode => Publish decoder fps instead of source fps. Applicable only in case of gst --port <port_number> => client start port number --fps => Display received fps of the stream --fps-interval <interval_in_seconds> => Publish fps at this interval (Default interval is 5sec) --csv-file <filePath to dump fps> => Provide path & filename Eg. fps_report.csv --num-streams <Max num of streams> => Max number of streams to be played (Default no limit) --socket-buffer-size => OS socket buffer size in bytes (needs to be root) --jitter-buffer-size => JitterBuffer/reordering buffer size in ms (default 200ms) --gst-frame-debug => Print every frame info in case of gst --vst-endpoint <ip:port> => VIOS endpoint to fetch rtsp streams --vst-rtspserver-endpoint <ip:port> => VIOS rtspserver endpoint to fetch rtsp streams ================== Examples ========================= 1. Play two RTSP streams ./testRTSPClient --urls "rtsp://10.0.0.1:8554/stream1,rtsp://10.0.0.1:8554/stream2" 2. Play two rtsp streams, stream over tcp & use client start port number as 30000 ./testRTSPClient --tcp --port 30000 --urls "rtsp://10.0.0.1:8554/stream1,rtsp://10.0.0.1:8554/stream2" 3. Play two rtsp streams, specify Names ./testRTSPClient --urls "Amcrest_1|rtsp://10.0.0.1:8554/stream1, Amcrest_2|rtsp://10.0.0.1:8554/stream2" 4. Play two rtsp streams & log fps on console for every 5second ./testRTSPClient --fps --fps-inteval 5 --urls "Amcrest_1|rtsp://10.0.0.1:8554/stream1, Amcrest_2|rtsp://10.0.0.1:8554/stream2" 5. Play two rtsp streams & dump fps data in given csv file ./testRTSPClient --fps --csv-file /home/vst/fps_report.csv --urls "Amcrest_1|rtsp://10.0.0.1:8554/stream1, Amcrest_2|rtsp://10.0.0.1:8554/stream2" 6. Play all rtsp streams from given vst endpoint & dump fps in csv file ./testRTSPClient --fps --csv-file /home/vst/fps_report.csv --vst-endpoint 10.0.0.1:30000 7. Play 4 rtsp streams from given vst endpoint & dump fps in csv file ./testRTSPClient --fps --csv-file /home/vst/fps_report.csv --num-streams 4 --vst-endpoint 10.0.0.1:30000 8. Play 4 rtsp streams from given vst rtsp-server endpoint & dump fps in csv file ./testRTSPClient --fps --csv-file /home/vst/fps_report.csv --num-streams 4 --vst-rtspserver-endpoint 10.0.0.1:31000
To measure WebRTC streams perf:
# specify VIOS/NVStreamer endpoint to play the WebRTC streams ./testWebrtcClient --duration 600 --vst-endpoint 10.0.0.1:30000 --fps-interval 10 --num-streams 4 --csv-file ./fps_file.csv
Troubleshooting#
Common Issues#
Container fails to start#
Check for the following issues:
Examine container logs for error messages:
$ docker logs <container_name>
Verify GPU access: Ensure NVIDIA Container Toolkit is installed and
nvidia-smicommand works properly
Container reboots or becomes unresponsive after long period#
This issue can be resolved by configuring Docker to use the cgroupfs driver.
Configuration Steps:
Add or confirm the following entry in
/etc/docker/daemon.json:{ "data-root": "/var/lib/docker", "default-address-pools": [ { "base": "192.168.2.0/16", "size": 24 } ], "default-runtime": "nvidia", "runtimes": { "nvidia": { "path": "/usr/bin/nvidia-container-runtime", "runtimeArgs": [] } }, "exec-opts": ["native.cgroupdriver=cgroupfs"] }
Apply the configuration by running the following commands:
$ sudo systemctl daemon-reload $ sudo systemctl restart docker
Uploads succeed but files are not visible#
Check available disk space on the storage backend. Ideally, maintain more than 5% of total disk space free to avoid automatic file deletion.
VST uses the storage_threshold_percentage configuration parameter (default: 95) to control when aging policy triggers file deletion. When disk space consumption reaches the threshold (e.g., 95%), VST automatically deletes old files to maintain storage limits, which may include recently uploaded files.
Aging Policy Configuration:
The aging policy can be configured using these VST storage configuration parameters (see Storage Config):
storage_threshold_percentage- Disk usage percentage threshold for aging policystorage_monitoring_frequency_secs- Frequency of storage monitoring checkstotal_video_storage_size_MB- Total storage size allocated for videosenable_aging_policy- Enable or disable the aging policy
Note
It is best to leave these values as default unless absolutely necessary to change them.
Monitor storage utilization from the Dashboard tab to track available space.
Download or video URL generation fails#
The disableAudio query parameter is required in VST video download REST API calls for video download and URL generation to work properly.
Verification Steps:
Check storage-ms logs when the download API is called:
$ docker logs <storage-ms-container-name> | grep downloadVideoFile
Look for a log line similar to:
[YYYY-MM-DDTHH:mm:ss.sssZ:THREAD_ID:video_download.cpp:184: downloadVideoFile] Params: container: mp4, transcode: full, disable_audio: true, enable_overlay: true, is_cloud_stream: 0
Ensure
disable_audio: trueappears in the log outputIf missing, add
disableAudioas a query parameter to the download API request and retry the operation
VST services are up but common functionalities do not work#
This issue is typically related to Redis connectivity problems.
Diagnostic Steps:
Check if Redis is running properly:
$ docker ps | grep redis $ docker logs <redis-container-name>
If Redis keeps restarting, check for port conflicts (Redis port may be blocked due to another process):
$ sudo netstat -tulpn | grep <redis-port>
Verify Redis Connectivity:
Check all VST container logs for successful Redis connection messages:
$ docker logs <vst-container-name> | grep redis_init
You should see a log line similar to:
[YYYY-MM-DDTHH:mm:ss.sssZ:THREAD_ID:redis_publisher.cpp:215: redis_init] Redis connect success.
Ensure all VST containers (sensor-ms, storage-ms, recorder-ms, etc.) show successful Redis connection logs. Restart the Redis container if necessary after resolving port conflicts.
VST APIs do not respond even after waiting several minutes post-deployment#
VST installs required packages during every deployment. If apt package servers are slow or experiencing high latency, package downloads may take considerable time, delaying service readiness.
The package installation script is mounted to all VST containers:
deployments/vst/scripts/user_additional_install.sh
Monitoring Installation Progress:
Check container logs to monitor package installation progress:
$ docker logs -f <vst-container-name>
Verify package installation is complete by checking all VST container logs for the confirmation message:
Installation completed successfully!
Wait for this message to appear in all VST containers before attempting to use VST APIs
Configurable Installation Parameters:
If installation times out frequently, you can adjust the following parameters in user_additional_install.sh:
APT_UPDATE_TIMEOUT=$((60 + RANDOM % 41))- Timeout for apt-get update (60-100 seconds)PKG_INSTALL_TIMEOUT=$((100 + RANDOM % 101))- Timeout for package installation (100-200 seconds)MAX_RETRIES=3- Maximum number of retry attempts for failed installations
Increase these values if your network or apt servers are consistently slow.
Image capture failure#
The VIOS replay service has a known issue: when an RTSP stream encoded with H265 is removed from VIOS, the image capture API may not operate as intended.
Handling time drift in ONVIF cameras#
Time drift in ONVIF cameras can cause incorrect timestamps on recorded video, challenges correlating frames across multiple cameras, and difficulties during incident investigation. It typically arises from the following:
The camera’s internal clock lacks high precision.
Irregular or absent synchronization with a Network Time Protocol (NTP) server.
Network latency or instability.
Power outages or firmware-related issues.
Recommended approach:
Use a dual-pronged strategy to mitigate time drift:
Disable sensor NTP time in VIOS – By default, the configuration parameter
use_sensor_ntp_timeis set totrue. In this mode, VIOS uses the SenderReport and RTP-timestamp provided by the camera and forwards the same timestamp to downstream services such as Perception.However, if time drift is observed between the camera clock and the system clock, set
use_sensor_ntp_timetofalse:{ "data": { "use_sensor_ntp_time": false } }
When this option is disabled, VIOS ignores the SenderReport and RTP-timestamp from the camera and assigns its own system timestamp when forwarding frames to downstream services like Perception. This ensures consistent and reliable timestamps based on the system clock, helping mitigate issues caused by camera time drift.
Enable NTP synchronization on the camera – Configure each ONVIF camera to synchronize with a reliable NTP server (for example,
pool.ntp.orgor a local enterprise NTP server). Set synchronization to occur at regular intervals (for example, every hour) to minimize drift.Most ONVIF cameras allow NTP setup through their web interface (typically under Admin Settings > Time Settings > NTP Configuration) or via the ONVIF Device Management API. Ensure the NTP server address is reachable by the camera and that the time zone and Daylight Saving Time settings are correct.
Note
NTP synchronization alone may not be precise or frequent enough for time-sensitive applications. Disabling use_sensor_ntp_time remains the preferred and more reliable approach for maintaining accurate timing.
If the camera does not support NTP or cannot sync correctly:
Set
use_sensor_ntp_timetofalseso that VIOS applies the system timestamp to each frame when received.If feasible, replace the camera with one that fully supports NTP and ONVIF time configuration.
If the cameras are already well-synchronized and show no drift:
Developers can choose to enable the following VIOS configuration to propagate the original camera timestamp to downstream services:
{
"data": {
"use_sensor_ntp_time": true
}
}