Configuration
Platforms and sensors.
To work with live video streams, you must first configure them. In general, the server works with a logical entity called a Platform such as a plane, drone, or car, that can carry multiple Sensors (video cameras) or other data sources. The operator configures the platforms.yml file to specify the existing platforms and network topology.
When you record the streams, it becomes a mission, which includes live feeds, recordings, and descriptive metadata. Until recording is active, it's simply a video feed — the mission may or may not have started yet.
The StanagOnDemand server works with Stanag streams that come as UDP multicast streams. If you have unicast source streams, you can use a stream recaster for unicast-to-multicast recasting.
Basic platform configuration
Let's use an example to show the configuration file that defines two UAV platforms (with names UAV_1 and UAV_2)
The first UAV has four video sensors:
- EO/IR sensor with the stream coming from udp://227.1.1.1:30120
- Tail camera sensor with the stream coming from udp://227.1.1.2:30122
- Operator screen capture sensor with the stream coming from udp://227.1.1.3:30123
- Radar capture sensor with the stream coming from udp://227.1.1.4:30124
Note that the Radar sensor has the active parameter set to false (active: false), so this sensor is not monitored. Set it to true to enable monitoring.
The second UAV has only one sensor:
- EO/IR sensor with the stream coming from udp://228.1.1.1:1234
If you have only one UAV (platform) to monitor, there should be only one platform on the list.
platforms:
# First platform
- name: UAV_1
active: true
description: First platform
type: Plane
sensors:
- name: EO/IR
description: EO/IR sensor
active: true
type: video
url: udp://227.1.1.1:30120
- name: Tail
description: Tail camera
active: true
type: video
url: udp://227.1.1.2:30122
- name: Operator
description: Operator screen
active: true
type: video
url: udp://227.1.1.3:30123
- name: Radar
description: Radar
active: false
type: video
url: udp://227.1.1.4:30124
# Second platform
- name: UAV_2
active: true
description: Second platform
type: Plane
sensors:
- name: EO/IR
active: true
type: video
url: udp://228.1.1.1:1234
Note. If you have to select the specific network interface, use add ?localaddr= to the url:
udp://227.1.1.1:30120?localaddr=192.168.1.28
Allowed platform types:
- Plane
- Helicopter
- Quadcopter
- Camera
- ROV
- Diver
Configuring live video
The live video preview is provided by different services:
- Live preview - stsupervisor
- Live (WebRtc) - stanag2webrtc
- DVR - stserver or stvideo-server
Note: WebRTC requires a secure HTTPS connection for proper operation in browsers. Therefore, STServer must be deployed behind a reverse proxy configured with HTTPS (for example, Nginx) when serving clients over the internet. This ensures secure signaling and media transport setup. The only exceptions to this requirement are when STServer is accessed from localhost or within a trusted local network, where HTTP connections are also permitted. In all other cases, HTTPS must be enforced to ensure compatibility and security.
stanag2webrtc service in docker-compose.yml
stanag2webrtc:
image: impleo/stanag2webrtc:3.0.1
container_name: stanag2webrtc
restart: always
network_mode: host
volumes:
- ./data/:/app/data/
environment:
ADDR: 0.0.0.0:8081
WEBRTC_SERVICE: "stanag2webrtcwhep"
# WEBRTC_LOOPBACK_ICE_CANDIDATE: true # Use loopback ICE candidate (if local access is required). If true, the server will use a loopback ICE candidate
# WEBRTC_FULL_ICE: true # If true, the server will use full ICE (not ICE-Lite) for WebRTC connections
KLV_SAMPLING: 300
More on stanag2webrtc service configuration
You can override the default parameters for each channel by adding a live section to the sensor configuration. For example, if you have a video that can be played directly in the browser using the H.264 codec, enabling video pass-through by setting the videoPassthrough parameter to true is recommended to preserve the original video quality and minimize CPU usage.
# Platforms
platforms:
# First platform
- name: UAV_1
active: true
description: First platform
type: Plane
sensors:
- name: EO
description: EO/IR sensor
active: true
type: video
url: udp://227.1.1.1:30120
live:
videoPassthrough: true
Alternatively, if you want to set specific video bitrate, resolution and codec, you can use the videoResolution, videoBitrate and videoCodec parameters.
# Platforms
platforms:
# First platform
- name: UAV_1
active: true
description: First platform
type: Plane
sensors:
- name: EO
description: EO/IR sensor
active: true
type: video
url: udp://227.1.1.1:30120
live:
streams:
- id: main # layer name (used as Simulcast-Layer)
codec: vp8 # h264 / h265 / vp8 / vp9 /
resolution:
width: 1280
height: 720
framerate: 30
bitrate: 2000