- Developed based on C++ 11, the code is stable and reliable, avoiding the use of raw pointers, cross-platform porting is simple and convenient, and the code is clear and concise.
- Support rich streaming media protocols(`RTSP/RTMP/HLS/HTTP-FLV/WebSocket-flv/HTTP-TS/WebSocket-TS/HTTP-fMP4/Websocket-fMP4/MP4/WebRTC`),and support Inter-protocol conversion.
- Very low latency(lower then one second), video opened immediately.
## Project Features
## Features
- Developed with C++11, avoiding the use of raw pointers, providing stable and reliable code with superior performance.
- Supports multiple protocols (RTSP/RTMP/HLS/HTTP-FLV/WebSocket-FLV/GB28181/HTTP-TS/WebSocket-TS/HTTP-fMP4/WebSocket-fMP4/MP4/WebRTC), and protocol conversion.
- Developed with multiplexing/multithreading/asynchronous network IO models, providing excellent concurrency performance and supporting massive client connections.
- The code has undergone extensive stability and performance testing, and has been extensively used in production environments.
- Supports all major platforms, including linux, macos, ios, android, and windows.
- Supports multiple instruction set platforms, such as x86, arm, risc-v, mips, Loongson, and Shenwei.
- Provides ultra-fast startup, extremely low latency (within 500 milliseconds, and can be as low as 100 milliseconds), and excellent user experience.
- Provides a comprehensive standard [C API](https://github.com/ZLMediaKit/ZLMediaKit/tree/master/api/include) that can be used as an SDK or called by other languages.
- Provides a complete [MediaServer](https://github.com/ZLMediaKit/ZLMediaKit/tree/master/server) server, which can be deployed directly as a commercial server without additional development.
- Provides a complete [restful api](https://github.com/ZLMediaKit/ZLMediaKit/wiki/MediaServer%E6%94%AF%E6%8C%81%E7%9A%84HTTP-API) and [web hook](https://github.com/ZLMediaKit/ZLMediaKit/wiki/MediaServer%E6%94%AF%E6%8C%81%E7%9A%84HTTP-HOOK-API), supporting rich business logic.
- Bridges the video surveillance protocol stack and the live streaming protocol stack, and provides comprehensive support for RTSP/RTMP.
- Fully supports H265/H264/AAC/G711/OPUS.
- Provides complete functions, including clustering, on-demand protocol conversion, on-demand push/pull streams, playback before publishing, and continuous publishing after disconnection.
- Provides ultimate performance, supporting 10W-level players on a single machine and 100Gb/s-level IO bandwidth capability.
- Provides ultimate user experience with [exclusive features](https://github.com/ZLMediaKit/ZLMediaKit/wiki/ZLMediakit%E7%8B%AC%E5%AE%B6%E7%89%B9%E6%80%A7%E4%BB%8B%E7%BB%8D).
-[Who is using zlmediakit?](https://github.com/ZLMediaKit/ZLMediaKit/issues/511)
- Fully supports IPv6 networks.
## Project Positioning
- Cross-platform streaming media solution for mobile and embedded systems.
- Commercial-grade streaming media server.
- Network programming secondary development SDK.
## Feature List
### Overview of Features
<imgwidth="800"alt="Overview of Features"src="https://user-images.githubusercontent.com/11495632/190864440-91c45f8f-480f-43db-8110-5bb44e6300ff.png">
- RTSP[S]
- RTSP[S]
- RTSP[S] server,support rtsp push.
- RTSP[S] server, supports RTMP/MP4/HLS to RTSP[S] conversion, supports devices such as Amazon Echo Show
- RTSP RTMP can be converted into HLS,built-in HTTP server.
- Supports HLS file generation and comes with an HTTP file server
- Play authentication based on cookie.
- Through cookie tracking technology, it can simulate HLS playback as a long connection, which can achieve HLS on-demand pulling, playback statistics, and other businesses
- Support HLS player, support streaming HLS proxy to RTSP / RTMP / MP4.
- Supports HLS player and can pull HLS to rtsp/rtmp/mp4
- Complete HTTP API server, which can be used as a web backend development framework
- Supports cross-domain access
- WebRTC(experiential)
- Supports http client/server cookie
- Support webrtc push stream and transfer to other protocols
- Supports WebSocket server and client
- Support webrtc play, support other protocol to webrtc
- Supports http file access authentication
- Support simulcast
- Support rtx/nack
- GB28181 and RTP Streaming
- Support transport-cc rtcp/rtp ext
- Supports UDP/TCP RTP (PS/TS/ES) streaming server, which can be converted to RTSP/RTMP/HLS and other protocols
-[SRT support](./srt/srt_en.md)
- Supports RTSP/RTMP/HLS and other protocol conversion to RTP streaming client, supports TCP/UDP mode, provides corresponding RESTful API, supports active and passive modes
- Supports H264/H265/AAC/G711/OPUS encoding
- Supports ES/PS/TS/EHOME RTP streaming
- Supports ES/PS RTP forwarding
- Supports GB28181 active pull mode
- Supports two-way voice intercom
- MP4 VOD and Recording
- Supports recording as FLV/HLS/MP4
- Supports MP4 file playback for RTSP/RTMP/HTTP-FLV/WS-FLV, supports seek
- Supports H264/H265/AAC/G711/OPUS encoding
- WebRTC
- Supports WebRTC streaming and conversion to other protocols
- Supports WebRTC playback and conversion from other protocols to WebRTC
- Supports two-way echo testing
- Supports simulcast streaming
- Supports uplink and downlink RTX/NACK packet loss retransmission
-**Supports single-port, multi-threaded, and client network connection migration (unique in the open source community)**.
- Supports TWCC RTCP dynamic rate control
- Supports REMB/PLI/SR/RR RTCP
- Supports RTP extension parsing
- Supports GOP buffer and instant WebRTC playback
- Supports data channels
- Supports WebRTC over TCP mode
- Excellent NACK and jitter buffer algorithms with outstanding packet loss resistance
- Supports WHIP/WHEP protocols
-[SRT support](./srt/srt.md)
- Others
- Others
- Support stream proxy by ffmpeg.
- Supports rich RESTful APIs and webhook events
- RESTful http api and http hook event api.
- Supports simple Telnet debugging
- Config file hot loading.
- Supports hot reloading of configuration files
- Vhost supported.
- Supports traffic statistics, stream authentication, and other events
- Auto close stream when nobody played.
- Supports virtual hosts for isolating different domain names
- Play and push authentication.
- Supports on-demand streaming and automatic shutdown of streams with no viewers
- Pull stream on Demand.
- Supports pre-play before streaming to increase the rate of timely stream openings
- Support TS / PS streaming push through RTP,and it can be converted to RTSP / RTMP / HLS / FLV.
- Provides a complete and powerful C API SDK
- Support real-time online screenshot http api.
- Supports FFmpeg stream proxy for any format
- Supports HTTP API for real-time screenshot generation and return
- Supports on-demand demultiplexing and protocol conversion, reducing CPU usage by only enabling it when someone is watching
- Supports cluster deployment in traceable mode, with RTSP/RTMP/HLS/HTTP-TS support for traceable mode and HLS support for edge stations and multiple sources for source stations (using round-robin tracing)
- Can reconnect to streaming after abnormal disconnection in RTSP/RTMP/WebRTC pushing within a timeout period, with no impact on the player.
## System Requirements
## System Requirements
- Compiler support c++11,GCC4.8/Clang3.3/VC2015 or above.
- Compiler with c++11 support, such as GCC 4.8+, Clang 3.3+, or VC2015+.
-cmake3.1 or above.
-CMake 3.1+.
-All Linux , both 32 and 64 bits
-Linux (32-bit and 64-bit).
- Apple OSX(Darwin), both 32 and 64bits.
- Apple macOS (32-bit and 64-bit).
- All hardware with x86/x86_64/arm/mips cpu.
- Any hardware with x86, x86_64, ARM, or MIPS CPU.
- Windows.
- Windows.
## How to build
## How to build
It is recommended to compile on Ubuntu or MacOS,compiling on windows is cumbersome, and some features are not compiled by default.
It is recommended to compile on Ubuntu or macOS. Compiling on Windows is cumbersome, and some features are not compiled by default.
### Before Building
### Before build
-**You must use Git to clone the complete code. Do not download the source code by downloading the ZIP package. Otherwise, the submodule code will not be downloaded by default. You can do it like this:**
-**You must use git to clone the complete code. Do not download the source code by downloading zip package. Otherwise, the sub-module code will not be downloaded by default.You can do it like this:**
The self-owned code of this project is licensed under the permissive MIT License and can be freely applied to commercial and non-commercial projects while retaining copyright information.
However, this project also uses some scattered [open source code](https://github.com/ZLMediaKit/ZLMediaKit/wiki/%E4%BB%A3%E7%A0%81%E4%BE%9D%E8%B5%96%E4%B8%8E%E7%89%88%E6%9D%83%E5%A3%B0%E6%98%8E) , please replace or remove it for commercial use.
Any commercial disputes or infringement caused by using this project have nothing to do with the project and developers and shall be at your own legal risk.
When using the code of this project, the license agreement should also indicate the license of the third-party libraries that this project depends on.
## Contact Information
- Email: <1213642868@qq.com> (For project-related or streaming media-related questions, please follow the issue process. Otherwise, we will not reply to emails.)
- QQ groups: Both QQ groups with a total of 4000 members are full. We will not create new QQ groups in the future. Users can join the [Knowledge Planet](https://github.com/ZLMediaKit/ZLMediaKit/issues/2364) to ask questions and support this project.
If you have any questions about the project, we recommend that you:
- 1. Carefully read the readme and wiki. If necessary, you can also check the issues.
- 2. If your question has not been resolved, you can raise an issue.
- 3. Some questions may not be suitable for issues, but can be raised in QQ groups.
- 4. We generally do not accept free technical consulting and support via QQ private chat. ([Why we don't encourage QQ private chat](https://github.com/ZLMediaKit/ZLMediaKit/wiki/%E4%B8%BA%E4%BB%80%E4%B9%88%E4%B8%8D%E5%BB%BA%E8%AE%AEQQ%E7%A7%81%E8%81%8A%E5%92%A8%E8%AF%A2%E9%97%AE%E9%A2%98%EF%BC%9F)).
- 5. If you need more timely and thoughtful technical support, you can join the [Knowledge Planet](https://github.com/ZLMediaKit/ZLMediaKit/issues/2364) for a fee.
## Special Thanks
This project uses the [media-server](https://github.com/ireader/media-server) library developed by [Lao Chen](https://github.com/ireader). The reuse and de-multiplexing of ts/fmp4/mp4/ps container formats in this project depend on the media-server library. Lao Chen has provided invaluable help and support multiple times in implementing many functions of this project, and we would like to express our sincere gratitude to him!
## Acknowledgments
Thanks to all those who have supported this project in various ways, including but not limited to code contributions, problem feedback, and donations. The following list is not in any particular order:
This project has gained recognition from many companies and individual developers. According to the author's incomplete statistics, companies using this project include well-known Internet giants, leading cloud service companies in China, several well-known AI unicorn companies, as well as a series of small and medium-sized companies. Users can endorse this project by pasting their company name and relevant project information on the [issue page](https://github.com/ZLMediaKit/ZLMediaKit/issues/511). Thank you for your support!