mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-02-19 23:00:54 +08:00
Page:
Starting and Stopping the Server
Pages
Benchmark
Dependency and Copyright
GB28181 SIP信令抓包
GB28181怎么用设备ID作为流ID
GB28181推流
HTTP文件服务器优化:获取文件大小
Home
How to create a live steam
MediaServer支持的HTTP API
MediaServer支持的HTTP HOOK API
Playing URL Rules
Quick Start
RTMP对H265和OPUS的支持
RTMP播放兼容性问题
RTSP性能优化
RTSP推流流程
Starting and Stopping the Server
VideoStack多视频流拼接宫格功能
Windows 版编译说明
ZLMediaKit实现按需拉流
ZLMediaKit实现推流鉴权
ZLMediaKit实现播放鉴权
ZLMediaKit推流测试
ZLMediaKit高并发实现原理
ZLMediakit独家特性介绍
postman 自动生成的restful api接口
rtmp拉流性能测试
rtmp推流性能测试
rtsp拉流性能测试
rtsp推流性能测试
vcpkg方式安装zlmediakit
webrtc信令交互格式
zlmediakit webrtc重磅更新
zlmediakit对vp8 vp9 av1编码的全面支持
zlmediakit的hls高性能之旅
zlm启用webrtc编译指南
为什么不建议QQ私聊咨询问题?
代码依赖与版权声明
代码篇之onceToken
使用ZLMediaKit实现按需推流
在线测试
延时测试
快速开始
怎么开启https相关功能
怎么测试ZLMediaKit的延时?
性能测试
播放url规则
时序图
服务器的启动与关闭
流媒体相关技术介绍
生成SSL自签名证书并测试
直播延时的本质
视频会议相关资源
配置文件详解
Clone
1
Starting and Stopping the Server
alexliyu7352 edited this page 2023-05-27 19:57:00 +08:00
Program Path
After compiling ZLMediaKit, the MediaServer main program is generated. The relative path of the program is release/${platform}/${build_type}/MediaServer.
${platform} depends on your operating system, which may be windows/linux/mac, and ${build_type} depends on the compile type you specified when using cmake, which could be Debug/Release.
Start-up and Parameters
- First, please refer to the help for startup parameters:
xzl-mac-pro:Debug xzl$ ./MediaServer -h
-h --help no argument default:null optional print this information
-d --daemon no argument default:null optional start in Daemon mode or not
-l --level argument default:0 optional log level, LTrace~LError(0~4)
-m --max_day argument default:7 optional maximum days to keep the logs
-c --config argument default:/Users/xzl/git/ZLMediaKit/release/mac/Debug/config.ini optional configuration file path
-s --ssl argument default:/Users/xzl/git/ZLMediaKit/release/mac/Debug/ssl.p12 optional path of the SSL certificate file or directory, supports p12/pem types
-t --threads argument default:8 optional number of threads to launch for event triggering
-
Explanation:
- -d(--daemon): Whether to start as a daemon. The daemon does only one thing: monitor whether the child process (the actual working process) has exited, and attempts to restart the child process if it has exited.
- -l(--level): Specifies the log print level, with values ranging from 0 to 4. The higher the level, the fewer logs are printed.
- -m(--max_day): The number of days the log files are kept. Logs created during the current run of the program will be deleted if they exceed this number of days.
- -c(--config): Specifies the configuration file path. The configuration file is in ini format, please refer to the default configuration file of ZLMediaKit.
- -s(--ssl): Specifies the SSL certificate path. The certificate format supports p12 and pem types, which must include both public and private keys, and the private key must not be password encrypted. If a directory is specified, all certificates under the directory will be loaded.
- -t(--threads): Specifies the number of event-driven threads (performing major tasks) and background working threads (performing blocking tasks).
-
Startup command:
- Notes:
-
- If you need to close the shell after starting MediaServer, you need to enter
exitto exit the shell, otherwise closing the shell will also close the MediaServer.
- If you need to close the shell after starting MediaServer, you need to enter
-
- If you are going to use FFmpeg related functions, you should start the program like this:
nohup ./MediaServer -d &. Otherwise, the fork FFmpeg process may cause the MediaServer process to hang.
- If you are going to use FFmpeg related functions, you should start the program like this:
-
Hot Loading of Configuration Files
After modifying and saving the configuration file, enter killall -1 MediaServer in the shell to make ZLMediaKit hot load the configuration file. If successful, it will print the following style of logs:

Stopping the Server
- If you started the server in the background, please enter
killall -2 MediaServerin the shell to gracefully shut down the server (the program will automatically release resources and exit after receiving the SIGINT signal). - Otherwise, you can press
Ctr + Cto exit the program. - The logs when MediaServer exits are as follows:
测试文档
使用教程
- 代码依赖与版权声明
- 快速开始
- vcpkg安装zlmediakit
- 服务器的启动与关闭
- GB28181教程
- 推流播放测试
- RESTful 接口
- RESTful 接口 postman自动生成
- Web Hook 接口
- 配置文件详解
- 播放URL规则
- 按需拉流
- 按需推流
- 播放鉴权
- 推流鉴权
- 怎样创建直播流
- webrtc编译与使用
- webrtc信令交互格式
- webrtc重磅更新
- 怎么开启https相关功能
相关文档和资源
- zlmediakit独家特性
- zlmediakit的hls高性能之旅
- 高并发实现原理
- RTSP推流流程
- 流媒体相关技术介绍
- 直播延时的本质
- rtmp对H265/opus的支持
- ssl自签名证书测试
- 视频会议相关资源

