Live Preview Configuration
Stream format
Usually, live UAV video streams are delivered as TS over UDP (unicast or multicast) streams. If Stanag on Demand Server is directly connected to the Ground Station network (LAN), the udp multicast stream input is a preferable format.
If however, the server is hosted in the cloud or any other remote location, sending video over udp will most likely lead to network jitter, lost or reordered packets and other issues.
Here are some of possible solutions to this problem:
- Using TS over RTP
- Using TCP
- Using RTMP
- Using SSF
- Using SRT
Stanag on Demand Server uses SRT tunneling for your video streams as the most suitable from the list above.
Video quality
You can configure a preview video quality by adjusting a videoBitrate and videoResolution parameters in supervisor.yml file (/data directory)
# Stream monitor config
streamMonitor:
bitrateReportingPeriod: 1000
metadataSampling: 1000
timeout: 1000
noSignalAfter: 30000
videoBitrate: '1900K'
videoResolution: '1280x720'
Please note, a live video preview is intended to provide low latency and the video quality will degrade in comparison with the original, especially at lower bitrates and resolutions. On the other hand, setting the bitrate high will consume significant network bandwidth.
Other settings
You can define when the source stream becomes Lost by setting noSignalAfter paramter.
# Stream monitor config
streamMonitor:
timeout: 1000
noSignalAfter: 30000
Stream is considered to be lost when it is not detected for the period of time specified by --timeout. After that, the stream is declared as Offline.
Note, Stream Monitor expects a stream with the same profile when it is "Waiting for stream" to come back. If the resumed stream is different, it may not work, so if you switch the stream sources frequently, consider setting this parameter to a more appropriate interval. After the stream becomes "Lost" the monitor will perform stream detection, so a different stream (from a different source may be safely sent).