Moving forward with Live Stream Video Delivery
Many popular apps offer live stream as a feature integration like Twitch and Youtube Live. With the ever increasing users drawn towards video based services, as seen with the trending race to top Youtube subscribed, the technology behind video delivery is equally increasing in importance. While most service will integrate video as a VOD like much of Youtube or DouYin, the challenge lies with live video delivery.
So what’s available?
There are many solutions available and is dependent on use case, but there are mainly 2 options, RTMP and DASH/HLS. While HLS is an option and having the much larger market share compared to DASH, DASH is vastly superior in terms of feature offering with DASH being able to support the majority of features of HLS. Many workflows are also switching to or dual supporting DASH with HLS.
What’s the difference?
- Persistent TCP connection
Requiring a persistent TCP connections is a double edged sword. It removes the connection overhead compared to a segment based delivery protocol over HTTP.
- Low Latency
Being a pushed based delivery allows RTMP to achieve very low latency with potential to go as low as 0.5s.
- HTTP Based
Being a segment based delivery over HTTP, this is huge plus(mostly). This means that DASH can take advantage of existing HTTP knowledge and infrastructure and any advancement in the HTTP spec. It can also take advantage of persistent connections in HTTP/1.1 or HTTP/2.0.
- Adaptive Streaming
One of DASH’s main goals was to support multiple streams and the ability to seamlessly switch between them. The purpose for this was to support multiple bit rates so that the client can use the best fit for their case, reducing bandwidth requirements.
- Wider Container/Codec Support
DASH is designed to be flexible, supporting MP4 and MPEG-TS and newer codecs such as HEVC and AV1.
While mainly used for ad insertion, it is very straight forward to break a stream in progress.
- Content Protection
Applications wanting to control content on devices have Fairplay, Widevine, PlayReady
- Controlling Group
Unlike RTMP where Adobe is the sole developer, DASH was created from the cooperation between many groups (Google, Apple, Microsoft to name a few) and not owned by any single company.
RTMP, being a proprietary protocol developed by Adobe(Macromedia) which uses FLV, requires Flash to be usable on web browsers. With Flash being long gone, there is no straightforward way to support RMTP in browsers. Instead, support in modern browsers is via FLV over HTTP (via flv.js) resulting in increased management overhead. Technology momentum is also very important. Like with any technology, it should improve over time, but advancements to RMTP are nearly non-existent and has lost momentum over the years to other protocols like DASH, HLS and WebRTC.
DASH also has areas that need to be addressed with latency being one of the biggest. For applications that require near realtime/ultra low latency, DASH is not quite there yet. CMAF aims to improve this by introducing a specification on the encoding and transfer process.
Paving the Road Ahead
HTTP/2.0 Server Push
While Server Push being relatively unused, in terms of video delivery, it can help move DASH even closer to RMTP in terms of latency by pushing segments immediately after encoding has finished.
QUIC (aka HTTP/3.0)
As mentioned above, being HTTP is a huge plus. With QUIC being standardized as HTTP/3.0, this mean DASH will in-essence receive free UDP support in addition to better network switching and a more efficient TLS connection.
CMAF Low Latency
Common Media Application Format for Low Latency is a encoding and transfer specification aimed to reduce latency by essentially sending IDRs as soon as they are encoded without waiting for the entire segment to encode.
While RMTP still have clear use cases in publishing and low latency viewing, it is quickly being replaced. Without a clear roadmap for RTMP and with DASH closing the gap on low latency, it seems very likely that DASH will come out the solution of choice in the coming years.