Support

Why is there a live streaming delay?

Unfortunately there is always a slight delay when you live stream. That is due to the steps involved in getting your ingested video out to your viewers:

Once your stream is received from the server assigned to process it, it first needs to be transcoded from RTMP to another format. We use the most popular format, HLS (HTTP Live Streaming). In addition, multiple bitrates are output. So for your one incoming stream, we make multiple renditions.

HLS uses a master playlist (.m3u8) file. That references sub-manifests. Each of those reference segment files (usually .ts or .mp4). For live streaming, Apple currently recommends using segments that are 6 seconds however that is not a strict requirement and so we try and use shorter 2 or 4 seecond segments where possible to reduce latency. According to Apple’s latest specification, a HLS manifest must contain at least six of those segments.

Once a segment is available, that file is copied from the transcoding server to the origin from where it can be globally replicated using a content delivery network (CDN).

Why not simply output RTMP, instead of HLS?

It is possible to reduce the live streaming delay by using the RTMP protocol for the output too. RTMP is a proprietary protocol developed by Macromedia (now owned by Adobe) and remains a standard method for input. RTMP has several problems when used for output though:

  • many firewalls do not automatically allow it (it uses a different port than normal HTTP/HTTPS) and so tricks such as RTMPT need to be used to “tunnel” it through.
  • it is hard to scale RTMP streaming (whereas HLS uses common text/binary files for which content delivery networks were designed to scale).
  • RTMP can not be played natively by web browsers (unlike a format like HLS, which browsers such as Safari and Edge do support natively).
  • RTMP is not supported within HTML5. This means you need to have a plug-in installed to play a RTMP stream. That plug-in is likely Adobe’s Flash player. However many devices do not support Flash. Famously Apple decided not to support it within iOS. Many desktops no longer support it either as it has numerous security issues. Just this patch closed 23 separate security bugs: http://www.bbc.co.uk/news/technology-35783558. As it states: “A lot of web firms have now stopped using Flash in a bid to thwart attackers”.

Hence we use HLS for delivering our live streams. We are also investigating newer formats, like SRT.

If you have any more questions about our live streaming, our video CMS or business video hosting, please email [email protected].

Go back

Updated: September 25, 2023