SRS官网,v3Home介绍,部署帮助。
1.创建一个srs项目文件夹
2.进入后用git命令拉取3.0release版本:git clone -b 3.0release https://gitee.com/ossrs/srs.git
3.进入srs/trunk目录打开终端输入命令:./configure
4.继续输入命令:make
5.Build openssl提示是自带openssl老版本导致的,我们下载新的openssl,顺序输入下面命令
sudo apt-get install openssl
sudo apt-get install libssl-dev
sudo apt-get install libssl0.9.8
sudo apt-get install libgtk2.0-dev
6.输入命令:./configure --full --use-sys-ssl
输入命令:make
7.输入命令:./configure --without-utest --full --use-sys-ssl
输入命令: make (没报错忽略第7步)
编译成功,启动输入命令:./objs/srs -c conf/srs.conf
拉流测试
Ffmpeg推流命令:
ffmpeg -re -i source.flv -vcodec copy -acodec copy -f flv -y rtmp://192.168.29.132/live/livestream
ffplay拉流命令:
ffplay rtmp://192.168.29.132/live/livestream
flv拉流测试:
http://192.168.29.132:8080/players/srs_player.html
http://192.168.29.132:8080/live/livestream.flv
停止服务输入命令:./scripts/stop.sh