support Contact Support | system status System Status
Page Contents

    Reducing Latency for Live Streams

    This topic explains how you can reduce latency for you Brightcove Live streams.

    Introduction

    Latency is the time lag between the when something is recorded in real life and when it is seen in a video player. There is, of course, some real time required to transmit a signal from the source through the internet to a viewers player. Latency is aggravated by the fact that online video is transmitted in discreet chunks, called segments.

    Latency can be reduced by shortening the length of the video segments, and the following sections will detail how you can do this. Be aware, however, that there is a tradeoff: to insure uninterrupted playback, the player downloads a few video segments ahead of the current playback position (this is called buffering), so that they are ready when needed. If you shorten the length of segments, the player will be pre-fetching less video data, and chances of playback pausing while the player buffers additional segments will be increased.

    Additional limitations

    The following limitations apply to Live streams using reduced latency:

    • SSAI is not supported
    • DRM is not supported
    • The DVR window must be less than 5 minutes
    • No more than 4 renditions

    Creating Reduced Latency Live Profile

    To reduce latency, you will need to create a custom Live profile. Follow the steps below:

    1. Login to Studio
    2. Go to Admin > Ingest Profiles:
      Go to Ingest Profiles
      Go to Ingest Profiles
    3. Select one of the Live ingest profiles with no more than 4 renditions:
      Select a Live Profile
      Select a Live Profile
    4. Click on the link to open the profile
    5. Click on the Duplicate button to create a new profile based on this one
    6. In the new profile, change the name to "Low Latency Profile" (or whatever you want to call it)
    7. For each of the renditions, change the segment_seconds to 2 to reduce the length of the segments to 2 seconds
    8. Your whole profile should look something like this:
      {
        "model_version": 1,
        "name": "Low Latency Profile",
        "description": "Deliver high-quality renditions to maximize quality for desktop and OTT.",
        "account_id": "57838016001",
        "renditions": [
          {
            "media_type": "video",
            "format": "ts",
            "segment_seconds": 2,
            "label": "hls1080p",
            "live_stream": true,
            "video_codec": "h264",
            "video_bitrate": 4000,
            "keyframe_interval": 60,
            "width": 1920,
            "height": 1080,
            "h264_profile": "high"
          },
          {
            "media_type": "video",
            "format": "ts",
            "segment_seconds": 2,
            "label": "hls720p",
            "live_stream": true,
            "video_codec": "h264",
            "video_bitrate": 2400,
            "keyframe_interval": 60,
            "width": 1280,
            "height": 720,
            "h264_profile": "high"
          },
          {
            "media_type": "video",
            "format": "ts",
            "segment_seconds": 2,
            "label": "hls540p",
            "live_stream": true,
            "video_codec": "h264",
            "video_bitrate": 1700,
            "keyframe_interval": 60,
            "width": 960,
            "height": 540,
            "h264_profile": "main"
          },
          {
            "media_type": "video",
            "format": "ts",
            "segment_seconds": 2,
            "label": "hls360p",
            "live_stream": true,
            "video_codec": "h264",
            "video_bitrate": 900,
            "keyframe_interval": 60,
            "width": 640,
            "height": 360,
            "h264_profile": "main"
          }
        ],
        "packages": []
      }
    9. To use this profile, select when you create a new Live Event in the Live module:
      Create Live Event
      Create Live Event

    Using the Live API

    If you want reduced latency, and you use the Live API to create your live jobs, just create the job as you normally do, but include no more than 4 renditions, and set segment_seconds for each rendition to 2. Also, make sure that observe the other limitations listed in the Introduction.


    Page last updated on 18 Mar 2020