Skip to content

Commit

Permalink
Rename SRS Cloud to SRS Stack.
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Aug 10, 2023
1 parent c43cc9c commit e5ec9ab
Show file tree
Hide file tree
Showing 33 changed files with 1,547 additions and 1,454 deletions.
4 changes: 2 additions & 2 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@ const config = {
},
{
to: '/faq',
label: 'FAQ: SRS',
label: 'FAQ: SRS OSS',
},
{
to: '/faq-srs-cloud',
label: 'FAQ: SRS Cloud',
label: 'FAQ: SRS Stack',
},
{
to: '/contact',
Expand Down
1 change: 1 addition & 0 deletions for-writers/pages/faq-srs-stack-en.md
1 change: 1 addition & 0 deletions for-writers/pages/faq-srs-stack-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Streaming video is very popular in a variety of industries, and there are many t
Literally it's not just a media server, and seems a bit complicated, right? Yep and No!

* Yep! Building a video streaming service is something really difficult, not easy. It requires video streaming engineering, also backend service technology like Nodejs or Go, and frontend skills to build a mgmt and homepage.
* No! Rather than build all from scratch, we could build a video streaming service based on some open source solution such as [SRS Cloud](https://github.com/ossrs/srs-cloud), and lightweight cloud service such as [DigitalOcean](https://digitalocean.com) or [TencentCloud](https://intl.cloud.tencent.com), it's really simple to build your video streaming service.
* No! Rather than build all from scratch, we could build a video streaming service based on some open source solution such as [SRS Stack](https://github.com/ossrs/srs-stack), and lightweight cloud service such as [DigitalOcean](https://digitalocean.com) or [TencentCloud](https://intl.cloud.tencent.com), it's really simple to build your video streaming service.

In this tutorial, you will learn how to set-up a video streaming service, supports publishing by browser without a plugin that is converting WebRTC to HLS, to deliver low latency (about 300ms) video streaming using SRT, and to secure the service by authentication. Furthermore, this solution is open source and very easy to get it done, via even 1-Click.

Expand All @@ -45,11 +45,11 @@ After the droplet is created, open `http://your_public_ipv4/mgmt/` in the browse
We have bellow services running in the SRS droplet:

* [SRS Server](https://github.com/ossrs/srs): SRS is a simple, high efficiency and realtime video server, supports RTMP, WebRTC, HLS, HTTP-FLV and SRT. We have both SRS 4.0 and 5.0 images installed. SRS is the media server engine, licensed under MIT or MulanPSL-2.0([compatible with Apache-2.0](https://www.apache.org/legal/resolved.html#category-a)).
* [SRS Cloud](https://github.com/ossrs/srs-cloud): A lightweight open-source video cloud based on Nodejs, SRS, FFmpeg, WebRTC, etc. SRS-Cloud acts as the framework of a video streaming service, it's also open source, licensed under MIT.
* [SRS Stack](https://github.com/ossrs/srs-stack): A lightweight open-source video cloud based on Nodejs, SRS, FFmpeg, WebRTC, etc. SRS-Cloud acts as the framework of a video streaming service, it's also open source, licensed under MIT.
* [FFmpeg](https://ffmpeg.org/): A complete, cross-platform solution to record, convert and stream audio and video. FFmpeg is used as restreaming or transcoding, and many other stream processing features.
* Other infrastructure like [Docker](https://docker.io/), [Redis](https://redis.io/), [NGINX](https://nginx.org/), [Prometheus](https://prometheus.io/) and [Certbot](https://certbot.eff.org/), to run dependent services as docker container, allow checking and upgrading to stable versions.

> SRS also set-up the firewall, please see [here](https://github.com/ossrs/srs-cloud/blob/main/scripts/setup-droplet/scripts/02-ufw-srs.sh) for details. All ports are `BLOCKED` except 22 (SSH), 80 (HTTP), 443 (HTTPS), 1935 (RTMP), 8000/UDP (WebRTC), 10080/UDP (SRT), 9000/TCP+UDP (GB28181), 5060/TCP+UDP (SIP), 2022 (MGMT) and 56379 (REDIS).
> SRS also set-up the firewall, please see [here](https://github.com/ossrs/srs-stack/blob/main/scripts/setup-droplet/scripts/02-ufw-srs.sh) for details. All ports are `BLOCKED` except 22 (SSH), 80 (HTTP), 443 (HTTPS), 1935 (RTMP), 8000/UDP (WebRTC), 10080/UDP (SRT), 9000/TCP+UDP (GB28181), 5060/TCP+UDP (SIP), 2022 (MGMT) and 56379 (REDIS).
Now the video streaming service is ready, we could use FFmpeg, OBS or WebRTC to publish the stream, and play the HLS stream.

Expand Down Expand Up @@ -99,7 +99,7 @@ For RTMP/FLV, the streaming latency is about 3~5s, while 5~10s for HLS. Which pr

WebRTC? No! It's too complicated, and few devices support WebRTC. [WHIP](https://datatracker.ietf.org/doc/draft-ietf-wish-whip/) is a possible choice for live streaming using WebRTC, but it's not a RFC right now(at 2022). It might take a long time to apply WebRTC to the live streaming industry, especially if we get other choices, [SRT](https://www.srtalliance.org/) and [RIST](https://www.rist.tv/) etc.

> Note: Whatever, SRS Cloud allows you to use WebRTC for live streaming, to publish by WebRTC and play by RTMP/HLS/WebRTC.
> Note: Whatever, SRS Stack allows you to use WebRTC for live streaming, to publish by WebRTC and play by RTMP/HLS/WebRTC.
It's also very easy to use SRT, by clicking `Scenarios > Low Latency > OBS+ffplay`, the guide is use OBS to publish SRT stream, and play by ffplay. The latency of `OBS+ffplay` is about 300ms, the bellow is a lower solution, by `vMix+ffplay`:

Expand All @@ -109,17 +109,17 @@ It's also very easy to use SRT, by clicking `Scenarios > Low Latency > OBS+ffpla
SRT is supported by a lot of devices of the broadcasting industry, and softwares like OBS/vMix also support SRT, so it's actually the most stable and easy way to get low latency live streaming.

Note that H5 does not support SRT, so you can't use Chrome to play a SRT stream, however, SRS Cloud will convert SRT to HTTP-FLV/HLS to ensure compability with general live streaming.
Note that H5 does not support SRT, so you can't use Chrome to play a SRT stream, however, SRS Stack will convert SRT to HTTP-FLV/HLS to ensure compability with general live streaming.

## Other Topics

SRS Cloud also supports restreaming to other platforms, by forking multiple FFmpeg processes, each process for a stream. It's a long story, so let's discuss it in a new tutorial.
SRS Stack also supports restreaming to other platforms, by forking multiple FFmpeg processes, each process for a stream. It's a long story, so let's discuss it in a new tutorial.

Well DVR is another story, DVR means we convert live streaming to VoD files, so we must save the VoD files to a cloud storage, such as AWS S3 or TencentCloud COS. So we're developing to support more cloud storage now.

We're also considering to integrate a CMS to SRS cloud, to allow users to publish the live streaming rooms, or VoD files like a vlog, etc.
We're also considering to integrate a CMS to SRS Stack, to allow users to publish the live streaming rooms, or VoD files like a vlog, etc.

SRS Cloud is a single node video streaming service, but SRS is a media server that supports clusters, like [Origin Cluster](/docs/v4/doc/origin-cluster), [RTMP Edge Cluster](/docs/v4/doc/sample-rtmp-cluster) and even [HLS Edge Cluster](/docs/v4/doc/sample-hls-cluster). The HLS Edge Cluster is based on NGINX, and SRS could work well with NGINX, we will publish more tutorials about this topic if you wanna.
SRS Stack is a single node video streaming service, but SRS is a media server that supports clusters, like [Origin Cluster](/docs/v4/doc/origin-cluster), [RTMP Edge Cluster](/docs/v4/doc/sample-rtmp-cluster) and even [HLS Edge Cluster](/docs/v4/doc/sample-hls-cluster). The HLS Edge Cluster is based on NGINX, and SRS could work well with NGINX, we will publish more tutorials about this topic if you wanna.

## Conclusion

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ PING ossrs.io (your_public_ipv4): 56 data bytes
64 bytes from your_public_ipv4: icmp_seq=2 ttl=64 time=12.433 ms
```

If you visit `http://your_domain_name/mgmt`, you should see the SRS Cloud console now.
If you visit `http://your_domain_name/mgmt`, you should see the SRS Stack console now.

![](/img/blog-2022-04-12-01.png)

Expand Down Expand Up @@ -86,7 +86,7 @@ Let's finish this tutorial by covering the certificate renewal process.

## Step 3 - About Certificate Auto-Renewal

Let's Encrypt's certificates are only valid for about 3 months. SRS Cloud will start a timer to verify if it is due to
Let's Encrypt's certificates are only valid for about 3 months. SRS Stack will start a timer to verify if it is due to
renew your certificates on a daily basis, and reload Nginx to apply the changes if neccessary.

You can check the renew log by:
Expand Down
24 changes: 12 additions & 12 deletions i18n/en-us/docusaurus-plugin-content-blog/2022-04-29-BT-aaPanel.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ service, for example, to enable live streaming feature for your WordPress websit
To complete this guide, you should have:

1. A linux server, with aaPanel installed. Please use a CentOS 7+ or Ubuntu 20+ and install aaPanel on it by using [command here](https://www.aapanel.com/install.html).
2. **NGINX** based framework, if you also need to install websites. [SRS Cloud](https://github.com/ossrs/srs-cloud) requires **NGINX** to proxy to our backend services.
2. **NGINX** based framework, if you also need to install websites. [SRS Stack](https://github.com/ossrs/srs-stack) requires **NGINX** to proxy to our backend services.
3. A DNS domain name, if you want to use HTTPS.

## Step 1: Install aaPanel
Expand Down Expand Up @@ -54,15 +54,15 @@ Visit the url in a browser, as demonstrated below:
You might develop your website with WordPress, however it's optional. In the next step, let's set-up a media server with
aaPanel for live streaming.

## Step 2: Install SRS Cloud
## Step 2: Install SRS Stack

There are two ways to install SRS Cloud. If you find the `SRS Cloud` plugin in App Store, you could install it from
There are two ways to install SRS Stack. If you find the `SRS Stack` plugin in App Store, you could install it from
there, as shown in the following picture:

![](/img/blog-2022-04-29-en-002.png)

If not found in App Store, you could also download the latest version of the plugin in the srs-cloud repository on
Github: [aapanel-srs_cloud.zip](https://github.com/ossrs/srs-cloud/releases/latest/download/aapanel-srs_cloud.zip). Then
Github: [aapanel-srs_cloud.zip](https://github.com/ossrs/srs-stack/releases/latest/download/aapanel-srs_cloud.zip). Then
you could upload the zip file and install the plugin, as demonstrated below:

![](/img/blog-2022-04-29-en-003.png)
Expand All @@ -71,36 +71,36 @@ Both approaches will lead you to a installation guide, like this:

![](/img/blog-2022-04-29-en-004.png)

Please click on `Confirm to install` to continue the plugin installation. In the next step, we will set-up SRS Cloud and
Please click on `Confirm to install` to continue the plugin installation. In the next step, we will set-up SRS Stack and
install some dependencies.

## Step 3: Setup SRS Cloud
## Step 3: Setup SRS Stack

To set-up `SRS Cloud`, please click the `Setting` button under `Operation` field:
To set-up `SRS Stack`, please click the `Setting` button under `Operation` field:

![](/img/blog-2022-04-29-en-005.png)

Then click on `Install SRS Cloud` to install the required softwares:
Then click on `Install SRS Stack` to install the required softwares:

![](/img/blog-2022-04-29-en-006.png)

SRS Cloud requires NGINX, Nodejs and Docker, please install all of them:
SRS Stack requires NGINX, Nodejs and Docker, please install all of them:

![](/img/blog-2022-04-29-en-007.png)

After installing all dependencies, continue to install SRS Cloud:
After installing all dependencies, continue to install SRS Stack:

![](/img/blog-2022-04-29-en-008.png)

When completion all the set-up, click on `Dashboard` and then visit the `SRS Cloud Dashboard` via the link on the page:
When completion all the set-up, click on `Dashboard` and then visit the `SRS Stack Dashboard` via the link on the page:

![](/img/blog-2022-04-29-en-009.png)

Then set-up the admin password:

![](/img/blog-2022-04-29-en-010.png)

You could follow the tutorials to use SRS Cloud:
You could follow the tutorials to use SRS Stack:

![](/img/blog-2022-04-29-en-011.png)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Network bandwidth, whether it is overloaded, is considered over the following cr

Disk, related to video recording, log splitting and STW problems caused by a slow disk :

* When there are multiple streams that require recording, disk will become the most critical bottleneck since it’s the slowest device. When designing a system, consideration must be given to address such problems. For example, a server has 64GB RAM. 32GB of RAM can be allocated to streaming service as temporary storage for media files. Another solution when having a small disk, is to use external services such as nodejs, with multithreading enabled, and then copy or store the files to the cloud storage. Please refer to [srs-cloud](https://github.com/ossrs/srs-cloud) for the best practices.
* When there are multiple streams that require recording, disk will become the most critical bottleneck since it’s the slowest device. When designing a system, consideration must be given to address such problems. For example, a server has 64GB RAM. 32GB of RAM can be allocated to streaming service as temporary storage for media files. Another solution when having a small disk, is to use external services such as nodejs, with multithreading enabled, and then copy or store the files to the cloud storage. Please refer to [srs-cloud](https://github.com/ossrs/srs-stack) for the best practices.
* Server logs, abnormal situations might lead to large quantities of writing operations to log files. If not being divided and rotated properly, the size of log files will gradually increase, and eventually take up the entire disk space. SRS supports log-rotate, and docker allows setup with log-rotate too. The logs are usually extracted (the entire raw log can be extracted if there is not much), and sent to cloud-hosted log service for analysis. Local logs are only kept for a short period, e.g. 15 days.
* STW (Stop The World) issue. The write operations cause congestion and other disk operations are queued until the write operation completes. Especially when a network disk, such as a NAS, is mounted as a local drive. Then when the server performs data write operations, there are in fact many operations happening at the network layer, which consequently causes more delay. SRS servers should avoid using network disks completely, because each congestion will lead to a STW situation on a server and all other requests will be queued.

Expand All @@ -94,7 +94,7 @@ Let's talk about the load and overload conditions in SRS:

* SRS’s process. When the CPU usage exceeds 100%, overload happens. SRS has a single-process design, hence it cannot take advantage of multiple CPUs (which will be elaborated in the later section).
* Network bandwidth. It is usually the first resource that reaches overload. For example, CPU may still have a lot of free source, when the bandwidth throughput reaches 1Gbps in live streaming. RTC is slightly different, as it is computationally intensive too.
* Disk. Except when recording is only needed for very few streams, it is generally necessary to avoid disk usage so as to avoid consequent problems. Instead we could mount RAM-drives, or reduce the number of streams processed by each SRS. Please refer to [srs-cloud](https://github.com/ossrs/srs-cloud) for best practices.
* Disk. Except when recording is only needed for very few streams, it is generally necessary to avoid disk usage so as to avoid consequent problems. Instead we could mount RAM-drives, or reduce the number of streams processed by each SRS. Please refer to [srs-cloud](https://github.com/ossrs/srs-stack) for best practices.
* Memory. It is generally less used, but we still care about the number of streams for some specific cases. For example, in case of CCTV monitoring when constant pushing and disconnecting happens, it is necessary to pay continuous attention to the increasing memory consumption by SRS. This issue can be circumvented by [Gracefully Quit](https://github.com/ossrs/srs/issues/413#issuecomment-917771521).

Special note for SRS single-process design. This is actually a choice. It is a trade-off for performance optimization. On one hand, multiprocessing can improve the processing capability. On the other hand, it is at the expense of increasing complexity of the system. Moreover it is hard to evaluate the overall load. For instance, what is an 8-core multiprocessing streaming server’s CPU overload threshold? Is it 640%? No, because the processes are not evenly consuming CPU resources. To even the process-consumption, we must implement process load balancing scheme, which is a more complicated problem.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Part 5, other features for H.265.
* [x] Black box test support HEVC.
* [x] Patch FFmpeg in SRS dev-docker.
* [x] Support HEVC for [WordPress plugin SrsPlayer](https://github.com/ossrs/WordPress-Plugin-SrsPlayer).
* [ ] Not supported: Update [srs-cloud](https://github.com/ossrs/srs-cloud) for HEVC.
* [ ] Not supported: Update [srs-cloud](https://github.com/ossrs/srs-stack) for HEVC.
* [ ] Not supported: Edge server supports publish HEVC stream to origin.
* [ ] Not supported: Edge server supprots play HEVC stream from origin.
* [ ] Not supported: HTTP Callback takes HEVC metadata.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ In short, this is a key feature of SRS.

Are you a video blogger with lots of high-quality videos? Have you thought about setting up a live room to grow your business?

With SRS Cloud, you can easily turn your video files into live streams and engage your audience without having to live-stream yourself.
With SRS Stack, you can easily turn your video files into live streams and engage your audience without having to live-stream yourself.

SRS Cloud lets you create virtual live-streaming 24/7 in just three steps: upload your videos, set up a live room (like a YouTube live room), and copy-paste the stream key to start live streaming.
SRS Stack lets you create virtual live-streaming 24/7 in just three steps: upload your videos, set up a live room (like a YouTube live room), and copy-paste the stream key to start live streaming.

It's easy, doesn't require any media streaming expertise, and SRS Cloud can even restream your live streams to other platforms for free since it's open source.
It's easy, doesn't require any media streaming expertise, and SRS Stack can even restream your live streams to other platforms for free since it's open source.

## Video Blogger, empower video bloggers with live streaming.

Expand All @@ -76,7 +76,7 @@ If you own a WordPress site, you may have considered adding live streaming, whic

But now, with the SRS Player WordPress plugin, you can incorporate live streaming using HTTP-FLV, HLS, and WebRTC, as well as video-on-demand streaming via HTTP-MP4.

Simply embed the live-streaming player with a WordPress shortcode, which you can find in the SRS cloud console.
Simply embed the live-streaming player with a WordPress shortcode, which you can find in the SRS Stack console.

This powerful plugin makes live streaming accessible to everyone, even in WooCommerce, a widely-used e-commerce plugin for WordPress, showcasing the impact of open source technology.

Expand Down Expand Up @@ -136,15 +136,15 @@ HEVC or AV1 is essential for 8K live-streaming and is becoming popular in the VR

Do you want to broadcast your live streams on multiple platforms like YouTube, Facebook, Twitch, and TikTok?

The SRS cloud simplifies this task and doesn't use up your bandwidth since it takes care of the restreaming for you.
The SRS Stack simplifies this task and doesn't use up your bandwidth since it takes care of the restreaming for you.

## SRS Prometheus Exporter, make SRS an operatable online product.

![](/img/blog-2023-05-22-011.png)

Prometheus, a well-known open-source monitoring system, is natively supported by SRS through its exporter, letting you keep an eye on the SRS server.

Visualize metrics with Grafana, and look forward to Prometheus and Grafana being integrated into the SRS cloud in the future.
Visualize metrics with Grafana, and look forward to Prometheus and Grafana being integrated into the SRS Stack in the future.

To back the project, think about donating via OpenCollective.

Expand Down
Loading

0 comments on commit e5ec9ab

Please sign in to comment.