RTMP(Real-Time Messaging Protocol)
- works on top of TCP and uses port number 1935 by default
- RTMPS, which is RTMP over a TSL/SSL connection
RTMP,HLS, and WebRTC
What is a Streaming Protocol? Video Streaming Protocol
Video->chunks->transport->reassemble
What is RTMP? RTMP
- streaming protocol
- low latency streaming
- RTMP has taken a new role in live streaming. Ingesting media from the encoder or other source to a video streaming platform.
- the most accessible and affordable option since it works with most modern encoders, including many free encoding software.
- ❗️不兼容很多的视频播放器(not compatible with more modern video players)
- ✅ very effective in its ingestion role
What is HLS? HLS
- developed by Apple from streaming with an HTML5 video player
- RTMP delivery to the Adobe Flash player —> HLS delivery to the HTML5 video player
- HLS is very secure
- produces high-quality steams
- supports adaptive bitrate steaming (at the professional broadcasting level)
- both delivery(更多场景) and ingest(和编码器encoders的兼容还不太好)
- ❗️latency of 15-30 seconds (时延比较高)
What is WebRTC? WebRTC
- rather than a protocol
- was created to support web conferencing and VoIP
- make peer-to-peer streaming with real-time latency possible
- adaptive bitrate streaming
WebRTC Tutorial
- Audience
- Prerequisites
- Basic Scheme
- Media Capture
- codec: H.264, iSAC, Opus and VP8
- Transportation Layer
- Session Management
- Browser Compatibility
- Trying out WebRTC: apprtc
Comaring RTMP vs. HLS vs. WebRTC
- HLS delivery with RTMP ingest. Low latency, ultra-compatibility, affordability
- HLS delivery + RTMP ingest
- HLS delivery + HLS ingest(编码器支持的少)
- WebRTC: more and more popular. 主要的限制:编码器支持的少
- professional broadcasting level比较低(不能选择bitrate?)
WebSocket
- over HTTP
- ws/wss
container format
Design Philosophy
there should be minimal framing It is expected that metadata would be layered on top of WebSocket by the application layer, in the same way that metadata is layered on top of TCP by the application layer (e.g., HTTP).
- adds a web origin-based security model for browsers
- adds an addressing and protocol naming mechanism to support multiple services on one port and multiple host names on one IP address
- layers a framing mechanism on top of TCP to get back to the IP packet mechanism that TCP is built on, but without length limits
- includes an additional closing handshake in-band that is designed to work in the presence of proxies and other intermediaries
Security Model
Relationship to TCP and HTTP
Security considerations
Proxy traversal
Establishing a Connection
Subprotocols Using the WebSocket Protocol
references
- RTMP
- HTTP Live Streaming
- WebRTC
- WebRTC Tutorial
- WebSocket
- The WebSocket Protocol
- aws-live-streaming
- DASH
https://www.tutorialspoint.com/webrtc/webrtc_overview.htm https://en.wikipedia.org/wiki/Dynamic_Adaptive_Streaming_over_HTTP https://www.ibm.com/ibm/history/exhibits/builders/builders_bloch.html https://www.cgl.ucsf.edu/Outreach/pc204/NoSilverBullet.html?spm=ata.21736010.0.0.887316fdudx1ZT https://architecturenotes.co/fallacies-of-distributed-systems/