rtsp2rtmp程序,从rtsp摄像机获取流,转换为rtmp push到FMS
2016-04-18 10:12
113 查看
/article/3631872.html
分类:
流媒体开发(12)
版权声明:可自由转载。
软件功能:
1、从rtsp摄像机(rtsp server)获取流,然后转换为rtmp协议,将流推送到FMS(Flash Media Server)上面。
2、支持2000路以上rtsp摄像机(受限于CPU能力),只需要编辑rtsp2rtmp.conf文件即可,如下:
[0]
rtsp_url=rtsp://192.168.2.10:554/stream/1
rtmp_url=rtmp://192.168.2.9/live/720P
;rtsp_url=rtsp://username:password@192.168.2.10:554/stream/1
;[1]
;rtsp_url=rtsp://192.168.2.10:554/stream/2
;rtmp_url=rtmp://192.168.2.9/live/CIF
3、可运行于windows or linux平台。
4、可根据用户要求提供操作界面。
应用场景:
1、幼儿园等小型商业客户,将N台rtsp摄像机数据通过一台rtmp服务器推送到FMS进行直播。
2、openwrt路由器,将N台wifi ipcam收敛后传送给FMS作为直播。
调试过程,用一台hi3518E摄像机作为流,用srs作为FMS。用ubuntu虚拟机作为运行环境。
先把srs跑起来,srs就是Flash Media Server。
binaries @see: https://github.com/simple-rtmp-server/srs/wiki/v1_CN_Build
you can:
./objs/srs -c conf/srs.conf
to start the srs server, with config conf/srs.conf.
make[1]: Leaving directory `/home/srs/trunk'
root@freeman-desktop:/home/srs/trunk# vi run.sh
root@freeman-desktop:/home/srs/trunk# chmod +x run.sh
root@freeman-desktop:/home/srs/trunk# ./run.sh
[2015-10-10 19:57:13.976][trace][3130][0] config parse complete
[2015-10-10 19:57:13.976][trace][3130][0] write log to file ./objs/srs.log
[2015-10-10 19:57:13.976][trace][3130][0] you can: tailf ./objs/srs.log
[2015-10-10 19:57:13.976][trace][3130][0] @see: https://github.com/simple-rtmp-server/srs/wiki/v1_CN_SrsLog
root@freeman-desktop:/home/srs/trunk# ps
PID TTY TIME CMD
2433 pts/0 00:00:00 su
2443 pts/0 00:00:00 bash
3132 pts/0 00:00:00 srs
3133 pts/0 00:00:00 ps
运行rtsp2rtmp&时,总是发生Segmentation fault的现象。
./rtsp2rtmp &
[1] 2234
root@freeman-desktop:/home/rtsp2rtmp/master/src#
[1]+ Segmentation fault ./rtsp2rtmp
查明原因:srs编译时使用了--without-ssl。在srs/objs/下面,有一些第三方lib,包括http-parser-2.1, gtest-1.6.0,openssl-1.0.1f,st-1.9。
把它们重新配置编译一下就可以。
http://www.ossrs.net/srs.release/trunk/research/players/srs_player.html?
填入:rtmp://192.168.2.9/live/main就可以播放了。
分类:
流媒体开发(12)
版权声明:可自由转载。
软件功能:
1、从rtsp摄像机(rtsp server)获取流,然后转换为rtmp协议,将流推送到FMS(Flash Media Server)上面。
2、支持2000路以上rtsp摄像机(受限于CPU能力),只需要编辑rtsp2rtmp.conf文件即可,如下:
[0]
rtsp_url=rtsp://192.168.2.10:554/stream/1
rtmp_url=rtmp://192.168.2.9/live/720P
;rtsp_url=rtsp://username:password@192.168.2.10:554/stream/1
;[1]
;rtsp_url=rtsp://192.168.2.10:554/stream/2
;rtmp_url=rtmp://192.168.2.9/live/CIF
3、可运行于windows or linux平台。
4、可根据用户要求提供操作界面。
应用场景:
1、幼儿园等小型商业客户,将N台rtsp摄像机数据通过一台rtmp服务器推送到FMS进行直播。
2、openwrt路由器,将N台wifi ipcam收敛后传送给FMS作为直播。
调试过程,用一台hi3518E摄像机作为流,用srs作为FMS。用ubuntu虚拟机作为运行环境。
先把srs跑起来,srs就是Flash Media Server。
binaries @see: https://github.com/simple-rtmp-server/srs/wiki/v1_CN_Build
you can:
./objs/srs -c conf/srs.conf
to start the srs server, with config conf/srs.conf.
make[1]: Leaving directory `/home/srs/trunk'
root@freeman-desktop:/home/srs/trunk# vi run.sh
root@freeman-desktop:/home/srs/trunk# chmod +x run.sh
root@freeman-desktop:/home/srs/trunk# ./run.sh
[2015-10-10 19:57:13.976][trace][3130][0] config parse complete
[2015-10-10 19:57:13.976][trace][3130][0] write log to file ./objs/srs.log
[2015-10-10 19:57:13.976][trace][3130][0] you can: tailf ./objs/srs.log
[2015-10-10 19:57:13.976][trace][3130][0] @see: https://github.com/simple-rtmp-server/srs/wiki/v1_CN_SrsLog
root@freeman-desktop:/home/srs/trunk# ps
PID TTY TIME CMD
2433 pts/0 00:00:00 su
2443 pts/0 00:00:00 bash
3132 pts/0 00:00:00 srs
3133 pts/0 00:00:00 ps
运行rtsp2rtmp&时,总是发生Segmentation fault的现象。
./rtsp2rtmp &
[1] 2234
root@freeman-desktop:/home/rtsp2rtmp/master/src#
[1]+ Segmentation fault ./rtsp2rtmp
查明原因:srs编译时使用了--without-ssl。在srs/objs/下面,有一些第三方lib,包括http-parser-2.1, gtest-1.6.0,openssl-1.0.1f,st-1.9。
把它们重新配置编译一下就可以。
http://www.ossrs.net/srs.release/trunk/research/players/srs_player.html?
填入:rtmp://192.168.2.9/live/main就可以播放了。
相关文章推荐
- 学好Mac常用命令,助力iOS开发
- 学好Mac常用命令,助力iOS开发
- Spring + Struts2 + ExtJs 权限管理的设计(一)数据库的设计
- android:layout_weight的真实含义
- 漫谈前端开发中的SEO
- Excel文件单元格中输入对勾
- 插件(二)ShatterToolkit初探
- java中HashMap和HashSet的实现
- Android获取屏幕宽高新方法
- 关于mysql授权账号权限时的空密码问题
- 认识C和内存管理
- jquery的ajax同步和异步
- HDU 4135 Co-prime (包含排斥原理+筛选法求素数)
- J2SE(四)Java之类的详解
- android加边框处理方式
- Fragment基本使用
- 插件(一)武器拖尾效果
- anroid中httpclient异步下载
- Python 实现键盘操作之Crtl+方向键
- 把textarea右下角的灰点去掉