simple-rtmp-server安装
2016-05-24 16:33
288 查看
安装分以下几部:
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
2 启动
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
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
相关文章推荐
- css实现正方形div的3种方式
- 基于JQuery实现图片上传预览与删除操作
- 网页元素CSS居中实现完整攻略
- Android使用ethtool工具查询/设置以太网网卡状态
- linux内核细节-va_arg、va_end、va_start、printf
- C# Delegate(委托)与多线程
- ftp认识
- 线程的单例模式与延迟加载中的Initialization on Demand Holder
- java 国际化
- 关于Sublime Text 3的常见问题
- Sql Server Tempdb原理-日志机制解析实践
- 深度卷积网络CNN与图像语义分割
- android开发过程中异常和解决办法
- SVN常用命令
- 【嵌入式学习笔记二】烧录制作好的镜像到4412开发板中
- css reset
- js学习笔记之锚点的用法
- S-02. 文件服务安装与配置 ❀ Windows Server 2008 R2
- Python中函数的使用
- ListView的使用用ViewHolder提升效率