AWS for M&E Blog

Guest post from Videon: Low latency live streaming with Videon and AWS Elemental

Guest post by Videon

The content and opinions in this post are those of the third-party author and AWS is not responsible for the content or accuracy of this post.

Low latency live video has typically been synonymous with traditional broadcasting. Being able to achieve 4-8 seconds of system latency has been hard to match with HTTP based live streaming over IP. But what if every broadcaster (no matter the size) could achieve less than 4 seconds of latency at scale? An entirely new set of applications would become possible.

Less than 4 seconds of latency provides live streaming options to a variety of companies. Take for instance a company that supports horse racing. A low latency solution enables the company to field a product that enables video from the horse race track finish line to be sent to a central adjudication point where sanctioned officials can judge the outcome of the race. Low latency live streaming eliminates the need for costly broadcast equipment.

Similarly, low latency can be impactful for a company looking to live stream a surgery. Currently, that company might only have been able to support surgery live streaming using Microwave links, Satellite links, and Fiber links in order to have a private network capable of low latency video. With Videon and AWS Elemental Media Services, this company has the ability to use a standard IP connection to achieve their latency needs. This can significantly change their cost to stream and simplifies their workflow.

Achieving sub-4 second latency started with Videon and AWS Elemental working to validate a workflow that features Videon’s EdgeCaster 4K HEVC/H.264 encoder. This solution provides customers who need an RTMP-based workflow with a high-quality live stream that has been validated over an extended time period and can be viewed on a wide range of consumer devices. Customers using Videon’s Shavano encoder interested in low latency streaming can contact Videon to discuss your work flow and determine the best solution for your needs.

Setting up a connection to AWS Elemental MediaLive via Videon’s RTMP output is simple via our Web user interface (UI).

With Videon’s RTMP interface to MediaLive validated, Videon’s effort focused on low latency in anticipation of supporting online auctions, education, security, sports betting, and a host of other applications. Videon’s team extended the capability of EdgeCaster to creates HLS segments and manifest and push them directly to AWS Elemental MediaStore. This enables edge devices to pull the HLS streams directly off of MediaStore, or Amazon CloudFront, thus greatly reducing latency.

Enabling the HLS output from Videon’s EdgeCaster product is as simple as the RTMP configuration as seen in the WebUI representation below.

HLS

The HLS Push URL is found on the AWS Elemental MediaStore console. The URL is the Data Endpoint field for the MediaStore container that the HLS stream will be sent to.

Container

The last step before enabling the HLS Output on the Videon device is to set up the container policy to accept a stream from the source location.

{
  "Version" : "2012-10-17",
  "Statement" : [ {
    "Sid" : "MediaStoreFullAccess",
    "Effect" : "Allow",
    "Principal" : {
      "AWS" : "arn:aws:iam::[ACCOUNT_ID]:root"
    },
    "Action" : "mediastore:*",
    "Resource" : "arn:aws:mediastore:[SERVER]:[ACCOUNT_ID]:container/VideonTest/*",
    "Condition" : {
      "Bool" : {
        "aws:SecureTransport" : "true"
      }
    }
  }, {
    "Sid" : "CrossAccountRolePostOverHttps",
    "Effect" : "Allow",
    "Principal" : "*",
    "Action" : [ "mediastore:PutObject", "mediastore:DeleteObject", "mediastore:GetObject", "mediastore:DescribeObject" ],
    "Resource" : "arn:aws:mediastore:[SERVER]:[ACCOUNT_ID]:container/VideonTest/*",
    "Condition" : {
      "Bool" : {
        "aws:SecureTransport" : "true"
      },
      "IpAddress" : {
        "aws:SourceIp" : [ "[YOUR_PUBLIC_IP]" ]
      }
    }
  }, {
    "Sid" : "PublicReadOverHttps",
    "Effect" : "Allow",
    "Principal" : "*",
    "Action" : [ "mediastore:GetObject", "mediastore:DescribeObject" ],
    "Resource" : "arn:aws:mediastore:[SERVER]:[ACCOUNT_ID]:container/VideonTest/*",
    "Condition" : {
      "Bool" : {
        "aws:SecureTransport" : "true"
      }
    }
  } ]
}

The information for [ACCOUNT_ID], [SERVER], and [YOUR_PUBLIC_IP] must be filled in. After filling in those fields, click Save. The first instances of [ACCOUNT_ID] and [SERVER] should be present in the default container policy. [YOUR_PUBLIC_IP] can be found by searching ‘What is my IP’ online.

With HLS output, playback on a Chrome browser is able to be set up by assigning a web URL.

Playback

The EdgeCaster was configured to send 1-second HLS segments and also set to the “Lowest Latency” preset, which removes all B-frames. This combination of settings allows Videon devices to stream with minimal latency.

Videon used a stopwatch and then took pictures from a phone to record both the source and the encoded result. As seen in the example picture below, they were able to measure 3.6 seconds of latency using the referenced workflow. This is a significant decrease from the 20-30 seconds of latency when using RTMP via AWS Elemental MediaLive and AWS Elemental MediaStore.

Low Latency

Videon’s implementation of support for both RTMP into AWS Elemental MediaLive and HLS into AWS Elemental MediaStore provides developers more options when considering their workflow requirements. When a traditional workflow is needed, RTMP in conjunction with AWS Elemental MediaLive enables the wide range of features presented by AWS Elemental MediaLive. But when low latency is required, the power of Videon’s EdgeCaster technology enables an HLS output that interfaces directly to MediaStore and in turn enables low latency live streaming that is comparable to the traditional broadcast methodology.

Kiran Patel

Kiran Patel

Kiran Patel is the Head of Product Marketing for Media Services and Media & Entertainment at AWS, responsible for product marketing for the AWS Elemental Media Services and Amazon IVS, helping customers learn how to utilize AWS and Media Services to build scalable, reliable, secure, and cost-effective media workflows. Prior to joining AWS, Kiran worked with the BBC on live streaming and VOD workflows for their News, Sport, and iPlayer products. He has over 20 years of experience working with OTT video.