ubuntu 18.04 安装zlmediakit webrtc

sudo apt-get install cmake
sudo apt-get install libssl-dev
sudo apt-get install libsdl-dev
sudo apt-get install libavcodec-dev
sudo apt-get install libavutil-dev
sudo apt-get install ffmpeg

openssl version

git clone https://github.com/cisco/libsrtp.git
cd libsrtp
./configure --enable-openssl
make
sudo make install

git clone --depth 1 https://gitee.com/xia-chu/ZLMediaKit.git
cd ZLMediaKit
git submodule update --init
mkdir build
cd build

# 加入webrtc的编译选项
cmake .. -DENABLE_WEBRTC=on
make

 启动程序

$ cd release/linux/Debug/
$ sudo ./MediaServer

 

测试
ffmpeg -re -stream_loop -1 -i test.mp4 -vcodec h264 -acodec aac -f flv rtmp://192.168.0.142/live/test

 

http://192.168.0.142:81

http://192.168.0.142:81/index/api/webrtc?app=live&stream=test&type=play

http://192.168.0.142:81/index/api/webrtc?app=rtp&stream=34020000001320000002-34020000001320000002&type=play

http://192.168.0.142:81/index/api/webrtc?app=rtp&stream=34020000001320000013-34020000001320000013&type=play

 

http://192.168.0.142:81/index/api/getMediaList?Secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&schema=rtsp

posted @ 2022-09-01 10:11  CHHC  阅读(468)  评论(0编辑  收藏  举报