Transmission and Storage in OTT and RTC: A Deep Dive into Streaming Protocols

Tencent RTC-Dev Team
Spt 26, 2024

In the rapidly evolving landscape of Over-the-Top (OTT) and Real-Time Communication (RTC) technologies, the transmission and storage of packaged media files play a crucial role. This comprehensive blog post will explore the various streaming protocols used for transmitting and storing audio-visual content, their applications, characteristics, and the factors to consider when choosing the right protocol for your project.

The Necessity of Streaming Protocols

Once audio and video data are encoded and packaged, they need to be transmitted to the end-user or stored for later access. This is where streaming protocols come into play. These protocols, which are an integral part of streaming media technology, facilitate the efficient transfer of media files over networks, ensuring that content reaches the viewer in a timely and organized manner.

Streaming protocols serve as the bridge between the content source and the viewer, much like a transportation system for digital media. They define how data is formatted, transmitted, and received, ensuring compatibility between different systems and devices.

Categories of Streaming Protocols

Streaming protocols can be broadly categorized based on their primary applications:

Live Streaming Protocols:

  • Examples: RTMP, HDL, HLS
  • Use case: Real-time broadcasting of events, live TV, sports

Video-on-Demand (VOD) Protocols:

  • Examples: HTTP, HLS
  • Use case: Streaming pre-recorded content like movies or TV shows

Audio-Video Call Protocols:

  • Examples: RTP/RTCP, UDP
  • Use case: Video conferencing, VoIP calls

Video Surveillance Protocols:

  • Examples: RTP/RTCP, RTSP
  • Use case: CCTV systems, security cameras

Additionally, signaling protocols like SIP (Session Initiation Protocol) and SDP (Session Description Protocol) are used to control various aspects of the streaming process. These are particularly important in telecommunications for initiating, modifying, and terminating multimedia sessions.

The Role and Importance of Streaming Protocols

To better understand the role of streaming protocols, we can draw an analogy with transportation systems:

Streaming Protocols = Vehicles: Just as different vehicles are suited for different types of cargo and routes, different streaming protocols are optimized for various types of content and network conditions.

Audio-Video Data = Cargo: The media content is the payload being transported from the source to the destination.

Network Infrastructure = Roads: The quality and capacity of the network infrastructure affect how efficiently the protocols can operate, much like how road conditions impact vehicle performance.

Just as vehicles have different capacities, speeds, and fuel efficiencies, streaming protocols have varying capabilities:

  • Format Support: Some protocols support multiple encoding formats (e.g., RTMP), while others are more limited.
  • Latency: Protocols like RTMP offer lower latency compared to HLS, making them more suitable for live interactions.
  • Adaptability: Protocols like HLS excel in adapting to changing network conditions through adaptive bitrate streaming.
  • Compatibility: Some protocols (like HLS) have broader device and player support, while others may require specific software or plugins.

Detailed Comparison of Common Streaming Protocols

Let's dive deeper into some of the most commonly used streaming protocols:

FeatureRTMPHLSHDLProprietary Protocols
ProtocolTCP (long connection)HTTP (short connection)HTTP (long connection)Usually UDP
PrincipleData received and forwarded immediatelyAggregates data over time, creates TS segments, updates m3u8 indexSimilar to RTMP, uses HTTP (port 80)Private encapsulation based on UDP
Latency1-3 seconds5-20 seconds (depends on segmentation)1-3 secondsCan be as low as 100ms
H5 SupportRequires pluginSupports H5Requires pluginDepends on implementation
Pros

Low latency

Supports multiple encoding formats

Good for live streaming

Widely supported across devices

Adaptive bitrate streaming

Works well with CDNs

Lower latency than HLS

Uses standard HTTP port (80)

 Easier to traverse firewalls

Can achieve very low latency

Customizable for specific use cases

Cons

Requires Flash support (being phased out)

 Can be blocked by firewalls

Higher latency

Multiple requests needed for playback

Less widely supported than HLS or RTMP

Non-standard protocol

Limited compatibility

Requires specific software support

Best Use CaseLive streaming with low latency requirementsAdaptive bitrate streaming for wide device compatibilityLow latency streaming through firewallsUltra-low latency applications with specific requirements
ScalabilityGoodExcellentGoodVaries
Adaptive BitrateLimitedYesLimitedDepends on implementation
SecurityCan be encryptedSupports encryptionCan be encryptedDepends on implementation

Factors to Consider When Choosing a Streaming Protocol

When selecting a streaming protocol for your OTT or RTC application, consider the following factors:

Latency Requirements: For interactive applications like video calls or live game streaming, low-latency protocols are crucial.

Scalability: Some protocols work better with Content Delivery Networks (CDNs) for large-scale distribution.

Device Compatibility: Consider the devices and platforms your audience will use to access the content.

Adaptive Bitrate Support: This is crucial for delivering smooth experiences across varying network conditions.

Content Type: Live streaming has different requirements compared to video-on-demand.

Network Conditions: Some protocols perform better in challenging network environments.

Security Requirements: Consider protocols that support encryption if you're dealing with sensitive content.

The Future of Streaming Protocols

As technology continues to evolve, we're seeing new protocols emerge and existing ones adapt:

  • WebRTC: Gaining popularity for its low-latency, browser-based communication capabilities.
  • CMAF (Common Media Application Format): Aims to unify streaming formats for more efficient delivery.
  • SRT (Secure Reliable Transport): Designed for low-latency streaming over unpredictable networks.

Conclusion

Understanding the characteristics and applications of different streaming protocols is crucial for developers and engineers working in OTT and RTC technologies. The choice of protocol can significantly impact the performance, latency, and compatibility of your streaming solution.

While RTMP has been a staple for low-latency streaming, its reliance on Flash is pushing the industry towards alternatives. HLS, with its excellent compatibility and adaptive bitrate streaming, continues to be popular despite higher latency. Newer protocols and proprietary solutions are pushing the boundaries of what's possible in terms of latency and quality.

As the streaming landscape continues to evolve, staying informed about these developments is key to designing and implementing effective streaming solutions. The ideal protocol choice will depend on your specific use case, target audience, and technical requirements. By carefully considering these factors, you can ensure that your OTT or RTC application delivers the best possible experience to your users.