ubuntu amd64 srs下载编译
srs官网:https://github.com/ossrs/srs
码云地址 这个下载的快一些
获取srs源码
git clone https://gitee.com/winlinvip/srs.oschina.git cd srs.oschina #使⽤当前最新的3.0版本 git checkout -b 3.0 remotes/origin/3.0release cd trunk
配置和编译
./configure && make -j8
编写配置文件详细参考rtmp分发
# the config for srs to delivery RTMP # @see https://github.com/ossrs/srs/wiki/v1_CN_SampleRTMP # @see full.conf for detail config. listen 1935; max_connections 1000; vhost __defaultVhost__ { }
启动srs
sudo ./objs/srs -c conf/rtmp.conf
ffmpeg 推流到srs服务器
ffmpeg -re -i 720p.avi -vcodec copy -acodec copy -f flv -y rtmp://192.168.87.114/live/livestream
obs文件推流