Note The third-party tools that are described in this topic are only for reference. Alibaba Cloud does not make a guarantee in any form for the performance and reliability of the third-party tools, and potential impacts of operations on these tools.

Problem description

When I use a third-party stream ingest tool to ingest live streams in the M3U8 format, the latency reaches more than 50 seconds.

Solution

In normal cases, the latency of live streams in the M3U8 format ranges from 10 to 35 seconds. If the latency exceeds the range, perform the following steps.

Server

You can follow these steps to modify the latency configuration for live streaming:
  1. Log on to the ApsaraVideo Live console.
  2. In the left-side navigation pane, click Domains. On the page that appears, find the domain name that you want to configure and click Domain Settings in the Actions column.
  3. In the left-side navigation pane of the domain name settings page, click Templates > Latency Settings. On the page that appears, click Change Settings.
  4. You can set the latency of streams over each protocol to low and click OK.
    Note
    • The actual latency depends on the latency settings and the GOP size of the ingested stream. For example, if you set the Real-Time Messaging Protocol (RTMP) latency to medium for a stream whose GOP size is 2 seconds, the actual latency is 2 seconds to 6 seconds.
    • A too low latency may cause an increased stuttering rate. We recommend that you configure the latency level based on your business requirements.
  5. Check whether the latency for live streaming is reduced. If not, see the following section and try to modify the latency settings for live streaming on the stream ingest side.

Stream ingest

Different configuration methods apply to different third-party tools.
  • Open Broadcaster Software (OBS)
    1. In the menu bar of OBS, click File and then Settings. 1
    2. In the left-side navigation pane of the dialog box that appears, click Output. Set Output Mode to Advanced. 2
    3. Set Keyframe Interval to 2 and click OK.
  • Adobe Flash Media Live Encoder (FMLE)
    1. In FMLE, click Encoding Options.
    2. Click the settings icon on the right of Format. In the dialog box that appears, set Keyframe Frequency to 5 seconds. 3
    3. Click OK.