系统安装
镜像下载
VirtualBox
ZLMediaKit编译
编译器和Cmake
bash
sudo yum -y install gcc
sudo yum -y install gcc-c++
sudo yum -y install cmake
sudo yum install openssl openssl-devel
sudo yum install libssl-dev
sudo yum install libsdl-dev
sudo yum install libavcodec-dev
sudo yum install libavutil-dev
sudo yum install ffmpeg
mkdir /opt/cmake
cd /opt/cmake/
wget https://cmake.org/files/v3.26/cmake-3.26.4.tar.gz
tar -xzvf cmake-3.26.4.tar.gz
cd cmake-3.26.4
./configure --prefix=/usr/local/cmake
make && make install
mv /usr/bin/cmake /usr/bin/cmake_bak
ln -s /usr/local/cmake/bin/cmake /usr/bin/cmake
cmake -version
代码克隆
bash
# 国内用户推荐从 Gitee 下载
git clone --depth 1 https://gitee.com/xia-chu/ZLMediaKit
cd ZLMediaKit
# 初始化子模块 (必须执行)
git submodule update --init
编译
bash
cd ZLMediaKit
mkdir build
cd build
cmake ..
make -j4
编译产出
-
产出路径:ZLMediaKit/release/linux/Debug
-
编译好的文件:https://download.csdn.net/download/q317379184/88624905
测试验证
bash
sudo chmod 777 Mediaserver
sudo ./Mediaserver
- 浏览器播放器:http://jessibuca.monibuca.com/player.html
- 播放地址:ws://10.10.13.13:8888/live/test.live.flv?vhost=10.10.13.13
- swagger地址:http://10.10.13.13:80/swagger/#
- restful地址:https://docs.zlmediakit.com/zh/guide/media_server/restful_api.html