simple-rtmp-server安装

安装分以下几部:

step 1: build srs

tar xf simple-rtmp-server-*.*.tar.gz
cd simple-rtmp-server-*.*/trunk

./configure --with-ssl --with-hls  

/*根据需求,命令不同,

--with-ssl                enable rtmp complex handshake, requires openssl-devel installed.
                            to delivery h264 video and aac audio to flash player.
--with-hls                enable hls streaming, mux RTMP to m3u8/ts files.*/

make
make install   // 默认安装在/usr/local/srs
安装完后,目录下有三个文件夹conf, etc, objs. 我们常用的是conf和objs两个目录下的内容, conf下是各类配置文件的例子, objs下是可执行文件。

step 2: start srs
./objs/srs -c conf/srs.conf

step 4: publish live stream
FMS URL: rtmp://127.0.0.1:1935/live
Stream: livestream
For example, use ffmpeg to publish:
ffmpeg -re -i source.flv -vcodec copy -acodec copy -f flv -y rtmp://127.0.0.1:1935/live/livestream

step 5: play live stream

rtmp url: rtmp://127.0.0.1:1935/live/livestream

 

调试

前台运行

daemon              on;
#以daemon的方式启动,如果要启动在console,那么需要配置daemon off;并且,需要配置srs_log_tank console;

rtmp 延时约3秒,苹果不支持。

http-flv延时约3秒,苹果不支持。

hls切片/转码延时月6秒。

 

测试HTTP-FLV

 

1 编译./configure && make

2 启动

./objs/srs -c conf/http.flv.live.conf

3 推流

 

ffmpeg -re  -i   171.flv  -c copy -f flv rtmp://10.80.3.17/live/1

4 播放

ffplay http://10.80.3.17:8080/live/1.flv

codeblocks测试srs

问题

1打开不了./objs/pid.log。

因为找不到objs,在./cbp同级,新建objs目录。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值