From f80a52f265936af8003e7ecda5a40b31b3239c8e Mon Sep 17 00:00:00 2001 From: winlin Date: Fri, 5 Mar 2021 07:58:32 +0800 Subject: [PATCH] Update README for docker --- README.md | 104 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 62 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index 58ded9b82..bad93ce62 100755 --- a/README.md +++ b/README.md @@ -13,6 +13,56 @@ SRS is a RTMP/HLS/WebRTC/SRT/GB28181 streaming cluster, high efficiency, stable ## Usage +Recommend to run SRS by [docker][docker-srs4]: + +```bash +# From Aliyun CR, for developers in China. +docker run --rm -p 1935:1935 -p 1985:1985 -p 8080:8080 \ + registry.cn-hangzhou.aliyuncs.com/ossrs/srs:v4.0.76 + +# From docker hub, depends on your network. +docker run --rm -p 1935:1935 -p 1985:1985 -p 8080:8080 \ + ossrs/srs:v4.0.76 +``` + +> Note: All [tags](https://github.com/ossrs/srs/tags) are available, such as +> `ossrs/srs:v3.0-r3` for tag [v3.0-r3](https://github.com/ossrs/srs/releases/tag/v3.0-r3), +> please check at [here](https://cr.console.aliyun.com/repository/cn-hangzhou/ossrs/srs/images) +> or [there](https://hub.docker.com/r/ossrs/srs/tags). + +> To enable WebRTC, user MUST set the env `CANDIDATE`, see [#307](https://github.com/ossrs/srs/issues/307#issue-76908382). + +If success, please open [http://localhost:8080/](http://localhost:8080/), then publish +[stream](https://github.com/ossrs/srs/blob/3.0release/trunk/doc/source.200kbps.768x320.flv) by: + +```bash +ffmpeg -re -i doc/source.200kbps.768x320.flv -c copy \ + -f flv rtmp://127.0.0.1/live/livestream +``` + +> Note: If WebRTC enabled, you can publish by [H5](http://localhost:8080/players/rtc_publisher.html?autostart=true). + +Play the following streams by players: + +* VLC: rtmp://127.0.0.1/live/livestream +* H5: [http://localhost:8080/live/livestream.flv](http://localhost:8080/players/srs_player.html?autostart=true&stream=livestream.flv&port=8080&schema=http) +* H5: [http://localhost:8080/live/livestream.m3u8](http://localhost:8080/players/srs_player.html?autostart=true&stream=livestream.m3u8&port=8080&schema=http) + +> The online demos and players are available on [ossrs.net](https://ossrs.net). + +Strongly recommend reading bellow wikis: + +* How to deliver RTMP streaming?([CN][v1_CN_SampleRTMP], [EN][v1_EN_SampleRTMP]) +* How to build RTMP Edge-Cluster?([CN][v3_CN_SampleRTMPCluster], [EN][v3_EN_SampleRTMPCluster]) +* How to build RTMP Origin-Cluster?([CN][v3_CN_SampleOriginCluster], [EN][v3_EN_SampleOriginCluster]) +* How to deliver HTTP-FLV streaming?([CN][v3_CN_SampleHttpFlv], [EN][v3_EN_SampleHttpFlv]) +* How to deliver HLS streaming?([CN][v3_CN_SampleHLS], [EN][v3_EN_SampleHLS]) +* How to deliver low-latency streaming?([CN][v3_CN_SampleRealtime], [EN][v3_EN_SampleRealtime]) +* Usage: How to play WebRTC from SRS? [#307](https://github.com/ossrs/srs/issues/307) +* Usage: How to publish WebRTC to SRS? [#307](https://github.com/ossrs/srs/issues/307) + +It's also very easy to build from source: + **>>> Step 1:** Get SRS. ``` @@ -39,52 +89,21 @@ git checkout 4.0release && git pull ./objs/srs -c conf/srs.conf ``` -**>>> Whatever**, you can also directly run SRS in [docker][docker-srs3]: - -``` -docker run -p 1935:1935 -p 1985:1985 -p 8080:8080 \ - registry.cn-hangzhou.aliyuncs.com/ossrs/srs:3 -``` - -> Note: Again, we use [ACR](https://cr.console.aliyun.com/) here, you can directly run in docker hub by `docker run -p 1935:1935 -p 1985:1985 -p 8080:8080 ossrs/srs:3` - -**>>> From here,** strongly recommend to read bellow wikis: + + +Other documents: -* Usage: How to delivery RTMP?([CN][v1_CN_SampleRTMP], [EN][v1_EN_SampleRTMP]) -* Usage: How to delivery RTMP-Edge Cluster?([CN][v3_CN_SampleRTMPCluster], [EN][v3_EN_SampleRTMPCluster]) -* Usage: How to create a RTMP-Origin Cluster?([CN][v3_CN_SampleOriginCluster], [EN][v3_EN_SampleOriginCluster]) -* Usage: How to delivery HTTP-FLV?([CN][v3_CN_SampleHttpFlv], [EN][v3_EN_SampleHttpFlv]) -* Usage: How to delivery HTTP-FLV Cluster?([CN][v3_CN_SampleHttpFlvCluster], [EN][v3_EN_SampleHttpFlvCluster]) -* Usage: How to delivery HLS?([CN][v3_CN_SampleHLS], [EN][v3_EN_SampleHLS]) * Usage: How to publish GB28181 to SRS? [#1500](https://github.com/ossrs/srs/issues/1500#issuecomment-606695679) -* Usage: How to play WebRTC from SRS? [#307](https://github.com/ossrs/srs/issues/307) -* Usage: How to publish WebRTC to SRS? [#307](https://github.com/ossrs/srs/issues/307) -* Usage: How to publish SRT(Experimental) to SRS?([CN][v4_CN_SampleSRT], [EN][v4_EN_SampleSRT]) -* Usage: How to transode stream by FFMPEG?([CN][v2_CN_SampleFFMPEG], [EN][v2_EN_SampleFFMPEG]) -* Usage: How to forward stream to other servers?([CN][v3_CN_SampleForward], [EN][v3_EN_SampleForward]) -* Usage: How to enable low lantency live streaming?([CN][v3_CN_SampleRealtime], [EN][v3_EN_SampleRealtime]) -* Usage: How to ingest file/stream/device to SRS?([CN][v1_CN_SampleIngest], [EN][v1_EN_SampleIngest]) * Usage: How to delivery DASH(Experimental)?([CN][v3_CN_SampleDASH], [EN][v3_EN_SampleDASH]) -* Usage: How to enable multiple processes? ([CN][v3_CN_REUSEPORT], [EN][v3_EN_REUSEPORT]) -* Usage: Want to contact us? ([CN][v1_CN_Contact], [EN][v1_EN_Contact]) Or file an issue [here](https://github.com/ossrs/srs/issues/new)? - - -## Wiki - -Please select according to languages: - +* Usage: How to transode RTMP stream by FFMPEG?([CN][v2_CN_SampleFFMPEG], [EN][v2_EN_SampleFFMPEG]) +* Usage: How to delivery HTTP FLV Live Streaming Cluster?([CN][v3_CN_SampleHttpFlvCluster], [EN][v3_EN_SampleHttpFlvCluster]) +* Usage: How to ingest file/stream/device to RTMP?([CN][v1_CN_SampleIngest], [EN][v1_EN_SampleIngest]) +* Usage: How to forward stream to other servers?([CN][v3_CN_SampleForward], [EN][v3_EN_SampleForward]) +* Usage: How to improve edge performance for multiple CPUs? ([CN][v3_CN_REUSEPORT], [EN][v3_EN_REUSEPORT]) +* Usage: How to file a bug or contact us? ([CN][v1_CN_Contact], [EN][v1_EN_Contact]) * [SRS 4.0 English Wiki][v4_EN_Home] * [SRS 4.0 Chinese Wiki][v4_CN_Home] -For previous versions, please read: - -* [SRS 3.0 English Wiki][v3_EN_Home] -* [SRS 3.0 Chinese Wiki][v3_CN_Home] -* [SRS 2.0 English Wiki][v2_EN_Home] -* [SRS 2.0 Chinese Wiki][v2_CN_Home] -* [SRS 1.0 English Wiki][v1_EN_Home] -* [SRS 1.0 Chinese Wiki][v1_CN_Home] - ## Features - [x] Using coroutine by ST, it's really simple and stupid enough. @@ -1273,7 +1292,7 @@ git clone https://github.com/ossrs/srs.git Supported operating systems and hardware: * All Linux, both 32 and 64 bits -* Other OS, such as Windows, please use [docker][docker-srs3]. +* Other OS, such as Windows, please use [docker][docker-srs4]. Beijing, 2013.10
Winlin @@ -1327,7 +1346,8 @@ Winlin [console]: http://ossrs.net:1985/console [player]: http://ossrs.net/players/srs_player.html [modules]: https://github.com/ossrs/srs/blob/develop/trunk/modules/readme.txt -[docker-srs3]: https://github.com/ossrs/srs-docker#srs3 +[docker-srs3]: https://github.com/ossrs/srs-docker/tree/v3#usage +[docker-srs4]: https://github.com/ossrs/srs-docker/tree/v4#usage [docker-dev]: https://github.com/ossrs/srs-docker/tree/dev#usage [v1_CN_Git]: https://github.com/ossrs/srs/wiki/v1_CN_Git