For remote security surveillance, like monitoring an industrial facility where expensive equipment or even human lives might be at stake, maintaining an immediate and high quality video streaming from the areas of interest is a must. With the advent of 5G networks, it's now possible to stream high quality video in real-time with a very low latency that wasn't possible with the past generations of mobile networks.

In this domain, the SRT protocol has been picking up speed and thanks to srtsrc and srtsink elements available since GStreamer 1.16, it's now easier than ever to incorporate low latency streaming into your application. Collabora has been lately participating in design and development of Hwangsaeul—a next generation security video feeds streaming platform with one of their customers, SK Telecom Co.

Hwangsaeul cloud-relay video streaming platform

Hwangsaeul is a cloud relay service that gathers live security video feeds from different locations into a single service

Hwangsaeul is a cloud relay service that gathers live security video feeds from different locations into a single service to which clients can connect to watch the feeds. Additionally, it also enables continuous recording of each feed. The SRT protocol is utilised by both camera-to-relay and relay-to-client transport in order to minimise latency.

The platform consists of a collection of modules communicating through RabbitMQ message broker. For this introduction, three components will be important. The names are in Korean. (Hwangsaeul itself means "stork's nest". It is the street in Seongnam where SK Telecom offices were located.)

Gaeul video streaming server

Gaeul is a streaming server that runs on each edge node contributing a video stream to the service. It accesses the video capture device through V4L2 and registers the node with the platform's message broker, allowing video capture and streaming to be remotely controlled from the platform's relay service.

Hwangsae fulfills two distinct roles: it implements the core SRT relay that provides M:N streaming of the content (capture from one camera may be viewed by many clients at a time) and can record streams into MPEG-TS or MP4 files for later viewing.

Chamge communications platform

Chamge takes care of communication between platform components. On one hand it provides a wrapper around RabbitMQ client library for other services, on the other it implements the Arbiter service, which keeps track of all video capture and relay nodes registered with the platform and facilitates their interaction.

Hwangsaeul is being developed under Apache 2.0 license with the source codes hosted on GitHub

Hwangsaeul is being developed under Apache 2.0 license with the source codes hosted on GitHub. Nightly builds are also available as binary packages for Ubuntu 18.04 and 19.04. In production, the components would be divided across multiple servers with distinct purposes as stream sources, relays, recorders. However, for the sake of simplicity, users can install everything on one machine.

D-Bus API interface

Hwangsaeul is being developed as a platform that integrates into 3rd party applications. To that end, it exposes its functionality as a set of D-Bus interfaces. A couple of examples that demonstrate its extended functionality include -

  • Streaming - In order to initiate a video stream, we first need to know its source. Streaming sources in Hwangsaeul are identified by their unique Edge ID, which can be obtained from its respective process over D-Bus using interface.
  • Recording - Stream recording is controlled through D-Bus interface. Hwangsaeul will continuously save the stream into a file. In the case when the connection with the stream source gets broken, the recorder will keep making attempts to re-establish it until explicitly told to stop.

Extended SRT support in GStreamer

Hwangsaeul streaming service is still in its early development stage, but it already provides the most fundamental APIs for 3rd party consumption. A key missing requirement is stream encryption, ideally through a mechanism that would be compatible also with common web browsers. There are also possibilities to extend SRT support in GStreamer, for example by implementing network adaptive encoding in order to improve the service quality.