Simple Rtmp Server的安装与简单使用
2015-12-22 16:17
459 查看
Simple Rtmp Server是一个国人编写的开源的RTMP/HLS流媒体服务器. 功能与nginx-rtmp-module类似, 可以实现rtmp/hls的分发.
有关nginx-rtmp-module的可参照: http://blog.csdn.net/redstarofsleep/article/details/45092147
编译与安装过程十分的简单
[plain]
view plaincopyprint?
./configure --prefix=/usr/local/srs --rtmp-hls
make
make install
安装完后,目录下有三个文件夹conf, etc, objs. 我们常用的是conf和objs两个目录下的内容, conf下是各类配置文件的例子, objs下是可执行文件.
启动服务器是通过-c参数指定一个配置文件即可
[plain]
view plaincopyprint?
./objs/srs -c conf/hls.conf
如果是hls的话,配置文件大概是这样的:
[plain]
view plaincopyprint?
# the config for srs to delivery hls # @see https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_SampleHLS # @see full.conf for detail config. listen 1935; max_connections 1000; vhost __defaultVhost__ { hls { enabled on; hls_path /usr/local/nginx/html; hls_fragment 10; hls_window 60; } }
其中的hls_path是存放hls分片ts文件和m3u8的目录, 我上面的例子中把它指定到nginx下.这样就可以直接播放hls视频流了.
如果是ffmpeg推送,那是和nginx-rtmp-module是一样的:
[plain]
view plaincopyprint?
ffmpeg -re -i "D:\download\film\aqgy\02.mp4" -vcodec libx264 -vprofile baseline -acodec aac -ar 44100 -strict -2 -ac 1 -f flv -s 1280x720 -q 10 rtmp://server:1935/ myapp/test1
总体来说这个SimpleRtmpServer在配置使用上没有什么难度,基本都是参照nginx-rtmp-module的.
转载请注明出处
http://blog.csdn.net/redstarofsleep
Simple Rtmp Server是一个国人编写的开源的RTMP/HLS流媒体服务器. 功能与nginx-rtmp-module类似, 可以实现rtmp/hls的分发.
有关nginx-rtmp-module的可参照: http://blog.csdn.net/redstarofsleep/article/details/45092147
编译与安装过程十分的简单
[plain]
view plaincopyprint?
./configure --prefix=/usr/local/srs --rtmp-hls
make
make install
./configure --prefix=/usr/local/srs --rtmp-hls make make install标准的三条命令就可完成安装. --rtmp-hls表示开启rtmp和hls, 其它的编译参数可通过./configure -h查看.
安装完后,目录下有三个文件夹conf, etc, objs. 我们常用的是conf和objs两个目录下的内容, conf下是各类配置文件的例子, objs下是可执行文件.
启动服务器是通过-c参数指定一个配置文件即可
[plain]
view plaincopyprint?
./objs/srs -c conf/hls.conf
./objs/srs -c conf/hls.conf
如果是hls的话,配置文件大概是这样的:
[plain]
view plaincopyprint?
# the config for srs to delivery hls # @see https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_SampleHLS # @see full.conf for detail config. listen 1935; max_connections 1000; vhost __defaultVhost__ { hls { enabled on; hls_path /usr/local/nginx/html; hls_fragment 10; hls_window 60; } }
# the config for srs to delivery hls # @see https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_SampleHLS # @see full.conf for detail config. listen 1935; max_connections 1000; vhost __defaultVhost__ { hls { enabled on; hls_path /usr/local/nginx/html; hls_fragment 10; hls_window 60; } }
其中的hls_path是存放hls分片ts文件和m3u8的目录, 我上面的例子中把它指定到nginx下.这样就可以直接播放hls视频流了.
如果是ffmpeg推送,那是和nginx-rtmp-module是一样的:
[plain]
view plaincopyprint?
ffmpeg -re -i "D:\download\film\aqgy\02.mp4" -vcodec libx264 -vprofile baseline -acodec aac -ar 44100 -strict -2 -ac 1 -f flv -s 1280x720 -q 10 rtmp://server:1935/ myapp/test1
ffmpeg -re -i "D:\download\film\aqgy\02.mp4" -vcodec libx264 -vprofile baseline -acodec aac -ar 44100 -strict -2 -ac 1 -f flv -s 1280x720 -q 10 rtmp://server:1935/ myapp/test1
总体来说这个SimpleRtmpServer在配置使用上没有什么难度,基本都是参照nginx-rtmp-module的.
转载请注明出处
http://blog.csdn.net/redstarofsleep
相关文章推荐
- Android Support V4, V7, V13的作用
- C语言实现单向链表的反转
- HDOJ 4556 Stern-Brocot Tree
- Android WebView总结
- 解决TextView中MaxLines与ellipsize=end冲突问题
- iOS开发系列--并行开发其实很容易
- mysql数据库基本数据类型
- 232转can can-232 10年销量I厂家
- php地址引用
- openstack 配置项理解
- 欢迎使用CSDN-markdown编辑器
- 数据结构初步认识
- 程序员看中的浏览器
- 玩转四旋翼无人机(DJI_QT_SDK)
- log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader). l
- 使用Apache的server-status,禁止IP访问服务器
- 指针与数组
- Qt学习(11)
- 关于精度计算的问题
- jquery serialize序列化中文乱码问题