GitHub open source project Address: https://github.com/makewheels-zzq/ml-live
Principle live.
1. Air is generally used to push the device to capture audio and video services.
2. server doing a forward broadcast to the audience below.
3. After this complete their audio and video streaming video decoding apparatus is performed.
Processing live.
1.推流端:采集,美颜处理,编码,推流处理.
2.服务器端处理:转码,录制,截图,鉴黄.
3.播放器:拉流,解码,渲染.
4.互动系统:聊天室,礼物系统,点赞.
Live process.
demand analysis.
PC end plug flow: share your desktop, audio and video
servers: transcoding, recording
PCWEB: video player, IM
mobile terminal applications: video player, IM
IM: public chat, kicking, gag.
Self streaming.
case analysis:
Chat system architecture.
Http long connection
ps: WebSocket connections based on the length.
websocket:
IM instant messaging
方案选用Java+netty框架搭建聊天室.
RTMP
The advantages of using RTMP.
TCP three-way handshake
FLV agreement
Application in live in.
advantage
HLS protocol
Chart #
advantage
Disadvantages:
Various agreements comparison:
Advantages and disadvantages of each protocol has. Depends on the specific application scenarios. For example, some mobile phone side browser, you may have to be written in hls agreement.
WebRTC
Architecture:
Scenarios
RTP protocol:
Protocol format:
Belongs level:
WebRTC open source program
WebRTC and RTMP contrast
- Here what vibrato fighting fish eye teeth like pepper can support a lot of concurrency and CDN is a certain relationship.
Delay:
SRS Introduction
SRS is positioned carrier-class Internet live server cluster, the concept of integrity and the pursuit of better simplest implementation of the code. SRS provides abundant access scheme to access SRS RTMP streams, including to push RTMP SRS, push RTSP / UDP / FLV to SRS, SRS pulling flows. SRS also supports access RTMP streams various changes, such as the flow RTMP code stream theme, forwarded to other servers, turn encapsulated in HTTP-FLV streams encapsulated into HLS turn, turn encapsulated into HDS, recorded as FLV. SRS includes key features such as support large clusters CDN services, such as RTMP multilevel clustering, the source station cluster, VHOST virtual servers, uninterrupted service Reload, HTTP-FLV cluster, Kafka docking. In addition, SRS also provides a rich application interfaces, including HTTP callback security policy Security, HTTP API interfaces, RTMP speed. SRS and the source station CDN clusters have been widely Applications.
SRS Architecture
System Architecture:
Modular Architecture:
SRS Streaming Architecture
Reference
[. 1] https://github.com/ossrs/srs/wiki/v3_CN_Home
[2] [https://github.com/ossrs/srs/tree/2.0release#usage]
After a comparison of the respective protocols. My next article will be updated for a long time have come up with the SRS-based docker live server. In this article and in a step by step to build a good development environment.