2
0

Architecture.md 18 KB

Architecture

The architecture of SRS.

Note: Please read Wiki: Gettting Started( EN / CN ) first.

Architecture

The stream architecture of SRS.

+----------+             +----------+
| Upstream |             |  Deliver |
+---|------+             +----|-----+
+---+------------------+------+---------------------+----------------+
|     Input            | SRS(Simple RTMP Server)    |     Output     |
+----------------------+----------------------------+----------------+
|                      |   +-> DASH ----------------+-> DASH player  |
|    Encoder(1)        |   +-> RTMP/HDS  -----------+-> Flash player |
|  (FMLE,OBS,   --RTMP-+->-+-> HLS/HTTP ------------+-> M3U8 player  |
|  FFmpeg,XSPLIT,      |   +-> FLV/MP3/Aac/Ts ------+-> HTTP player  |
|  ......)             |   +-> Fowarder ------------+-> RTMP server  |
|                      |   +-> Transcoder ----------+-> RTMP server  |
|                      |   +-> EXEC(5) -------------+-> External app |
|                      |   +-> DVR -----------------+-> FLV file     |
|                      |   +-> BandwidthTest -------+-> Flash        |
|                      |   +-> WebRTC --------------+-> Flash        |
+----------------------+                            |                |
|    WebRTC Client     |   +--> RTMP                |                |
| (H5,Native...) --RTC-+---+---> WebRTC ------------+-> WebRTC Client|
+----------------------+                            |                |
|  MediaSource(2)      |                            |                |
|  (RTSP,FILE,         |                            |                |
|   HTTP,HLS,   --pull-+->-- Ingester(3) -(rtmp)----+-> SRS          |
|   Device,            |                            |                |
|   ......)            |                            |                |
+----------------------+                            |                |
|  MediaSource(2)      |                            |                |
|  (MPEGTSoverUDP      |                            |                |
|   HTTP-FLV,   --push-+->- StreamCaster(4) -(rtmp)-+-> SRS          |
|   SRT,               |                            |                |
|   ......)            |                            |                |
+----------------------+                            |                |
|  FFMPEG --push(srt)--+->- SRTModule(5)  ---(rtmp)-+-> SRS          |
+----------------------+----------------------------+----------------+

Remark:

  1. Encoder: Encoder pushs RTMP stream to SRS.
  2. MediaSource: Supports any media source, ingesting by ffmpeg.
  3. Ingester: Forks a ffmpeg(or other tools) to ingest as rtmp to SRS, please read Ingest.
  4. Streamer: Remuxs other protocols to RTMP, please read Streamer.
  5. EXEC: Like NGINX-RTMP, EXEC forks external tools for events, please read [ng-exec][v4_CN_NgExec].
  6. SRTModule: A isolate module which run in hybrid model.

System Requirements

Supported operating systems and hardware:

  • Linux, with x86, x86-64 or arm.
  • Mac, with intel chip.
  • Other OS, such as Windows, please use docker.