In this post, we will talk about the available streaming protocols without any deep technical details. Also, we will compare them in terms of Latency.
First of all let’s define, “Media Streaming”, “Streaming Protocol” and “Latency”:
Media streaming is the transfer of media data from source to target. This media can be a file or live data captured by the camera at the moment.
Streaming Protocols define the rules of this transfer such as data chunk size, send period, etc.
Latency is the time difference between the moment when an event occurs and the moment the viewer sees the event. But in view of a streaming protocol, it is the time difference between the moment when the source captures data and the moment the receiver receives the data.
According to this document latency is categorized as follows:
Reduced Latency: 6-12 seconds
Low Latency: 2-6 seconds
Ultra Low Latency: 0.2-2 seconds
I think the best way to list and compare the streaming protocol is to make a table. Streaming protocols are sorted from high to low latency in the following table.
|MPEG-DASH||High Latency||Will be supported|
|Apple HLS||High Latency||Yes|
|Adobe HDS||Reduced Latency||–|
|MS Smooth Streaming||Reduced Latency||–|
|HLS (in AMS)||Low Latency||Yes|
|RTMP (in AMS)||Low Latency||Yes|
|RTSP/RTP||Low Latency||RTSP Pulling Supported|
Ant Media Server
Ant Media Server (AMS) supports WebRTC and RTMP protocols in publishing side. AMS provides both low latency with HLS and RTMP, and also ultra-low latency with WebRTC. Latency values for AMS are as follows:
- Ultra-Low Latency with WebRTC is about 0.5 second.
- Low Latency with RTMP is about 2 seconds.
- Low Latency with HLS is about 10 seconds.
AMS main strength is the ultra-low latency WebRTC streaming. Beside ultra-low latency, AMS provides adaptive bitrate streaming and also scalable solutions on cloud.