介绍
ZLMediaKit 是一个基于 C++11 的高性能运营级流媒体服务框架
环境要求
ubuntu 18.04 64bit
ZLMediaKit 20210924
ffmpeg 3.4.8
安装过程
root@ecs-gnht-yz-0002:~# mkdir /data
root@ecs-gnht-yz-0002:~# cd /data/
# 安装编译器
root@ecs-gnht-yz-0002:/data# apt install build-essential cmake -y
# 其它依赖库
# apt-get install libssl-dev libsdl-dev libavcodec-dev libavutil-dev ffmpeg -y
完成后,就可以开始拉取源码并编译了,依次执行下面命令
root@ecs-gnht-yz-0002:/data# git clone https://github.com/ZLMediaKit/ZLMediaKit.git
root@ecs-gnht-yz-0002:/data# cd ZLMediaKit/
# 更新子模块
root@ecs-gnht-yz-0002:/data/ZLMediaKit# git submodule update --init
root@ecs-gnht-yz-0002:/data/ZLMediaKit# mkdir build
root@ecs-gnht-yz-0002:/data/ZLMediaKit# cd build
root@ecs-gnht-yz-0002:/data/ZLMediaKit/build# cmake ..
root@ecs-gnht-yz-0002:/data/ZLMediaKit/build# make -j 4
启动
root@ecs-gnht-yz-0002:/data/ZLMediaKit/build# cd ../release/linux/
# cd /data/ZLMediaKit/release/linux/Debug
root@ecs-gnht-yz-0002:/data/ZLMediaKit/release/linux/Debug# ./MediaServer -d
【后台启动】
root@ecs-gnht-yz-0002:/data/ZLMediaKit/release/linux/Debug# nohup ./MediaServer -d &
报错汇总
root@ecs-gnht-yz-0002:/data/ZLMediaKit# mkdir build
root@ecs-gnht-yz-0002:/data/ZLMediaKit# cd build
cmake ..
-- srt 功能已开启
CMake Warning at webrtc/CMakeLists.txt:28 (message):
srtp 未找到, WebRTC 相关功能打开失败
root@ecs-gnht-yz-0002:/data/ZLMediaKit/build# cd /data/
root@ecs-gnht-yz-0002:/data# git clone https://github.com/cisco/libsrtp.git
root@ecs-gnht-yz-0002:/data/libsrtp# ./configure --enable-openssl
root@ecs-gnht-yz-0002:/data/libsrtp# make -j 4
root@ecs-gnht-yz-0002:/data/libsrtp# make install