Stanag2WebRTC docker container

Stream playback

Make sure you have Docker installed on your system and run the following command:

docker run --rm --network host --name stanag2webrtc impleo/stanag2webrtc:2.0.2 -url udp://227.1.1.1:30120

This will download the container (if it is not found locally) and start listening for the udp multicast stream at 227.1.1.1:30120.

Note

  • We're using --network host as docker does not support multicast.
  • Once started, Stanag2WebRTC will only process streams of the same profile. If you need to work with another stream source, restart the Docker container.

Without license, Stanag2WebRTC will run in demo mode.
If you have a license, copy it to the local directory, bind mount it and pass the license key env variable as shown below:

docker run --rm --network host --name stanag2webrtc 
 --mount type=bind,source=/home/myUser/licenses/misbCore/myMisbCoreNativeLicense.lic,target=/app/misbcore.lic 
 -e MISBCORE_LICENSE_KEY=0D85E380-08D2CE09-F699124B-57BE894B  
 impleo/stanag2webrtc:2.0.2 -url udp://227.1.1.1:30120

or, if you're using Docker Compose:

version: "3.4"

services:
  stanag2webrtc: 
    image: impleo/stanag2webrtc:2.0.2 
    container_name: stanag2webrtc
    restart: always
    volumes:
      - /home/myUser/recorder:/recorder
      - /home/myUser/licenses/misbCore/myMisbCoreNativeLicense.lic:/app/misbcore.lic
    environment:
      - MISBCORE_LICENSE_KEY=0D85E380-08D2CE09-F699124B-57BE894B
    network_mode: host   
    command: >
      -url udp://227.1.1.1:30120
      -multicastIface lo
      -recorderTargetDir /recorder

Additional configuration parameters that can be passed to the container, see the documentation..

Stream recording

To enable recording, you need to specify the target directory where the recorded files will be stored. Since we are using Docker, we must bind-mount this directory to the container. For instance, if we'like to use the "./tmp/recorder" folder, the command line might resemble this:

docker run --rm --network host --name stanag2webrtc 
 --mount type=bind,source=/home/recorder,target=/app/recorder 
 impleo/stanag2webrtc:2.0.2 -url udp://227.1.1.1:30120 -recorderTargetDir /app/recorder 

Running in a VM on Windows

Although Stanag2WebRTC is cross-platform, we currently only offer the Klv decoding support in the Linux version of the server. If someone wishes to run the server on Windows, they can do so by using a virtual machine (VM). It should be noted that running Docker inside a VM may not be the most efficient approach, given the additional overhead of running the VM. However, for evaluation or for a small number of client devices, running the server in a VM is a viable option. For full-scale deployment, we strongly recommend using a Linux machine, as it will offer the best performance and scalability. One of the fastest and most convenient ways to run a Stanag2WebRTC on Windows is to use Ubuntu Multipass.
More info.

Custom frontend

Though you can host your own frontend application anywhere, it is possible to use the Stanag2WebRTC's built-in http server.
By default, it serves the content of the /app/web folder in the container, so you can simply map your own directory as a volume. For example:

docker run --rm --network host --name stanag2webrtc -v /home/myUser/myapp/web/:/app/web/ 
impleo/stanag2webrtc:2.0.2 -url udp://192.168.1.32:30120

This way, your /home/myUser/myapp/web/ directory will override the ones that exists in the container.

Stanag2WebRTC decodes MISB KLV to JSON strings, preserving the nested data hierarchy. The resulting JSON tag / value structure follows MISB 601.X standard.

Input data

The input data (which can be, demultiplexed from a STANAG 4609 stream) contains a KLV encoded MISB 601.X metadata.
For example, the binary data buffer may look like this:

Encoded buffer
The above buffer contains the following parts:

  • The UAS Local Set 16-Byte UL “Key”-0x06 0x0E 0x2B 0x34 0x02 0x0B 0x01 0x01 0x0E 0x01 0x03 0x01 0x01 0x00 0x00 0x00
  • Packet length - 0x30
  • Packet data payload - Klv triplets: tag, length and value
  • Checksum (last klv triplet, last 4 bytes)

Output data

The result of the decoding is a JSON string.

{
  "2": "2008-10-24T00:13:29.913Z",
  "3": "MISSION01",
  "13": 60.176822967,
  "14": 128.426759042,
  "15": 14190.72,
  "16": 144.5713,
  "65": 13,
  "1": 53482
}

The "keys" in the above JSON correspond to MISB 0601.X specification.

Supported tags

Supported MISB 601 tags