正在显示
1 个修改的文件
包含
39 行增加
和
16 行删除
1 | #Simple-RTMP-Server | 1 | #Simple-RTMP-Server |
2 | -================== | ||
3 | 2 | ||
4 | SRS(SIMPLE RTMP Server) over state-threads created in 2013.10. | 3 | SRS(SIMPLE RTMP Server) over state-threads created in 2013.10. |
5 | 4 | ||
@@ -42,7 +41,7 @@ A big THANK YOU goes to: | @@ -42,7 +41,7 @@ A big THANK YOU goes to: | ||
42 | * [FFMPEG](http://ffmpeg.org/) and [libx264](http://www.videolan.org/) group for srs to use to transcode. | 41 | * [FFMPEG](http://ffmpeg.org/) and [libx264](http://www.videolan.org/) group for srs to use to transcode. |
43 | * Guido van Rossum for creating Python for api-server for srs. | 42 | * Guido van Rossum for creating Python for api-server for srs. |
44 | 43 | ||
45 | -### Usage | 44 | +## Usage |
46 | 45 | ||
47 | <strong>Step 1:</strong> get SRS <br/> | 46 | <strong>Step 1:</strong> get SRS <br/> |
48 | <pre> | 47 | <pre> |
@@ -70,12 +69,12 @@ cd simple-rtmp-server/trunk | @@ -70,12 +69,12 @@ cd simple-rtmp-server/trunk | ||
70 | [Usage: Solution using SRS?](https://github.com/winlinvip/simple-rtmp-server/wiki/Sample)<br/> | 69 | [Usage: Solution using SRS?](https://github.com/winlinvip/simple-rtmp-server/wiki/Sample)<br/> |
71 | [Usage: Why SRS?](https://github.com/winlinvip/simple-rtmp-server/wiki/Product)<br/> | 70 | [Usage: Why SRS?](https://github.com/winlinvip/simple-rtmp-server/wiki/Product)<br/> |
72 | 71 | ||
73 | -### System Requirements | 72 | +## System Requirements |
74 | Supported operating systems and hardware: | 73 | Supported operating systems and hardware: |
75 | * All Linux , both 32 and 64 bits | 74 | * All Linux , both 32 and 64 bits |
76 | * All handware. | 75 | * All handware. |
77 | 76 | ||
78 | -### Summary | 77 | +## Summary |
79 | 01. Simple: also stable enough.<br/> | 78 | 01. Simple: also stable enough.<br/> |
80 | 02. [High-performance](https://github.com/winlinvip/simple-rtmp-server/wiki/Performance): single-thread, async socket, event/st-thread driven.<br/> | 79 | 02. [High-performance](https://github.com/winlinvip/simple-rtmp-server/wiki/Performance): single-thread, async socket, event/st-thread driven.<br/> |
81 | 03. With RTMP edge server, support origin server.<br/> | 80 | 03. With RTMP edge server, support origin server.<br/> |
@@ -119,7 +118,7 @@ Supported operating systems and hardware: | @@ -119,7 +118,7 @@ Supported operating systems and hardware: | ||
119 | 41. [no-plan] Support RTMPT, http to tranverse firewalls<br/> | 118 | 41. [no-plan] Support RTMPT, http to tranverse firewalls<br/> |
120 | 42. [no-plan] Support file source, transcoding file to live stream<br/> | 119 | 42. [no-plan] Support file source, transcoding file to live stream<br/> |
121 | 120 | ||
122 | -### Performance | 121 | +## Performance |
123 | 1. 300 connections, 150Mbps, 500kbps, CPU 18.8%, MEM 5956KB. | 122 | 1. 300 connections, 150Mbps, 500kbps, CPU 18.8%, MEM 5956KB. |
124 | 2. 600 connections, 300Mbps, 500kbps, CPU 32.1%, MEM 9808KB. | 123 | 2. 600 connections, 300Mbps, 500kbps, CPU 32.1%, MEM 9808KB. |
125 | 3. 900 connections, 450Mbps, 500kbps, CPU 49.9%, MEM 11MB. | 124 | 3. 900 connections, 450Mbps, 500kbps, CPU 49.9%, MEM 11MB. |
@@ -143,7 +142,7 @@ usr sys idl wai hiq siq| read writ| recv send| in out | int csw | @@ -143,7 +142,7 @@ usr sys idl wai hiq siq| read writ| recv send| in out | int csw | ||
143 | </pre> | 142 | </pre> |
144 | See also: [Performance Test Guide](https://github.com/winlinvip/simple-rtmp-server/wiki/Performance) | 143 | See also: [Performance Test Guide](https://github.com/winlinvip/simple-rtmp-server/wiki/Performance) |
145 | 144 | ||
146 | -### Releases | 145 | +## Releases |
147 | * 2013-12-25, [Release v0.9](https://github.com/winlinvip/simple-rtmp-server/releases/tag/0.9), support bandwidth test, player/encoder/chat demos. 20926 lines.<br/> | 146 | * 2013-12-25, [Release v0.9](https://github.com/winlinvip/simple-rtmp-server/releases/tag/0.9), support bandwidth test, player/encoder/chat demos. 20926 lines.<br/> |
148 | * 2013-12-08, [Release v0.8](https://github.com/winlinvip/simple-rtmp-server/releases/tag/0.8), support http hooks callback, update [st_load](https://github.com/winlinvip/st-load). 19186 lines.<br/> | 147 | * 2013-12-08, [Release v0.8](https://github.com/winlinvip/simple-rtmp-server/releases/tag/0.8), support http hooks callback, update [st_load](https://github.com/winlinvip/st-load). 19186 lines.<br/> |
149 | * 2013-12-03, [Release v0.7](https://github.com/winlinvip/simple-rtmp-server/releases/tag/0.7), support live stream transcoding. 17605 lines.<br/> | 148 | * 2013-12-03, [Release v0.7](https://github.com/winlinvip/simple-rtmp-server/releases/tag/0.7), support live stream transcoding. 17605 lines.<br/> |
@@ -155,7 +154,7 @@ See also: [Performance Test Guide](https://github.com/winlinvip/simple-rtmp-serv | @@ -155,7 +154,7 @@ See also: [Performance Test Guide](https://github.com/winlinvip/simple-rtmp-serv | ||
155 | * 2013-10-23, [Release v0.1](https://github.com/winlinvip/simple-rtmp-server/releases/tag/0.1), support rtmp FMLE/FFMPEG publish, vp6. 8287 lines.<br/> | 154 | * 2013-10-23, [Release v0.1](https://github.com/winlinvip/simple-rtmp-server/releases/tag/0.1), support rtmp FMLE/FFMPEG publish, vp6. 8287 lines.<br/> |
156 | * 2013-10-17, Created.<br/> | 155 | * 2013-10-17, Created.<br/> |
157 | 156 | ||
158 | -### Compare | 157 | +## Compare |
159 | * SRS v0.9: 20926 lines. player/encoder/chat demos. bandwidth test for encoder/CDN.<br/> | 158 | * SRS v0.9: 20926 lines. player/encoder/chat demos. bandwidth test for encoder/CDN.<br/> |
160 | * SRS v0.8: 19186 lines. implements http hooks refer to [nginx-rtmp](https://github.com/arut/nginx-rtmp-module). <br/> | 159 | * SRS v0.8: 19186 lines. implements http hooks refer to [nginx-rtmp](https://github.com/arut/nginx-rtmp-module). <br/> |
161 | * SRS v0.7: 17605 lines. implements transcoding(FFMPEG) feature refer to [wowza](http://www.wowza.com). <br/> | 160 | * SRS v0.7: 17605 lines. implements transcoding(FFMPEG) feature refer to [wowza](http://www.wowza.com). <br/> |
@@ -168,7 +167,7 @@ See also: [Performance Test Guide](https://github.com/winlinvip/simple-rtmp-serv | @@ -168,7 +167,7 @@ See also: [Performance Test Guide](https://github.com/winlinvip/simple-rtmp-serv | ||
168 | * nginx-rtmp v1.0.4: 26786 lines <br/> | 167 | * nginx-rtmp v1.0.4: 26786 lines <br/> |
169 | * nginx v1.5.0: 139524 lines <br/> | 168 | * nginx v1.5.0: 139524 lines <br/> |
170 | 169 | ||
171 | -### History | 170 | +## History |
172 | * v1.0, 2014-03-21, write pid to ./objs/srs.pid. | 171 | * v1.0, 2014-03-21, write pid to ./objs/srs.pid. |
173 | * v1.0, 2014-03-20, refine hls code, support pure audio HLS. | 172 | * v1.0, 2014-03-20, refine hls code, support pure audio HLS. |
174 | * v1.0, 2014-03-19, add vn/an for FFMPEG to drop video/audio for radio stream. | 173 | * v1.0, 2014-03-19, add vn/an for FFMPEG to drop video/audio for radio stream. |
@@ -270,8 +269,19 @@ on_connect/close/publish/unpublish/play/stop. | @@ -270,8 +269,19 @@ on_connect/close/publish/unpublish/play/stop. | ||
270 | * v0.1, 2013-10-18, support rtmp message2chunk protocol(send\_message). | 269 | * v0.1, 2013-10-18, support rtmp message2chunk protocol(send\_message). |
271 | * v0.1, 2013-10-17, support rtmp chunk2message protocol(recv\_message). | 270 | * v0.1, 2013-10-17, support rtmp chunk2message protocol(recv\_message). |
272 | 271 | ||
273 | -### Architecture | ||
274 | -System Architecture: | 272 | +## Architecture |
273 | + | ||
274 | +srs always use the most simple architecture to support complex transaction. | ||
275 | +* System arch: the system structure and arch. | ||
276 | +* Modularity arch: the main modularity of srs. | ||
277 | +* Stream arch: the stream dispatch arch of srs. | ||
278 | +* RTMP cluster arch: the RTMP origin and edge cluster arch. | ||
279 | +* Multiple processes arch (by wenjie): the multiple process of srs. | ||
280 | +* CLI arch: the cli arch for srs, api to manage srs. | ||
281 | +* Bandwidth specification: the bandwidth test specification of srs. | ||
282 | + | ||
283 | +### System Architecture | ||
284 | + | ||
275 | <pre> | 285 | <pre> |
276 | +------------------------------------------------------+ | 286 | +------------------------------------------------------+ |
277 | | SRS(Simple RTMP Server) | | 287 | | SRS(Simple RTMP Server) | |
@@ -284,7 +294,9 @@ System Architecture: | @@ -284,7 +294,9 @@ System Architecture: | ||
284 | | All Linux(RHEL,CentOS,Ubuntu,Fedora...) | | 294 | | All Linux(RHEL,CentOS,Ubuntu,Fedora...) | |
285 | +------------------------------------------------------+ | 295 | +------------------------------------------------------+ |
286 | </pre> | 296 | </pre> |
287 | -Modularity Architecture: | 297 | + |
298 | +### Modularity Architecture | ||
299 | + | ||
288 | <pre> | 300 | <pre> |
289 | +------------------------------------------------------+ | 301 | +------------------------------------------------------+ |
290 | | Main(srs/bandwidth/librtmp) | | 302 | | Main(srs/bandwidth/librtmp) | |
@@ -298,7 +310,9 @@ Modularity Architecture: | @@ -298,7 +310,9 @@ Modularity Architecture: | ||
298 | | Core(depends only on system apis) | | 310 | | Core(depends only on system apis) | |
299 | +------------------------------------------------------+ | 311 | +------------------------------------------------------+ |
300 | </pre> | 312 | </pre> |
301 | -Stream Architecture: | 313 | + |
314 | +### Stream Architecture | ||
315 | + | ||
302 | <pre> | 316 | <pre> |
303 | +---------+ +----------+ | 317 | +---------+ +----------+ |
304 | + Publish + + Deliver | | 318 | + Publish + + Deliver | |
@@ -324,8 +338,11 @@ Remark: | @@ -324,8 +338,11 @@ Remark: | ||
324 | (1) Encoder: encoder must push RTMP stream to SRS server. | 338 | (1) Encoder: encoder must push RTMP stream to SRS server. |
325 | (2) MediaSource: any media source, which can be ingest by ffmpeg. | 339 | (2) MediaSource: any media source, which can be ingest by ffmpeg. |
326 | </pre> | 340 | </pre> |
327 | -(plan) RTMP cluster(origin/edge) Architecture:<br/> | 341 | + |
342 | +### (plan) RTMP cluster(origin/edge) Architecture | ||
343 | + | ||
328 | Remark: cluster over forward, see [Cluster](https://github.com/winlinvip/simple-rtmp-server/wiki/Cluster) | 344 | Remark: cluster over forward, see [Cluster](https://github.com/winlinvip/simple-rtmp-server/wiki/Cluster) |
345 | + | ||
329 | <pre> | 346 | <pre> |
330 | +---------+ +-----------------+ +-----------------------+ | 347 | +---------+ +-----------------+ +-----------------------+ |
331 | + Encoder +--+-->-+ SRS(RTMP Edge) +--->-+ (RTMP Origin) | | 348 | + Encoder +--+-->-+ SRS(RTMP Edge) +--->-+ (RTMP Origin) | |
@@ -348,7 +365,9 @@ Schema#1: Any RTMP encoder push RTMP stream to RTMP (origin/edge)server, | @@ -348,7 +365,9 @@ Schema#1: Any RTMP encoder push RTMP stream to RTMP (origin/edge)server, | ||
348 | Schema#2: SRS RTMP Edge server pull stream from origin (or upstream SRS | 365 | Schema#2: SRS RTMP Edge server pull stream from origin (or upstream SRS |
349 | RTMP Edge server), then delivery to Client. | 366 | RTMP Edge server), then delivery to Client. |
350 | </pre> | 367 | </pre> |
351 | -(plan) SRS Multiple processes Architecture(design by wenjie):<br/> | 368 | + |
369 | +### (plan) SRS Multiple processes Architecture(design by wenjie) | ||
370 | + | ||
352 | <pre> | 371 | <pre> |
353 | +---------------+ +--------+ | 372 | +---------------+ +--------+ |
354 | | upnode server | + client + | 373 | | upnode server | + client + |
@@ -380,7 +399,9 @@ Remark: | @@ -380,7 +399,9 @@ Remark: | ||
380 | will collect informations from all stream process, master process | 399 | will collect informations from all stream process, master process |
381 | only send signals to child processes. | 400 | only send signals to child processes. |
382 | </pre> | 401 | </pre> |
383 | -CLI Architecture: | 402 | + |
403 | +### CLI Architecture | ||
404 | + | ||
384 | <pre> | 405 | <pre> |
385 | +---------+ | 406 | +---------+ |
386 | +--+ stream1 +---------+ | 407 | +--+ stream1 +---------+ |
@@ -402,7 +423,9 @@ Remark: | @@ -402,7 +423,9 @@ Remark: | ||
402 | (5) cli connect to each stream/back-source process to get api data, | 423 | (5) cli connect to each stream/back-source process to get api data, |
403 | cli analysis and summary the data, return to user. | 424 | cli analysis and summary the data, return to user. |
404 | </pre> | 425 | </pre> |
405 | -Bandwidth Test Workflow: | 426 | + |
427 | +### Bandwidth Test Workflow | ||
428 | + | ||
406 | <pre> | 429 | <pre> |
407 | +------------+ +----------+ | 430 | +------------+ +----------+ |
408 | | Client | | Server | | 431 | | Client | | Server | |
-
请 注册 或 登录 后发表评论