Low latency streaming with Axis cameras

From SpinetiX Support Wiki

Jump to: navigation, search
Note  
Applies to HMP400, HMP400W, iBX410, iBX410W, iBX440 with DSOS SYSTEMS license, and HMP350 devices.

Introduction

Axis and SpinetiX have teamed up to create a powerful and smart streaming solution. By combining the Axis network cameras with SpinetiX players, the screen at shop entrance turns into a Welcome Screen. This smart streaming solution allows retailers to include security as part of their aesthetically pleasing in-store communication.

The player gets the live stream directly from the door-facing Axis network camera and displays it on the Welcome Screen. Furthermore, to make it relevant and targeted to the shopper, the player handle event triggering from the Axis network camera, allowing screen content to change based on predefined shop scenarios. For example, every 10th visitor can be rewarded with a coupon triggered by the connected people counter.

Axis and SpinetiX help to create an engaging smart shopping experience with in-store communication that matters to customers, making them more loyal.

Note Note:
For more details about this integration, see the official Axis Solution Note communication.

Configure low latency streaming

This tutorial shows how to configure the player for low latency streaming.

Getting started

When doing real-time streaming from an Axis camera, it is important to reduce as much as possible the streaming latency of the overall system, which is computed as following:

Total Latency = Camera encoding latency + Network latency + Player latency + Screen latency

Camera latency highly depends on the camera model used and how it is set up (capture rate, image enhancement, compression, buffering, audio). A very good white paper explaining how to reduce the camera latency can be found on Axis website.

Network latency depends on three major factors: the infrastructure (determines the bandwidth), the amount of data produced by the camera (determines the bitrate), and the choice of transmission protocol. As a general rule, network latency is proportional to bitrate and inversely proportional to bandwidth. In a local area network (LAN), the network latency is usually insignificantly low (only a few ms) and can be ignored.

Player latency is mainly generated by two processes: the stream decoding and the content rendering. By default, the player is conservatively configured with high values for these two, for stability and smooth output purposes; both of them can be lowered for low-latency streaming, as detailed below.

Screen latency is induced by the refresh frequency of the screen and shouldn't be more than 30-40 ms. In some cases, image processing options might contribute to the screen latency – disabling them would help in such cases.

Reduce stream decoding latency

By default, the player is conservatively configured to buffer 750 milliseconds of stream for decoding stability purposes. If the stream is reliable, it is possible to (gradually) reduce the stream decoding latency through the "spx:buffering" attribute.

Reduce stream buffering latency

For that, open the Elementi project and follow these steps:

  1. Find the streaming layer within the Edit panel and click its Layer Properties button.
  2. Select the "Advanced" tab within the "Layer Properties" dialog that opens.
  3. Add the "spx:buffering" attribute to the streaming layer.
    • Click on the "Name" column and select the "spx:buffering" attribute from the drop-down list.
    • Click on the "Value" column next to it and enter a negative value from 0 to -0.6 (or "-600ms").
    • Press "Enter" to apply it.
  4. Click the OK button to apply the changes.
Note Notes:
  • The value used above is negative because it represents the amount of time to be deducted from the default 750 milliseconds. It can be a number (of seconds) or an explicit duration, like: -0.4 or -400ms. It cannot exceed 600ms to avoid buffer underflow when the latency is too low to handle network delay variations.
  • In case of a reliable RTP stream, is it possible to further reduce the stream decoding latency by one frame (25ms or 33ms, depending on the stream frame rate) by adding the "spx:packetization" attribute set to "compliant".

Reduce rendering latency

By default, the player is conservatively configured to buffer 1 second of content rendering to ensure smooth output at the configured frame rate. The rendering latency can be easily reduced down to 250 milliseconds from Control CenterAdvanced Applications → Interactivity page. For more details, see how to reduce the rendering latency.

It is possible to further reduce the player rendering latency to ultra-low values using a configuration file:

  1. Download the "Ultra-low latency configuration" archive on the right side, which contains three configuration files for setting the player rendering latency to 50ms (config_50ms.xml), 100ms (config_100ms.xml), or 200ms (config_200ms.xml).
  2. Extract the desired configuration file.
  3. Open Control Center and find the "Quick Links" section.
  4. Click on "Restore Config".
  5. Browse and select the configuration file extracted above. Click "Open".
  6. Click on the "Restart Now" button to apply the new configuration.

See also

This page was last modified on 26 June 2024, at 16:54.