mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
完善英文说明文档 (#2431)
This commit is contained in:
parent
9a9040ecda
commit
1dd0c69aa0
439
README_en.md
439
README_en.md
@ -1,138 +1,202 @@
|
|||||||
![logo](https://raw.githubusercontent.com/zlmediakit/ZLMediaKit/master/www/logo.png)
|
![logo](https://raw.githubusercontent.com/zlmediakit/ZLMediaKit/master/www/logo.png)
|
||||||
|
|
||||||
# A lightweight ,high performance and stable stream server and client framework based on C++11.
|
# An high-performance, enterprise-level streaming media service framework based on C++11.
|
||||||
|
|
||||||
|
|
||||||
[![license](http://img.shields.io/badge/license-MIT-green.svg)](https://github.com/xia-chu/ZLMediaKit/blob/master/LICENSE)
|
[![](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/ZLMediaKit/ZLMediaKit/blob/master/LICENSE)
|
||||||
[![C++](https://img.shields.io/badge/language-c++-red.svg)](https://en.cppreference.com/)
|
[![](https://img.shields.io/badge/language-c++-red.svg)](https://en.cppreference.com/)
|
||||||
[![platform](https://img.shields.io/badge/platform-linux%20|%20macos%20|%20windows-blue.svg)](https://github.com/xia-chu/ZLMediaKit)
|
[![](https://img.shields.io/badge/platform-linux%20|%20macos%20|%20windows-blue.svg)](https://github.com/ZLMediaKit/ZLMediaKit)
|
||||||
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-yellow.svg)](https://github.com/xia-chu/ZLMediaKit/pulls)
|
[![](https://img.shields.io/badge/PRs-welcome-yellow.svg)](https://github.com/ZLMediaKit/ZLMediaKit/pulls)
|
||||||
[![Build Status](https://travis-ci.org/xia-chu/ZLMediaKit.svg?branch=master)](https://travis-ci.org/xia-chu/ZLMediaKit)
|
|
||||||
|
|
||||||
## Why ZLMediaKit?
|
[![](https://github.com/ZLMediaKit/ZLMediaKit/actions/workflows/android.yml/badge.svg)](https://github.com/ZLMediaKit/ZLMediaKit)
|
||||||
- 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.
|
[![](https://github.com/ZLMediaKit/ZLMediaKit/actions/workflows/linux.yml/badge.svg)](https://github.com/ZLMediaKit/ZLMediaKit)
|
||||||
- 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.
|
[![](https://github.com/ZLMediaKit/ZLMediaKit/actions/workflows/macos.yml/badge.svg)](https://github.com/ZLMediaKit/ZLMediaKit)
|
||||||
- Multiplexing asynchronous network IO based on epoll and multi thread,extreme performance.
|
[![](https://github.com/ZLMediaKit/ZLMediaKit/actions/workflows/windows.yml/badge.svg)](https://github.com/ZLMediaKit/ZLMediaKit)
|
||||||
- Well performance and stable test,can be used commercially.
|
|
||||||
- Support linux, macos, ios, android, Windows Platforms.
|
|
||||||
- Very low latency(lower then one second), video opened immediately.
|
|
||||||
|
|
||||||
## Features
|
[![](https://github.com/ZLMediaKit/ZLMediaKit/actions/workflows/docker.yml/badge.svg)](https://hub.docker.com/r/zlmediakit/zlmediakit/tags)
|
||||||
|
[![](https://img.shields.io/docker/pulls/zlmediakit/zlmediakit)](https://hub.docker.com/r/zlmediakit/zlmediakit/tags)
|
||||||
|
|
||||||
|
## Project 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
|
||||||
|
<img width="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[S] player and pusher.
|
- RTSP[S] player, supports RTSP proxy, supports generating silent audio
|
||||||
- RTP Transport : `rtp over udp` `rtp over tcp` `rtp over http` `rtp udp multicast` .
|
- RTSP[S] push client and server
|
||||||
- Basic/Digest/Url Authentication.
|
- Supports four RTP transmission modes: `rtp over udp` `rtp over tcp` `rtp over http` `rtp multicast`
|
||||||
- H265/H264/AAC/G711/OPUS codec.
|
- Server/client fully supports Basic/Digest authentication, asynchronous configurable authentication interface
|
||||||
- Recorded as mp4.
|
- Supports H265 encoding
|
||||||
- Vod of mp4.
|
- The server supports RTSP pushing (including `rtp over udp` and `rtp over tcp`)
|
||||||
|
- Supports H264/H265/AAC/G711/OPUS/MJPEG encoding. Other encodings can be forwarded but cannot be converted to protocol
|
||||||
|
|
||||||
- RTMP[S]
|
- RTMP[S]
|
||||||
- RTMP[S] server,support player and pusher.
|
- RTMP[S] playback server, supports RTSP/MP4/HLS to RTMP conversion
|
||||||
- RTMP[S] player and pusher.
|
- RTMP[S] publishing server, supports recording and publishing streams
|
||||||
- Support HTTP-FLV/WebSocket-FLV sever.
|
- RTMP[S] player, supports RTMP proxy, supports generating silent audio
|
||||||
- H265/H264/AAC/G711/OPUS codec.
|
- RTMP[S] push client
|
||||||
- Recorded as flv or mp4.
|
- Supports http[s]-flv live streaming
|
||||||
- Vod of mp4.
|
- Supports websocket-flv live streaming
|
||||||
- support [RTMP-H265](https://github.com/ksvc/FFmpeg/wiki)
|
- Supports H264/H265/AAC/G711/OPUS encoding. Other encodings can be forwarded but cannot be converted to protocol
|
||||||
|
- Supports [RTMP-H265](https://github.com/ksvc/FFmpeg/wiki)
|
||||||
|
- Supports [RTMP-OPUS](https://github.com/ZLMediaKit/ZLMediaKit/wiki/RTMP%E5%AF%B9H265%E5%92%8COPUS%E7%9A%84%E6%94%AF%E6%8C%81)
|
||||||
|
|
||||||
- HLS
|
- HLS
|
||||||
- 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
|
||||||
|
- Supports H264/H265/AAC/G711/OPUS encoding
|
||||||
|
|
||||||
- TS
|
- TS
|
||||||
- Support HTTP-TS/WebSocket-TS sever.
|
- Supports http[s]-ts live streaming
|
||||||
|
- Supports ws[s]-ts live streaming
|
||||||
|
- Supports H264/H265/AAC/G711/OPUS encoding
|
||||||
|
|
||||||
- fMP4
|
- fMP4
|
||||||
- Support HTTP-fMP4/WebSocket-fMP4 sever.
|
- Supports http[s]-fmp4 live streaming
|
||||||
|
- Supports ws[s]-fmp4 live streaming
|
||||||
|
- Supports H264/H265/AAC/G711/OPUS/MJPEG encoding
|
||||||
|
|
||||||
- HTTP[S]
|
- HTTP[S] and WebSocket
|
||||||
- HTTP server,suppor directory meun、RESTful http api.
|
- The server supports `directory index generation`, `file download`, `form submission requests`
|
||||||
- HTTP client,downloader,uploader,and http api requester.
|
- The client provides `file downloader (supports resume breakpoint)`, `interface requestor`, `file uploader`
|
||||||
- Cookie supported.
|
- Complete HTTP API server, which can be used as a web backend development framework
|
||||||
- WebSocket Server and Client.
|
- Supports cross-domain access
|
||||||
- File access authentication.
|
- Supports http client/server cookie
|
||||||
|
- Supports WebSocket server and client
|
||||||
- WebRTC(experiential)
|
- Supports http file access authentication
|
||||||
- Support webrtc push stream and transfer to other protocols
|
|
||||||
- Support webrtc play, support other protocol to webrtc
|
- GB28181 and RTP Streaming
|
||||||
- Support simulcast
|
- Supports UDP/TCP RTP (PS/TS/ES) streaming server, which can be converted to RTSP/RTMP/HLS and other protocols
|
||||||
- Support rtx/nack
|
- 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
|
||||||
- Support transport-cc rtcp/rtp ext
|
- Supports H264/H265/AAC/G711/OPUS encoding
|
||||||
- [SRT support](./srt/srt_en.md)
|
- 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 build
|
### Before Building
|
||||||
- **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:**
|
|
||||||
|
- **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:**
|
||||||
```
|
```
|
||||||
git clone https://github.com/xia-chu/ZLMediaKit.git
|
git clone https://github.com/xia-chu/ZLMediaKit.git
|
||||||
cd ZLMediaKit
|
cd ZLMediaKit
|
||||||
git submodule update --init
|
git submodule update --init
|
||||||
```
|
```
|
||||||
|
|
||||||
### Build on linux
|
### Building on Linux
|
||||||
|
|
||||||
- My environment
|
- My Environment
|
||||||
- Ubuntu16.04 64 bit and gcc5.4
|
- Ubuntu 16.04 (64-bit) with GCC 5.4.
|
||||||
- cmake 3.5.1
|
- CMake 3.5.1.
|
||||||
- Guidance
|
- Guidance
|
||||||
|
|
||||||
```
|
```
|
||||||
# If it is on centos6.x, you need to install the newer version of GCC and cmake first,
|
# If it is on CentOS 6.x, you need to install a newer version of GCC and CMake first,
|
||||||
# and then compile manually according to the script "build_for_linux.sh".
|
# and then compile manually according to the "build_for_linux.sh" script.
|
||||||
# If it is on a newer version of a system such as Ubuntu or Debain,
|
# If it is on a newer version of a system such as Ubuntu or Debian,
|
||||||
# step 4 can be manipulated directly.
|
# step 4 can be manipulated directly.
|
||||||
|
|
||||||
# 1、Install GCC5.2 (this step can be skipped if the GCC version is higher than 4.7)
|
# 1. Install GCC 5.2 (this step can be skipped if the GCC version is higher than 4.7).
|
||||||
sudo yum install centos-release-scl -y
|
sudo yum install centos-release-scl -y
|
||||||
sudo yum install devtoolset-4-toolchain -y
|
sudo yum install devtoolset-4-toolchain -y
|
||||||
scl enable devtoolset-4 bash
|
scl enable devtoolset-4 bash
|
||||||
|
|
||||||
# 2、Install cmake (this step can be skipped if the cmake version is higher than 3.1)
|
# 2. Install CMake (this step can be skipped if the CMake version is higher than 3.1).
|
||||||
tar -xvf cmake-3.10.0-rc4.tar.gz #you need download cmake source file manually
|
tar -xvf cmake-3.10.0-rc4.tar.gz #you need to download the CMake source file manually
|
||||||
cd cmake-3.10.0-rc4
|
cd cmake-3.10.0-rc4
|
||||||
./configure
|
./configure
|
||||||
make -j4
|
make -j4
|
||||||
sudo make install
|
sudo make install
|
||||||
|
|
||||||
# 3、Switch to high version GCC
|
# 3. Switch to a higher version of GCC.
|
||||||
scl enable devtoolset-4 bash
|
scl enable devtoolset-4 bash
|
||||||
|
|
||||||
# 4、build
|
# 4. Build.
|
||||||
cd ZLMediaKit
|
cd ZLMediaKit
|
||||||
./build_for_linux.sh
|
./build_for_linux.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
### Build on macOS
|
### Building on macOS
|
||||||
|
|
||||||
- My environment
|
- My Environment
|
||||||
- macOS Sierra(10.12.1) + xcode8.3.1
|
- macOS Sierra (10.12.1) with Xcode 8.3.1.
|
||||||
- Homebrew 1.1.3
|
- Homebrew 1.1.3.
|
||||||
- cmake 3.8.0
|
- CMake 3.8.0.
|
||||||
- Guidance
|
- Guidance
|
||||||
|
|
||||||
```
|
```
|
||||||
@ -140,7 +204,7 @@ git submodule update --init
|
|||||||
./build_for_mac.sh
|
./build_for_mac.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
### Build on iOS
|
### Building on iOS
|
||||||
- You can generate Xcode projects and recompile them , [learn more](https://github.com/leetal/ios-cmake):
|
- You can generate Xcode projects and recompile them , [learn more](https://github.com/leetal/ios-cmake):
|
||||||
|
|
||||||
```
|
```
|
||||||
@ -152,15 +216,16 @@ git submodule update --init
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### Build on Android
|
### Building on Android
|
||||||
|
|
||||||
Now you can open android sudio project in `Android` folder,this is a `aar library` and damo project.
|
Now you can open the Android Studio project in the `Android` folder. This is an `AAR` library and demo project.
|
||||||
|
|
||||||
- My environment
|
- My environment
|
||||||
- macOS Sierra(10.12.1) + xcode8.3.1
|
- macOS Sierra (10.12.1) + Xcode 8.3.1
|
||||||
- Homebrew 1.1.3
|
- Homebrew 1.1.3
|
||||||
- cmake 3.8.0
|
- CMake 3.8.0
|
||||||
- [android-ndk-r14b](https://dl.google.com/android/repository/android-ndk-r14b-darwin-x86_64.zip)
|
- [Android NDK r14b](https://dl.google.com/android/repository/android-ndk-r14b-darwin-x86_64.zip)
|
||||||
|
|
||||||
- Guidance
|
- Guidance
|
||||||
|
|
||||||
```
|
```
|
||||||
@ -168,23 +233,25 @@ git submodule update --init
|
|||||||
export ANDROID_NDK_ROOT=/path/to/ndk
|
export ANDROID_NDK_ROOT=/path/to/ndk
|
||||||
./build_for_android.sh
|
./build_for_android.sh
|
||||||
```
|
```
|
||||||
### Build on Windows
|
|
||||||
|
### Building on Windows
|
||||||
|
|
||||||
- My environment
|
- My environment
|
||||||
- windows 10
|
- Windows 10
|
||||||
- visual studio 2017
|
- Visual Studio 2017
|
||||||
- [cmake-gui](https://cmake.org/files/v3.10/cmake-3.10.0-rc1-win32-x86.msi)
|
- [CMake GUI](https://cmake.org/files/v3.10/cmake-3.10.0-rc1-win32-x86.msi)
|
||||||
|
|
||||||
- Guidance
|
- Guidance
|
||||||
```
|
```
|
||||||
1 Enter the ZLMediaKit directory and execute git submodule update -- init downloads the code for ZLToolKit
|
1. Enter the ZLMediaKit directory and execute `git submodule update --init` to download the code for ZLToolKit.
|
||||||
2 Open the project with cmake-gui and generate the vs project file.
|
2. Open the project with CMake GUI and generate the Visual Studio project file.
|
||||||
3 Find the project file (ZLMediaKit.sln), double-click to open it with vs2017.
|
3. Find the project file (ZLMediaKit.sln), double-click to open it with VS2017.
|
||||||
4 Choose to compile Release version. Find the target file and run the test case.
|
4. Choose to compile the Release version. Find the target file and run the test cases.
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
- As server:
|
- As a server:
|
||||||
```cpp
|
```cpp
|
||||||
TcpServer::Ptr rtspSrv(new TcpServer());
|
TcpServer::Ptr rtspSrv(new TcpServer());
|
||||||
TcpServer::Ptr rtmpSrv(new TcpServer());
|
TcpServer::Ptr rtmpSrv(new TcpServer());
|
||||||
@ -197,7 +264,7 @@ git submodule update --init
|
|||||||
httpsSrv->start<HttpsSession>(mINI::Instance()[Config::Http::kSSLPort]);
|
httpsSrv->start<HttpsSession>(mINI::Instance()[Config::Http::kSSLPort]);
|
||||||
```
|
```
|
||||||
|
|
||||||
- As player:
|
- As a player:
|
||||||
```cpp
|
```cpp
|
||||||
MediaPlayer::Ptr player(new MediaPlayer());
|
MediaPlayer::Ptr player(new MediaPlayer());
|
||||||
weak_ptr<MediaPlayer> weakPlayer = player;
|
weak_ptr<MediaPlayer> weakPlayer = player;
|
||||||
@ -210,7 +277,7 @@ git submodule update --init
|
|||||||
|
|
||||||
auto viedoTrack = strongPlayer->getTrack(TrackVideo);
|
auto viedoTrack = strongPlayer->getTrack(TrackVideo);
|
||||||
if (!viedoTrack) {
|
if (!viedoTrack) {
|
||||||
WarnL << "none video Track!";
|
WarnL << "No video Track!";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
viedoTrack->addDelegate([](const Frame::Ptr &frame) {
|
viedoTrack->addDelegate([](const Frame::Ptr &frame) {
|
||||||
@ -222,14 +289,13 @@ git submodule update --init
|
|||||||
ErrorL << "OnShutdown:" << ex.what();
|
ErrorL << "OnShutdown:" << ex.what();
|
||||||
});
|
});
|
||||||
|
|
||||||
//rtp transport over tcp
|
//RTP transport over TCP
|
||||||
(*player)[Client::kRtpType] = Rtsp::RTP_TCP;
|
(*player)[Client::kRtpType] = Rtsp::RTP_TCP;
|
||||||
player->play("rtsp://admin:jzan123456@192.168.0.122/");
|
player->play("rtsp://admin:jzan123456@192.168.0.122/");
|
||||||
```
|
```
|
||||||
- As proxy server:
|
- As a proxy server:
|
||||||
```cpp
|
```cpp
|
||||||
//support rtmp and rtsp url
|
//Support RTMP and RTSP URLs, but only H264 + AAC codec is supported
|
||||||
//just support H264+AAC
|
|
||||||
auto urlList = {"rtmp://live.hkstv.hk.lxdns.com/live/hks",
|
auto urlList = {"rtmp://live.hkstv.hk.lxdns.com/live/hks",
|
||||||
"rtsp://184.72.239.149/vod/mp4://BigBuckBunny_175k.mov"};
|
"rtsp://184.72.239.149/vod/mp4://BigBuckBunny_175k.mov"};
|
||||||
map<string , PlayerProxy::Ptr> proxyMap;
|
map<string , PlayerProxy::Ptr> proxyMap;
|
||||||
@ -241,7 +307,7 @@ git submodule update --init
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
- As puser:
|
- As a pusher:
|
||||||
```cpp
|
```cpp
|
||||||
PlayerProxy::Ptr player(new PlayerProxy("app","stream"));
|
PlayerProxy::Ptr player(new PlayerProxy("app","stream"));
|
||||||
player->play("rtmp://live.hkstv.hk.lxdns.com/live/hks");
|
player->play("rtmp://live.hkstv.hk.lxdns.com/live/hks");
|
||||||
@ -255,19 +321,162 @@ git submodule update --init
|
|||||||
|
|
||||||
```
|
```
|
||||||
## Docker Image
|
## Docker Image
|
||||||
You can pull a pre-built docker image from Docker Hub and run with
|
|
||||||
|
You can download the pre-compiled image from Docker Hub and start it:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
#This image is pushed by the GitHub continuous integration automatic compilation to keep up with the latest code (master branch)
|
||||||
docker run -id -p 1935:1935 -p 8080:80 -p 8443:443 -p 8554:554 -p 10000:10000 -p 10000:10000/udp -p 8000:8000/udp -p 9000:9000/udp zlmediakit/zlmediakit:master
|
docker run -id -p 1935:1935 -p 8080:80 -p 8443:443 -p 8554:554 -p 10000:10000 -p 10000:10000/udp -p 8000:8000/udp -p 9000:9000/udp zlmediakit/zlmediakit:master
|
||||||
```
|
```
|
||||||
|
|
||||||
Dockerfile is also supplied to build images on Ubuntu 16.04
|
You can also compile the image based on the Dockerfile:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd docker
|
bash build_docker_images.sh
|
||||||
docker build -t zlmediakit .
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Contact
|
## Collaborative Projects
|
||||||
- Email:<1213642868@qq.com>
|
|
||||||
- QQ chat group:542509000
|
|
||||||
|
|
||||||
|
- Visual management website
|
||||||
|
- [The latest web project with front-end and back-end separation, supporting webrtc playback](https://github.com/langmansh/AKStreamNVR)
|
||||||
|
- [Management web site based on ZLMediaKit master branch](https://gitee.com/kkkkk5G/MediaServerUI)
|
||||||
|
- [Management web site based on ZLMediaKit branch](https://github.com/chenxiaolei/ZLMediaKit_NVR_UI)
|
||||||
|
- [A very beautiful visual background management system](https://github.com/MingZhuLiu/ZLMediaServerManagent)
|
||||||
|
|
||||||
|
- Media management platform
|
||||||
|
- [GB28181 complete solution with web management website, supporting webrtc and h265 playback](https://github.com/648540858/wvp-GB28181-pro)
|
||||||
|
- [Powerful media control and management interface platform, supporting GB28181](https://github.com/chatop2020/AKStream)
|
||||||
|
- [GB28181 server implemented in Go](https://github.com/panjjo/gosip)
|
||||||
|
- [Node-js version of GB28181 platform](https://gitee.com/hfwudao/GB28181_Node_Http)
|
||||||
|
- [Hikvision ehome server implemented in Go](https://github.com/tsingeye/FreeEhome)
|
||||||
|
|
||||||
|
- Client
|
||||||
|
- [Complete C# wrapper library for c sdk](https://github.com/malegend/ZLMediaKit.Autogen)
|
||||||
|
- [Push client implemented based on C SDK](https://github.com/hctym1995/ZLM_ApiDemo)
|
||||||
|
- [Http API and Hook in C#](https://github.com/chengxiaosheng/ZLMediaKit.HttpApi)
|
||||||
|
- [RESTful client in DotNetCore](https://github.com/MingZhuLiu/ZLMediaKit.DotNetCore.Sdk)
|
||||||
|
|
||||||
|
- Player
|
||||||
|
- [Player supporting H265 based on wasm](https://github.com/numberwolf/h265web.js)
|
||||||
|
- [WebSocket-fmp4 player based on MSE](https://github.com/v354412101/wsPlayer)
|
||||||
|
- [Domestic webrtc sdk(metaRTC)](https://github.com/metartc/metaRTC)
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
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.
|
||||||
|
- Follow WeChat Official Account:
|
||||||
|
<img src=https://user-images.githubusercontent.com/11495632/232451702-4c50bc72-84d8-4c94-af2b-57290088ba7a.png width=15% />
|
||||||
|
|
||||||
|
## How to Ask Questions?
|
||||||
|
|
||||||
|
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:
|
||||||
|
|
||||||
|
[老陈](https://github.com/ireader)
|
||||||
|
[Gemfield](https://github.com/gemfield)
|
||||||
|
[南冠彤](https://github.com/nanguantong2)
|
||||||
|
[凹凸慢](https://github.com/tsingeye)
|
||||||
|
[chenxiaolei](https://github.com/chenxiaolei)
|
||||||
|
[史前小虫](https://github.com/zqsong)
|
||||||
|
[清涩绿茶](https://github.com/baiyfcu)
|
||||||
|
[3503207480](https://github.com/3503207480)
|
||||||
|
[DroidChow](https://github.com/DroidChow)
|
||||||
|
[阿塞](https://github.com/HuoQiShuai)
|
||||||
|
[火宣](https://github.com/ChinaCCF)
|
||||||
|
[γ瑞γミ](https://github.com/JerryLinGd)
|
||||||
|
[linkingvision](https://www.linkingvision.com/)
|
||||||
|
[茄子](https://github.com/taotaobujue2008)
|
||||||
|
[好心情](mailto:409257224@qq.com)
|
||||||
|
[浮沉](https://github.com/MingZhuLiu)
|
||||||
|
[Xiaofeng Wang](https://github.com/wasphin)
|
||||||
|
[doodoocoder](https://github.com/doodoocoder)
|
||||||
|
[qingci](https://github.com/Colibrow)
|
||||||
|
[swwheihei](https://github.com/swwheihei)
|
||||||
|
[KKKKK5G](https://gitee.com/kkkkk5G)
|
||||||
|
[Zhou Weimin](mailto:zhouweimin@supremind.com)
|
||||||
|
[Jim Jin](https://github.com/jim-king-2000)
|
||||||
|
[西瓜丶](mailto:392293307@qq.com)
|
||||||
|
[MingZhuLiu](https://github.com/MingZhuLiu)
|
||||||
|
[chengxiaosheng](https://github.com/chengxiaosheng)
|
||||||
|
[big panda](mailto:2381267071@qq.com)
|
||||||
|
[tanningzhong](https://github.com/tanningzhong)
|
||||||
|
[hctym1995](https://github.com/hctym1995)
|
||||||
|
[hewenyuan](https://gitee.com/kingyuanyuan)
|
||||||
|
[sunhui](mailto:sunhui200475@163.com)
|
||||||
|
[mirs](mailto:fangpengcheng@bilibili.com)
|
||||||
|
[Kevin Cheng](mailto:kevin__cheng@outlook.com)
|
||||||
|
[Liu Jiang](mailto:root@oopy.org)
|
||||||
|
[along](https://github.com/alongl)
|
||||||
|
[qingci](mailto:xpy66swsry@gmail.com)
|
||||||
|
[lyg1949](mailto:zh.ghlong@qq.com)
|
||||||
|
[zhlong](mailto:zh.ghlong@qq.com)
|
||||||
|
[大裤衩](mailto:3503207480@qq.com)
|
||||||
|
[droid.chow](mailto:droid.chow@gmail.com)
|
||||||
|
[陈晓林](https://github.com/musicwood)
|
||||||
|
[CharleyWangHZ](https://github.com/CharleyWangHZ)
|
||||||
|
[Johnny](https://github.com/johzzy)
|
||||||
|
[DoubleX69](https://github.com/DoubleX69)
|
||||||
|
[lawrencehj](https://github.com/lawrencehj)
|
||||||
|
[yangkun](mailto:xyyangkun@163.com)
|
||||||
|
[Xinghua Zhao](mailto:holychaossword@hotmail.com)
|
||||||
|
[hejilin](https://github.com/brokensword2018)
|
||||||
|
[rqb500](https://github.com/rqb500)
|
||||||
|
[Alex](https://github.com/alexliyu7352)
|
||||||
|
[Dw9](https://github.com/Dw9)
|
||||||
|
[明月惊鹊](mailto:mingyuejingque@gmail.com)
|
||||||
|
[cgm](mailto:2958580318@qq.com)
|
||||||
|
[hejilin](mailto:1724010622@qq.com)
|
||||||
|
[alexliyu7352](mailto:liyu7352@gmail.com)
|
||||||
|
[cgm](mailto:2958580318@qq.com)
|
||||||
|
[haorui wang](https://github.com/HaoruiWang)
|
||||||
|
[joshuafc](mailto:joshuafc@foxmail.com)
|
||||||
|
[JayChen0519](https://github.com/JayChen0519)
|
||||||
|
[zx](mailto:zuoxue@qq.com)
|
||||||
|
[wangcker](mailto:wangcker@163.com)
|
||||||
|
[WuPeng](mailto:wp@zafu.edu.cn)
|
||||||
|
[starry](https://github.com/starry)
|
||||||
|
[mtdxc](https://github.com/mtdxc)
|
||||||
|
[胡刚风](https://github.com/hugangfeng333)
|
||||||
|
[zhao85](https://github.com/zhao85)
|
||||||
|
[dreamisdream](https://github.com/dreamisdream)
|
||||||
|
[dingcan](https://github.com/dcan123)
|
||||||
|
[Haibo Chen](https://github.com/duiniuluantanqin)
|
||||||
|
[Leon](https://gitee.com/leon14631)
|
||||||
|
[custompal](https://github.com/custompal)
|
||||||
|
[PioLing](https://github.com/PioLing)
|
||||||
|
[KevinZang](https://github.com/ZSC714725)
|
||||||
|
[gongluck](https://github.com/gongluck)
|
||||||
|
[a-ucontrol](https://github.com/a-ucontrol)
|
||||||
|
[TalusL](https://github.com/TalusL)
|
||||||
|
[ahaooahaz](https://github.com/AHAOAHA)
|
||||||
|
[TempoTian](https://github.com/TempoTian)
|
||||||
|
[Derek Liu](https://github.com/yjkhtddx)
|
||||||
|
[ljx0305](https://github.com/ljx0305)
|
||||||
|
[朱如洪 ](https://github.com/zhu410289616)
|
||||||
|
[lijin](https://github.com/1461521844lijin)
|
||||||
|
[PioLing](https://github.com/PioLing)
|
||||||
|
|
||||||
|
## Use Cases
|
||||||
|
|
||||||
|
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!
|
||||||
|
Loading…
Reference in New Issue
Block a user