diff --git a/README.md b/README.md index c0426bc10..332ece5fe 100755 --- a/README.md +++ b/README.md @@ -88,47 +88,6 @@ A big `THANK YOU` also goes to: * All friends of SRS for [big supports](https://github.com/ossrs/srs/wiki/Product). * [Genes](http://sourceforge.net/users/genes), [Mabbott](http://sourceforge.net/users/mabbott) and [Michael Talyanksy](https://github.com/michaeltalyansky) for [st](https://github.com/ossrs/state-threads/tree/srs). -## Ports - -The ports used by SRS, kernel services: - -* `tcp://1935`, for RTMP live streaming server([CN][v4_CN_DeliveryRTMP],[EN][v4_EN_DeliveryRTMP]). -* `tcp://1985`, HTTP API server, for HTTP-API([CN][v4_CN_HTTPApi], [EN][v4_EN_HTTPApi]), WebRTC([CN][v4_CN_WebRTC], [EN][v4_EN_WebRTC]), etc. -* `tcp://8080`, HTTP live streaming server, HTTP-FLV([CN][v4_CN_SampleHttpFlv], [EN][v4_EN_SampleHttpFlv]), HLS([CN][v4_CN_SampleHLS], [EN][v4_EN_SampleHLS]) as such. -* `udp://8000`, WebRTC Media([CN][v4_CN_WebRTC], [EN][v4_EN_WebRTC]) server. - -For optional HTTPS services, which might be provided by other web servers: - -* `tcp://8088`, HTTPS live streaming server. -* `tcp://1990`, HTTPS API server. - -For optional stream caster services, to push streams to SRS: - -* `udp://8935`, Stream Caster: [Push MPEGTS over UDP](https://github.com/ossrs/srs/wiki/v4_CN_Streamer#push-mpeg-ts-over-udp) server. -* `tcp://554`, Stream Caster: [Push RTSP](https://github.com/ossrs/srs/wiki/v4_CN_Streamer#push-rtsp-to-srs) server. -* `tcp://8936`, Stream Caster: [Push HTTP-FLV](https://github.com/ossrs/srs/wiki/v4_CN_Streamer#push-http-flv-to-srs) server. -* `udp://10080`, Stream Caster: [Push SRT Media](https://github.com/ossrs/srs/issues/1147#issuecomment-577469119) server. - -For external services to work with SRS: - -* `udp://1989`, [WebRTC Signaling](https://github.com/ossrs/signaling#usage) server. - -## APIs - -The API used by SRS: - -* `/api/v1/` The HTTP API path. -* `/rtc/v1/` The HTTP API path for RTC. -* `/sig/v1/` The [demo signaling](https://github.com/ossrs/signaling) API. - -Other API used by [ossrs.net](https://ossrs.net): - -* `/gif/v1` The statistic API. -* `/service/v1/` The latest available version API. -* `/ws-service/v1/` The latest available version API, by websocket. -* `/im-service/v1/` The latest available version API, by IM. -* `/code-service/v1/` The latest available version API, by Code verification. - ## Features - [x] Using coroutine by ST, it's really simple and stupid enough. @@ -175,7 +134,6 @@ Other API used by [ossrs.net](https://ossrs.net): - [x] [Experimental] Support transcode RTMP/AAC to WebRTC/Opus, [#307][bug #307]. - [x] [Experimental] Support AV1 codec for WebRTC, [#2324][bug #2324]. - [x] [Experimental] Enhance HTTP Stream Server for HTTP-FLV, HTTPS, HLS etc. [#1657][bug #1657]. -- [ ] Support push stream by GB28181, [#1500][bug #1500]. - [x] [Experimental] Support DVR in MP4 format, read [#738][bug #738]. - [x] [Experimental] Support MPEG-DASH, the future live streaming protocol, read [#299][bug #299]. - [x] [Experimental] Support pushing MPEG-TS over UDP, please read [bug #250][bug #250]. @@ -188,6 +146,8 @@ Other API used by [ossrs.net](https://ossrs.net): - [x] [Deprecated] Support bandwidth testing, please read [#1535][bug #1535]. - [x] [Deprecated] Support Adobe FMS/AMS token traverse([CN][v4_CN_DRM2], [EN][v4_EN_DRM2]) authentication, please read [#1535][bug #1535]. - [x] [Removed] Support RTMP client library: [srs-librtmp](https://github.com/ossrs/srs-librtmp). +- [ ] Support Windows/Cygwin 64bits, [#2532](https://github.com/ossrs/srs/issues/2532). +- [ ] Support push stream by GB28181, [#1500][bug #1500]. - [ ] Support IETF-QUIC for WebRTC Cluster, [#2091][bug #2091]. - [ ] Enhanced forwarding with vhost and variables, [#1342][bug #1342]. - [ ] Support DVR to Cloud Storage, [#1193][bug #1193]. @@ -209,56 +169,20 @@ Please read [CHANGELOG](CHANGELOG.md#changelog). ## Releases +* 2020-08-14, Release [v4.0.153](https://github.com/ossrs/srs/releases/tag/v4.0.153), 4.0 dev3, v4.0.153, 145506 lines. * 2020-08-07, Release [v4.0.150](https://github.com/ossrs/srs/releases/tag/v4.0.150), 4.0 dev2, v4.0.150, 145289 lines. * 2020-07-25, Release [v4.0.146](https://github.com/ossrs/srs/releases/tag/v4.0.146), 4.0 dev1, v4.0.146, 144026 lines. * 2020-07-04, Release [v4.0.139](https://github.com/ossrs/srs/releases/tag/v4.0.139), 4.0 dev0, v4.0.139, 143245 lines. * 2020-06-27, [Release v3.0-r0][r3.0r0], 3.0 release0, 3.0.141, 122674 lines. -* 2020-03-29, [Release v3.0-b3][r3.0b4], 3.0 beta4, 3.0.139, 122674 lines. -* 2020-03-18, [Release v3.0-b3][r3.0b3], 3.0 beta3, 3.0.134, 122509 lines. -* 2020-03-05, [Release v3.0-b2][r3.0b2], 3.0 beta2, 3.0.123, 122170 lines. -* 2020-02-14, [Release v3.0-b1][r3.0b1], 3.0 beta1, 3.0.117, 121964 lines. * 2020-02-02, [Release v3.0-b0][r3.0b0], 3.0 beta0, 3.0.112, 121709 lines. -* 2020-01-21, [Release v3.0-a9][r3.0a9], 3.0 alpha9, 3.0.105, 121577 lines. -* 2020-01-10, [Release v3.0-a8][r3.0a8], 3.0 alpha8, 3.0.97, 121555 lines. -* 2019-12-29, [Release v3.0-a7][r3.0a7], 3.0 alpha7, 3.0.90, 116356 lines. -* 2019-12-26, [Release v3.0-a6][r3.0a6], 3.0 alpha6, 3.0.85, 116056 lines. -* 2019-12-19, [Release v3.0-a5][r3.0a5], 3.0 alpha5, 3.0.75, 115362 lines. -* 2019-12-13, [Release v3.0-a4][r3.0a4], 3.0 alpha4, 3.0.71, 112928 lines. -* 2019-11-30, [Release v3.0-a3][r3.0a3], 3.0 alpha3, 3.0.67, 110864 lines. -* 2019-11-30, [Release v3.0-a2][r3.0a2], 3.0 alpha2, 3.0.66, 110831 lines. -* 2019-10-07, [Release v3.0-a1][r3.0a1], 3.0 alpha1, 3.0.60, 107962 lines. * 2019-10-04, [Release v3.0-a0][r3.0a0], 3.0 alpha0, 3.0.56, 107946 lines. * 2017-03-03, [Release v2.0-r0][r2.0r0], 2.0 release0, 2.0.234, 86373 lines. -* 2016-11-13, [Release v2.0-b3][r2.0b3], 2.0 beta3, 2.0.223, 86685 lines. -* 2016-11-09, [Release v2.0-b2][r2.0b2], 2.0 beta2, 2.0.221, 86691 lines. -* 2016-09-09, [Release v2.0-b1][r2.0b1], 2.0 beta1, 2.0.215, 89941 lines. * 2016-08-06, [Release v2.0-b0][r2.0b0], 2.0 beta0, 2.0.210, 89704 lines. -* 2015-12-23, [Release v2.0-a3][r2.0a3], 2.0 alpha3, 2.0.205, 89544 lines. -* 2015-10-08, [Release v2.0-a2][r2.0a2], 2.0 alpha2, 2.0.195, 89358 lines. -* 2015-09-14, [Release v2.0-a1][r2.0a1], 2.0 alpha1, 2.0.189, 89269 lines. * 2015-08-23, [Release v2.0-a0][r2.0a0], 2.0 alpha0, 2.0.185, 89022 lines. -* 2015-05-23, [Release v1.0-r4][r1.0r4], bug fixed, 1.0.32, 59509 lines. -* 2015-03-19, [Release v1.0-r3][r1.0r3], bug fixed, 1.0.30, 59511 lines. -* 2015-02-12, [Release v1.0-r2][r1.0r2], bug fixed, 1.0.27, 59507 lines. -* 2015-01-15, [Release v1.0-r1][r1.0r1], bug fixed, 1.0.21, 59472 lines. * 2014-12-05, [Release v1.0-r0][r1.0r0], all bug fixed, 1.0.10, 59391 lines. * 2014-10-09, [Release v0.9.8][r1.0b0], all bug fixed, 1.0.0, 59316 lines. -* 2014-08-03, [Release v0.9.7][r1.0a7], config utest, all bug fixed. 57432 lines. -* 2014-07-13, [Release v0.9.6][r1.0a6], core/kernel/rtmp utest, refine bandwidth(as/js/srslibrtmp library). 50029 lines. -* 2014-06-27, [Release v0.9.5][r1.0a5], refine perf 3k+ clients, edge token traverse, 30days online. 41573 lines. -* 2014-05-28, [Release v0.9.4][r1.0a4], support heartbeat, tracable log, fix mem leak and bugs. 39200 lines. -* 2014-05-18, [Release v0.9.3][r1.0a3], support mips, fms origin, json(http-api). 37594 lines. -* 2014-04-28, [Release v0.9.2][r1.0a2], support [dvr][v4_CN_DVR], android, [edge][v4_CN_Edge]. 35255 lines. -* 2014-04-07, [Release v0.9.1][r1.0a0], support [arm][v4_CN_SrsLinuxArm], [init.d][v4_CN_LinuxService], http [server][v4_CN_HTTPServer]/[api][v4_CN_HTTPApi], [ingest][v4_CN_SampleIngest]. 30000 lines. -* 2013-12-25, [Release v0.9.0][r0.9], support bandwidth test, player/encoder/chat [demos][v4_CN_SampleDemo]. 20926 lines. -* 2013-12-08, [Release v0.8.0][r0.8], support [http hooks callback][v4_CN_HTTPCallback], update [SB](https://github.com/ossrs/srs-bench). 19186 lines. -* 2013-12-03, [Release v0.7.0][r0.7], support [live stream transcoding][v4_CN_FFMPEG]. 17605 lines. -* 2013-11-29, [Release v0.6.0][r0.6], support [forward][v4_CN_Forward] stream to origin/edge. 16094 lines. -* 2013-11-26, [Release v0.5.0][r0.5], support [HLS(m3u8)][v4_CN_DeliveryHLS], fragment and window. 14449 lines. -* 2013-11-10, [Release v0.4.0][r0.4], support [reload][v4_CN_Reload] config, pause, longtime publish/play. 12500 lines. -* 2013-11-04, [Release v0.3.0][r0.3], support [vhost][v4_CN_RtmpUrlVhost], refer, gop cache, listen multiple ports. 11773 lines. -* 2013-10-25, [Release v0.2.0][r0.2], support [rtmp][v4_CN_RTMPHandshake] flash publish, h264, time jitter correct. 10125 lines. -* 2013-10-23, [Release v0.1.0][r0.1], support [rtmp FMLE/FFMPEG publish][v4_CN_DeliveryRTMP], vp6. 8287 lines. +* 2014-04-07, [Release v0.9.1][r1.0a0], live streaming. 30000 lines. +* 2013-10-23, [Release v0.1.0][r0.1], rtmp. 8287 lines. * 2013-10-17, Created. ## Compare @@ -320,6 +244,47 @@ Remark: 1. EXEC: Like NGINX-RTMP, EXEC forks external tools for events, please read [ng-exec][v4_CN_NgExec]. 1. SRTModule: A isolate module which run in [hybrid](https://github.com/ossrs/srs/issues/1147#issuecomment-577574883) model. +## Ports + +The ports used by SRS, kernel services: + +* `tcp://1935`, for RTMP live streaming server([CN][v4_CN_DeliveryRTMP],[EN][v4_EN_DeliveryRTMP]). +* `tcp://1985`, HTTP API server, for HTTP-API([CN][v4_CN_HTTPApi], [EN][v4_EN_HTTPApi]), WebRTC([CN][v4_CN_WebRTC], [EN][v4_EN_WebRTC]), etc. +* `tcp://8080`, HTTP live streaming server, HTTP-FLV([CN][v4_CN_SampleHttpFlv], [EN][v4_EN_SampleHttpFlv]), HLS([CN][v4_CN_SampleHLS], [EN][v4_EN_SampleHLS]) as such. +* `udp://8000`, WebRTC Media([CN][v4_CN_WebRTC], [EN][v4_EN_WebRTC]) server. + +For optional HTTPS services, which might be provided by other web servers: + +* `tcp://8088`, HTTPS live streaming server. +* `tcp://1990`, HTTPS API server. + +For optional stream caster services, to push streams to SRS: + +* `udp://8935`, Stream Caster: [Push MPEGTS over UDP](https://github.com/ossrs/srs/wiki/v4_CN_Streamer#push-mpeg-ts-over-udp) server. +* `tcp://554`, Stream Caster: [Push RTSP](https://github.com/ossrs/srs/wiki/v4_CN_Streamer#push-rtsp-to-srs) server. +* `tcp://8936`, Stream Caster: [Push HTTP-FLV](https://github.com/ossrs/srs/wiki/v4_CN_Streamer#push-http-flv-to-srs) server. +* `udp://10080`, Stream Caster: [Push SRT Media](https://github.com/ossrs/srs/issues/1147#issuecomment-577469119) server. + +For external services to work with SRS: + +* `udp://1989`, [WebRTC Signaling](https://github.com/ossrs/signaling#usage) server. + +## APIs + +The API used by SRS: + +* `/api/v1/` The HTTP API path. +* `/rtc/v1/` The HTTP API path for RTC. +* `/sig/v1/` The [demo signaling](https://github.com/ossrs/signaling) API. + +Other API used by [ossrs.net](https://ossrs.net): + +* `/gif/v1` The statistic API. +* `/service/v1/` The latest available version API. +* `/ws-service/v1/` The latest available version API, by websocket. +* `/im-service/v1/` The latest available version API, by IM. +* `/code-service/v1/` The latest available version API, by Code verification. + ## Mirrors Gitee: [https://gitee.com/ossrs/srs](https://gitee.com/ossrs/srs), the GIT usage([CN][v4_CN_Git], [EN][v4_EN_Git]) diff --git a/trunk/src/app/srs_app_latest_version.cpp b/trunk/src/app/srs_app_latest_version.cpp index 53576dfa8..836edbfa2 100644 --- a/trunk/src/app/srs_app_latest_version.cpp +++ b/trunk/src/app/srs_app_latest_version.cpp @@ -166,21 +166,14 @@ srs_error_t SrsLatestVersion::cycle() srs_error_t err = srs_success; if (true) { - string url; - srs_utime_t starttime = srs_update_system_time(); - if ((err = query_latest_version(url)) != srs_success) { - srs_warn("query err %s", srs_error_desc(err).c_str()); - srs_freep(err); // Ignore any error. - } - srs_utime_t first_random_wait = 0; srs_random_generate((char *) &first_random_wait, 8); - first_random_wait = srs_utime_t(uint64_t((first_random_wait + starttime + getpid())) % (60 * 60)) * SRS_UTIME_SECONDS; // in s. + first_random_wait = srs_utime_t(uint64_t((first_random_wait + srs_update_system_time() + getpid())) % (5 * 60)) * SRS_UTIME_SECONDS; // in s. - srs_trace("Startup query id=%s, eip=%s, match=%s, stable=%s, wait=%ds, cost=%dms, url=%s", - server_id_.c_str(), srs_get_public_internet_address().c_str(), match_version_.c_str(), - stable_version_.c_str(), srsu2msi(first_random_wait) / 1000, srsu2msi(srs_update_system_time() - starttime), - url.c_str()); + // Only report after 5+ minutes. + first_random_wait += 5 * 60 * SRS_UTIME_SECONDS; + + srs_trace("Startup query id=%s, eip=%s, wait=%ds", server_id_.c_str(), srs_get_public_internet_address().c_str(), srsu2msi(first_random_wait) / 1000); srs_usleep(first_random_wait); } @@ -216,7 +209,8 @@ srs_error_t SrsLatestVersion::query_latest_version(string& url) << "version=v" << VERSION_MAJOR << "." << VERSION_MINOR << "." << VERSION_REVISION << "&id=" << server_id_ << "&role=srs" << "&eip=" << srs_get_public_internet_address() - << "&ts=" << srsu2ms(srs_get_system_time()); + << "&ts=" << srs_get_system_time() + << "&alive=" << srsu2ms(srs_get_system_time() - srs_get_system_startup_time()) / 1000; srs_build_features(ss); url = ss.str(); diff --git a/trunk/src/core/srs_core_version3.hpp b/trunk/src/core/srs_core_version3.hpp index b2809f194..901cdfffb 100644 --- a/trunk/src/core/srs_core_version3.hpp +++ b/trunk/src/core/srs_core_version3.hpp @@ -9,6 +9,6 @@ #define VERSION_MAJOR 3 #define VERSION_MINOR 0 -#define SRS_VERSION3_REVISION 166 +#define SRS_VERSION3_REVISION 168 #endif diff --git a/trunk/src/core/srs_core_version4.hpp b/trunk/src/core/srs_core_version4.hpp index 7a338f751..a680e4958 100644 --- a/trunk/src/core/srs_core_version4.hpp +++ b/trunk/src/core/srs_core_version4.hpp @@ -9,6 +9,6 @@ #define VERSION_MAJOR 4 #define VERSION_MINOR 0 -#define VERSION_REVISION 152 +#define VERSION_REVISION 153 #endif diff --git a/trunk/src/core/srs_core_version5.hpp b/trunk/src/core/srs_core_version5.hpp index ea41c834a..96c70a247 100644 --- a/trunk/src/core/srs_core_version5.hpp +++ b/trunk/src/core/srs_core_version5.hpp @@ -9,6 +9,6 @@ #define VERSION_MAJOR 5 #define VERSION_MINOR 0 -#define VERSION_REVISION 10 +#define VERSION_REVISION 11 #endif