跪拜 Guibai
← All articles
Backend

SRS Replaces a Rack of Streaming Servers with One Binary

By GetcharZp ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Streaming infrastructure is normally a multi-service tax paid in ops hours and cloud vendor lock-in. SRS collapses the stack into one open-source component, which shifts the cost from per-stream licensing fees to raw compute and bandwidth that a team controls directly.

Summary

SRS acts as a video traffic hub, analogous to what Nginx does for HTTP. It ingests streams from OBS, FFmpeg, or surveillance cameras, translates between six protocols, and fans out playback to browsers, mobile apps, and mini-programs without requiring a separate service per protocol. A single Docker command boots a working live server that can push and pull RTMP, serve HTTP-FLV and HLS, and handle WebRTC for real-time co-hosting.

Under the MIT license, SRS removes licensing anxiety for startups and enterprises that would otherwise pay annual cloud live-streaming bills or build protocol translation layers from scratch. The project has been battle-tested across Chinese live commerce, education, and security platforms, with a Chinese-language ecosystem that lowers the troubleshooting barrier for Mandarin-speaking teams.

Common production pitfalls are well-understood: forgetting to open ports 1935, 1985, and 8080 on cloud security groups blocks public playback; enabling multi-bitrate transcoding can spike CPU; and single-machine limits are best addressed through CDN distribution and node scaling before swapping out the server itself.

Takeaways
One Docker command starts a server that speaks RTMP, WebRTC, HLS, HTTP-FLV, SRT, and GB28181.
Latency for WebRTC interactions sits around 80–100 ms.
A single machine can handle 10,000 concurrent playback connections, depending on bitrate, CPU, and whether transcoding is on.
MIT licensing means free commercial use, private modifications, and no royalties.
Cloud server security groups must expose ports 1935, 1985, and 8080 for public access.
Transcoding multiple output resolutions from a single input stream is the fastest way to max out CPU.
When a single node saturates, the first levers are CDN distribution, multi-node deployment, and disabling unnecessary transcoding.
Conclusions

Protocol consolidation is the real value proposition, not raw performance. SRS eliminates the need to run and integrate separate RTMP, WebRTC, and GB28181 gateways, which is where most small-team streaming projects accumulate technical debt.

The Chinese-language ecosystem is a deliberate moat. While the code is universal, the documentation, community, and troubleshooting patterns are optimized for Mandarin-speaking developers, which means English-speaking teams adopting SRS will face a thinner support surface than the feature list suggests.

Calling SRS 'the Nginx of video' is more than a metaphor. Both projects succeed by being single-purpose, event-driven, and config-file-driven daemons that replace a tangle of specialized services, and both benefit from a plugin or module model that lets the core stay small.

Concepts & terms
GB28181
A Chinese national standard for video surveillance systems that defines how cameras, NVRs, and management platforms communicate. SRS can ingest GB28181 streams directly and re-broadcast them to web players.
RTMP
Real-Time Messaging Protocol, originally a Macromedia/Adobe protocol for streaming audio, video, and data over TCP. Still the dominant push protocol for live encoders like OBS.
HTTP-FLV
A method of delivering FLV-encapsulated video over an HTTP connection, often used in Chinese mini-programs and mobile browsers where RTMP playback is unsupported.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗