Convert Figma logo to code with AI

ossrs logosrs

SRS is a simple, high-efficiency, real-time media server supporting RTMP, WebRTC, HLS, HTTP-FLV, HTTP-TS, SRT, MPEG-DASH, and GB28181.

25,534
5,366
25,534
198

Top Related Projects

OBS Studio - Free and open source software for live streaming and screen recording

45,445

Mirror of https://git.ffmpeg.org/ffmpeg.git

11,584

Ready-to-use SRT / WebRTC / RTSP / RTMP / LL-HLS media server and media proxy that allows to read, publish, proxy, record and playback video and audio streams.

Ant Media Server is a live streaming engine software that provides adaptive, ultra low latency streaming by using WebRTC technology with ~0.5 seconds latency. Ant Media Server is auto-scalable and it can run on-premise or on-cloud.

13,642

Pure Go implementation of the WebRTC API

4,233

Ultimate camera streaming application with support RTSP, RTMP, HTTP-FLV, WebRTC, MSE, HLS, MP4, MJPEG, HomeKit, FFmpeg, etc.

Quick Overview

SRS (Simple RTMP Server) is an open-source live streaming server for low latency live streaming. It supports various protocols including RTMP, WebRTC, HLS, and HTTP-FLV, making it versatile for different streaming scenarios. SRS is designed to be high-performance, scalable, and easy to use.

Pros

  • Supports multiple streaming protocols, providing flexibility for different use cases
  • High-performance and low-latency streaming capabilities
  • Extensive documentation and active community support
  • Easy to deploy and configure

Cons

  • Primarily focused on live streaming, may not be suitable for other types of media servers
  • Some advanced features may require additional configuration or plugins
  • Learning curve for users new to streaming technologies

Getting Started

To get started with SRS, follow these steps:

  1. Clone the repository:

    git clone https://github.com/ossrs/srs.git
    
  2. Build SRS:

    cd srs/trunk
    ./configure
    make
    
  3. Run SRS:

    ./objs/srs -c conf/srs.conf
    
  4. Push a live stream to SRS using RTMP:

    ffmpeg -re -i input.mp4 -c copy -f flv rtmp://localhost/live/stream
    
  5. Play the stream using VLC or other compatible players:

    rtmp://localhost/live/stream
    

For more detailed instructions and configuration options, refer to the official documentation at https://github.com/ossrs/srs/wiki.

Competitor Comparisons

OBS Studio - Free and open source software for live streaming and screen recording

Pros of OBS Studio

  • More comprehensive feature set for video production and streaming
  • Larger community and ecosystem of plugins/extensions
  • Cross-platform support (Windows, macOS, Linux)

Cons of OBS Studio

  • Higher resource usage and system requirements
  • Steeper learning curve for new users
  • Less focused on server-side streaming capabilities

Code Comparison

SRS (server-side streaming):

SrsRtmpConn* conn = new SrsRtmpConn(this, skt, ip);
if ((err = conn->start()) != srs_success) {
    srs_freep(conn);
    return srs_error_wrap(err, "start conn");
}

OBS Studio (client-side streaming):

bool OBSBasic::StartStreaming()
{
    if (outputHandler->StreamingActive())
        return false;
    if (!outputHandler->StartStreaming(service))
        return false;
    return true;
}

SRS focuses on server-side RTMP connections, while OBS Studio handles client-side streaming initiation. SRS is more lightweight and specialized for streaming server functionality, whereas OBS Studio provides a full-featured streaming and recording application with a graphical interface.

45,445

Mirror of https://git.ffmpeg.org/ffmpeg.git

Pros of FFmpeg

  • Extensive multimedia processing capabilities, supporting a wide range of formats and codecs
  • Robust command-line interface with powerful options for complex operations
  • Large, active community and extensive documentation

Cons of FFmpeg

  • Steeper learning curve due to its vast feature set
  • Can be resource-intensive for certain operations
  • Less focused on streaming-specific functionality compared to SRS

Code Comparison

FFmpeg (transcoding example):

ffmpeg -i input.mp4 -c:v libx264 -preset slow -crf 22 -c:a copy output.mp4

SRS (streaming configuration):

listen              1935;
max_connections     1000;
srs_log_tank        file;
srs_log_file        ./objs/srs.log;

Summary

FFmpeg is a comprehensive multimedia framework with broad capabilities, while SRS is more focused on streaming solutions. FFmpeg excels in versatility and format support, but may require more expertise to use effectively. SRS offers a more streamlined approach for streaming-specific tasks, potentially with a gentler learning curve for those applications.

11,584

Ready-to-use SRT / WebRTC / RTSP / RTMP / LL-HLS media server and media proxy that allows to read, publish, proxy, record and playback video and audio streams.

Pros of mediamtx

  • Written in Go, offering better performance and easier deployment
  • Supports a wider range of protocols, including WebRTC and HLS
  • More lightweight and focused on streaming functionality

Cons of mediamtx

  • Less mature project with fewer contributors and stars on GitHub
  • Limited documentation compared to SRS
  • Fewer advanced features and customization options

Code Comparison

mediamtx (Go):

type RTSPServer struct {
    rtspAddress string
    sessions    map[string]*RTSPSession
    mutex       sync.Mutex
}

SRS (C++):

class SrsRtspStack : public ISrsCoroutineHandler
{
private:
    SrsRtspConn* conn;
    SrsRequest* req;
    std::string rtsp_tcUrl;
};

Summary

mediamtx is a lightweight, Go-based streaming server with support for multiple protocols, while SRS is a more comprehensive, C++-based solution with extensive features and documentation. mediamtx may be easier to deploy and offers better performance for specific use cases, but SRS provides a more mature ecosystem with broader functionality and community support.

Ant Media Server is a live streaming engine software that provides adaptive, ultra low latency streaming by using WebRTC technology with ~0.5 seconds latency. Ant Media Server is auto-scalable and it can run on-premise or on-cloud.

Pros of Ant-Media-Server

  • More comprehensive WebRTC support, including data channels and screen sharing
  • Built-in adaptive bitrate streaming for improved performance
  • Integrated user management and authentication system

Cons of Ant-Media-Server

  • Less flexible configuration options compared to SRS
  • Higher resource consumption, especially for large-scale deployments
  • Steeper learning curve for beginners due to more complex architecture

Code Comparison

Ant-Media-Server (Java):

@RestController
public class StreamsSourceRestService {
    @GetMapping("/broadcast/getList/{offset}/{size}")
    public List<Broadcast> getBroadcastList(@PathVariable int offset, @PathVariable int size) {
        return dataStore.getBroadcastList(offset, size, null, null, null);
    }
}

SRS (C++):

SrsHttpServeMux* http_api_mux = new SrsHttpServeMux();
http_api_mux->handle("/api/v1/streams", new SrsGoApiStreams());
SrsGoApiStreams::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r) {
    SrsJsonObject* obj = SrsJsonAny::object();
    obj->set("streams", SrsJsonAny::array());
    return srs_api_response(w, r, obj);
}

Both projects offer robust streaming solutions, but Ant-Media-Server provides more out-of-the-box features for WebRTC and adaptive streaming, while SRS offers greater flexibility and lower resource usage. The code examples showcase the different approaches: Ant-Media-Server uses Java with Spring Boot for RESTful APIs, while SRS employs C++ for its HTTP API implementation.

13,642

Pure Go implementation of the WebRTC API

Pros of webrtc

  • Pure Go implementation, offering better performance and easier integration in Go projects
  • Focused specifically on WebRTC, providing a more specialized and comprehensive solution
  • Active community with frequent updates and contributions

Cons of webrtc

  • Limited to WebRTC protocol, while SRS supports multiple streaming protocols
  • Lacks some of the advanced features and tools that SRS provides for streaming
  • May require more custom development for full-featured streaming applications

Code Comparison

SRS (C++):

SrsRtcConnection::SrsRtcConnection(SrsRtcServer* s, const SrsContextId& cid)
{
    server = s;
    cid_ = cid;
    req = NULL;
    sendonly_skt = NULL;
}

webrtc (Go):

type PeerConnection struct {
    mu             sync.RWMutex
    configuration  Configuration
    currentLocalDescription  *SessionDescription
    pendingLocalDescription  *SessionDescription
    currentRemoteDescription *SessionDescription
}

Both projects use different languages and approaches, with SRS focusing on a broader range of streaming protocols and webrtc specializing in WebRTC implementation. The code snippets show the core connection structures for each project, highlighting their different focuses and implementations.

4,233

Ultimate camera streaming application with support RTSP, RTMP, HTTP-FLV, WebRTC, MSE, HLS, MP4, MJPEG, HomeKit, FFmpeg, etc.

Pros of go2rtc

  • Lightweight and efficient, designed specifically for real-time communication
  • Supports a wide range of protocols, including WebRTC, RTSP, RTMP, and more
  • Easy to set up and configure, with a simple YAML configuration file

Cons of go2rtc

  • Less mature and less widely adopted compared to SRS
  • Limited documentation and community support
  • Fewer advanced features and customization options

Code Comparison

go2rtc configuration example:

streams:
  camera1: rtsp://admin:password@192.168.1.123:554/stream
  camera2: rtsp://192.168.1.124:554/h264Preview_01_main

SRS configuration example:

listen              1935;
max_connections     1000;
srs_log_tank        file;
srs_log_file        ./objs/srs.log;

http_server {
    enabled         on;
    listen          8080;
}

vhost __defaultVhost__ {
}

Both projects aim to provide streaming solutions, but go2rtc focuses on real-time communication with a simpler configuration, while SRS offers a more comprehensive streaming server with advanced features and broader protocol support. go2rtc may be preferable for lightweight, real-time applications, while SRS is better suited for large-scale, feature-rich streaming deployments.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

SRS(Simple Realtime Server)

SRS/6.0 (Hang) is a simple, high-efficiency, and real-time video server, supporting RTMP/WebRTC/HLS/HTTP-FLV/SRT/MPEG-DASH/GB28181, Linux/Windows/macOS, X86_64/ARMv7/AARCH64/M1/RISCV/LOONGARCH/MIPS, and essential features.

SRS Overview

Note: For more details on the single-node architecture for SRS, please visit the following link.

SRS is licenced under MIT, and some third-party libraries are distributed under their licenses.

Usage

Please check the Getting Started guide in English or Chinese. We highly recommend using SRS with docker:

docker run --rm -it -p 1935:1935 -p 1985:1985 -p 8080:8080 \
    -p 8000:8000/udp -p 10080:10080/udp ossrs/srs:5

Tips: If you're in China, use this image registry.cn-hangzhou.aliyuncs.com/ossrs/srs:5 for faster speed.

Open http://localhost:8080/ to verify, and then stream using the following FFmpeg command:

ffmpeg -re -i ./doc/source.flv -c copy -f flv -y rtmp://localhost/live/livestream

Alternatively, stream by OBS using the following configuration:

  • Service: Custom
  • Server: rtmp://localhost/live
  • Stream Key: livestream

Play the following streams using media players:

If you'd like to use WebRTC, convert RTMP to WebRTC, or convert WebRTC to RTMP, please check out the wiki documentation in either English or Chinese.

To learn more about RTMP, HLS, HTTP-FLV, SRT, MPEG-DASH, WebRTC protocols, clustering, HTTP API, DVR, and transcoding, please check the documents in English or Chinese.

Sponsor

Would you like additional assistance from us? By becoming a sponsor or backer of SRS, we can provide you with the support you need:

  • Backer: $5 per month, online text chat support through Discord.
  • Sponsor: $100 per month, online text chat plus online meeting support.

Please visit OpenCollective to become a backer or sponsor, and send us a direct message on Discord. We are currently providing support to the developers listed below:

At SRS, our goal is to create a free, open-source community that helps developers all over the world build high-quality streaming and RTC platforms for their businesses.

Contributing

The authors, TOC(Technical Oversight Committee), and contributors are listed here. The TOC members who made significant contributions and maintained parts of SRS are listed below:

  • Winlin: Founder of the project, focusing on ST and Issues/PR. Responsible for architecture and maintenance.
  • ZhaoWenjie: One of the earliest contributors, focusing on HDS and Windows. Has expertise in client technology.
  • ShiWei: Specializes in SRT and H.265, maintaining SRT and FLV patches for FFmpeg. An expert in codecs and FFmpeg.
  • XiaoZhihong: Concentrates on WebRTC/QUIC and SRT, with expertise in network QoS. Contributed to ARM on ST and was the original contributor for WebRTC.
  • WuPengqiang: Focused on H.265, initially contributed to the FFmpeg module in SRS for transcoding AAC with OPUS for WebRTC.
  • XiaLixin: Specializes in GB28181, with expertise in live streaming and WebRTC.
  • LiPeng: Concentrates on WebRTC and contributes to memory management and smart pointers.
  • ChenGuanghua: Focused on WebRTC/QoS and introduced the Asan toolchain to SRS.
  • ChenHaibo: Specializes in GB28181 and HTTP API, contributing to patches for FFmpeg with WHIP.
  • ZhangJunqin: Focused on H.265, Prometheus Exporter, and API module.

A huge THANK YOU goes out to:

We're really thankful to everyone in the community for helping us find bugs and improve the project. To stay in touch and keep helping our community, please check out this guide.

LICENSE

FOSSA Status

SRS is licenced under MIT, and some third-party libraries are distributed under their licenses.

Releases

  • 2024-09-01, Release v6.0-a1, v6.0-a1, 6.0 alpha1, v6.0.155, 169636 lines.
  • 2024-07-27, Release v6.0-a0, v6.0-a0, 6.0 alpha0, v6.0.145, 169259 lines.
  • 2024-07-04, Release v6.0-d6, v6.0-d6, 6.0 dev6, v6.0.134, 168904 lines.
  • 2024-06-15, Release v6.0-d5, v6.0-d5, 6.0 dev5, v6.0.129, 168454 lines.
  • 2024-02-15, Release v6.0-d4, v6.0-d4, 6.0 dev4, v6.0.113, 167695 lines.
  • 2023-11-19, Release v6.0-d3, v6.0-d3, 6.0 dev3, v6.0.101, 167560 lines.
  • 2023-09-28, Release v6.0-d2, v6.0-d2, 6.0 dev2, v6.0.85, 167509 lines.
  • 2023-08-31, Release v6.0-d1, v6.0-d1, 6.0 dev1, v6.0.72, 167135 lines.
  • 2023-07-09, Release v6.0-d0, v6.0-d0, 6.0 dev0, v6.0.59, 166739 lines.
  • 2024-06-15, Release v5.0-r3, v5.0-r3, 5.0 release3, v5.0.213, 163585 lines.
  • 2024-04-03, Release v5.0-r2, v5.0-r2, 5.0 release2, v5.0.210, 163515 lines.
  • 2024-02-15, Release v5.0-r1, v5.0-r1, 5.0 release1, v5.0.208, 163441 lines.
  • 2023-12-30, Release v5.0-r0, v5.0-r0, 5.0 release0, v5.0.205, 163363 lines.
  • 2023-11-19, Release v5.0-b7, v5.0-b7, 5.0 beta7, v5.0.200, 163305 lines.
  • 2023-10-25, Release v5.0-b6, v5.0-b6, 5.0 beta6, v5.0.195, 163303 lines.
  • 2023-09-28, Release v5.0-b5, v5.0-b5, 5.0 beta5, v5.0.185, 163254 lines.
  • 2023-08-31, Release v5.0-b4, v5.0-b4, 5.0 beta4, v5.0.176, 162919 lines.
  • 2023-08-02, Release v5.0-b3, v5.0-b3, 5.0 beta3, v5.0.170, 162704 lines.
  • 2023-07-09, Release v5.0-b2, v5.0-b2, 5.0 beta2, v5.0.166, 162520 lines.
  • 2023-06-11, Release v5.0-b1, v5.0-b1, 5.0 beta1, v5.0.157, 162494 lines.
  • 2023-05-14, Release v5.0-b0, v5.0-b0, 5.0 beta0, v5.0.155, 162600 lines.
  • 2023-03-23, Release v5.0-a5, v5.0-a5, 5.0 alpha5, v5.0.148, 162066 lines.
  • 2023-02-12, Release v5.0-a4, v5.0-a4, 5.0 alpha4, v5.0.141, 161897 lines.
  • 2023-01-02, Release v5.0-a3, v5.0-a3, 5.0 alpha3, v5.0.128, 161327 lines.
  • 2022-12-18, Release v5.0-a2, v5.0-a2, 5.0 alpha2, v5.0.112, 161233 lines.
  • 2022-12-01, Release v5.0-a1, v5.0-a1, 5.0 alpha1, v5.0.100, 160817 lines.
  • 2022-11-25, Release v5.0-a0, v5.0-a0, 5.0 alpha0, v5.0.98, 159813 lines.
  • 2022-11-22, Release v4.0-r4, v4.0-r4, 4.0 release4, v4.0.268, 145482 lines.
  • 2022-09-16, Release v4.0-r3, v4.0-r3, 4.0 release3, v4.0.265, 145328 lines.
  • 2022-08-24, Release v4.0-r2, v4.0-r2, 4.0 release2, v4.0.257, 144890 lines.
  • 2022-06-29, Release v4.0-r1, v4.0-r1, 4.0 release1, v4.0.253, 144680 lines.
  • 2022-06-11, Release v4.0-r0, v4.0-r0, 4.0 release0, v4.0.252, 144680 lines.
  • 2020-06-27, Release v3.0-r0, 3.0 release0, 3.0.141, 122674 lines.
  • 2020-02-02, Release v3.0-b0, 3.0 beta0, 3.0.112, 121709 lines.
  • 2019-10-04, Release v3.0-a0, 3.0 alpha0, 3.0.56, 107946 lines.
  • 2017-03-03, Release v2.0-r0, 2.0 release0, 2.0.234, 86373 lines.
  • 2016-08-06, Release v2.0-b0, 2.0 beta0, 2.0.210, 89704 lines.
  • 2015-08-23, Release v2.0-a0, 2.0 alpha0, 2.0.185, 89022 lines.
  • 2014-12-05, Release v1.0-r0, all bug fixed, 1.0.10, 59391 lines.
  • 2014-10-09, Release v0.9.8, all bug fixed, 1.0.0, 59316 lines.
  • 2014-04-07, Release v0.9.1, live streaming. 30000 lines.
  • 2013-10-23, Release v0.1.0, rtmp. 8287 lines.
  • 2013-10-17, Created.

Features

Please read FEATURES.

Changelog

Please read CHANGELOG.

Performance

Please read PERFORMANCE.

Architecture

Please read ARCHITECTURE.

Ports

Please read PORTS.

APIs

Please read APIS.

Mirrors

Please read MIRRORS.

Dockers

Please read DOCKERS.

Beijing, 2013.10
Winlin