视频会议直播和存储
2015-06-06 03:35
417 查看
DVR的配置文件说明:
DVR的计划即决定什么时候关闭flv文件,打开新的flv文件,主要的录制计划包括:
session:按照session来关闭flv文件,即编码器停止推流时关闭flv,整个session录制为一个flv。
segment:按照时间分段录制,flv文件时长配置为dvr_duration和dvr_wait_keyframe。注意:若不按关键帧切flv(即dvr_wait_keyframe配置为off),所以会导致后面的flv启动时会花屏。
time_jitter: 时间戳抖动算法。full使用完全的时间戳矫正;zero只是保证从0开始;off不矫正时间戳。
1,编译设置
2,启动
3,,视频录制效果
本地视频观看
服务端视频存储
注:启动./objs/srs -c conf/dvr.session.conf之前必须先停止所有的SRS进程
参考资料:https://github.com/simple-rtmp-server/srs/wiki/v1_CN_DVR
# dvr RTMP stream to file, # start to record to file when encoder publish, # reap flv according by specified dvr_plan. dvr { # whether enabled dvr features # default: off enabled on; # the dvr output path. # the app dir is auto created under the dvr_path. # for example, for rtmp stream: # rtmp://127.0.0.1/live/livestream # http://127.0.0.1/live/livestream.m3u8 # where dvr_path is /dvr, srs will create the following files: # /dvr/live the app dir for all streams. # /dvr/live/livestream.{time}.flv the dvr flv file. # @remark, the time use system timestamp in ms, user can use http callback to rename it. # in a word, the dvr_path is for vhost. # default: ./objs/nginx/html dvr_path ./objs/nginx/html; # the dvr plan. canbe: # session reap flv when session end(unpublish). # segment reap flv when flv duration exceed the specified dvr_duration. # default: session dvr_plan session; # the param for plan(segment), in seconds. # default: 30 dvr_duration 30; # the param for plan(segment), # whether wait keyframe to reap segment, # if off, reap segment when duration exceed the dvr_duration, # if on, reap segment when duration exceed and got keyframe. # default: on dvr_wait_keyframe on; # about the stream monotonically increasing: # 1. video timestamp is monotonically increasing, # 2. audio timestamp is monotonically increasing, # 3. video and audio timestamp is interleaved monotonically increasing. # it's specified by RTMP specification, @see 3. Byte Order, Alignment, and Time Format # however, some encoder cannot provides this feature, please set this to off to ignore time jitter. # the time jitter algorithm: # 1. full, to ensure stream start at zero, and ensure stream monotonically increasing. # 2. zero, only ensure sttream start at zero, ignore timestamp jitter. # 3. off, disable the time jitter algorithm, like atc. # default: full time_jitter full; }
DVR的计划即决定什么时候关闭flv文件,打开新的flv文件,主要的录制计划包括:
session:按照session来关闭flv文件,即编码器停止推流时关闭flv,整个session录制为一个flv。
segment:按照时间分段录制,flv文件时长配置为dvr_duration和dvr_wait_keyframe。注意:若不按关键帧切flv(即dvr_wait_keyframe配置为off),所以会导致后面的flv启动时会花屏。
time_jitter: 时间戳抖动算法。full使用完全的时间戳矫正;zero只是保证从0开始;off不矫正时间戳。
1,编译设置
./configure --with-dvr && make
2,启动
./objs/srs -c conf/dvr.session.conf
3,,视频录制效果
本地视频观看
服务端视频存储
注:启动./objs/srs -c conf/dvr.session.conf之前必须先停止所有的SRS进程
参考资料:https://github.com/simple-rtmp-server/srs/wiki/v1_CN_DVR
相关文章推荐
- JAVA的三大特征 封装继承多态- 简单总结
- devise 小项目(一)
- jQuery笔记(1)
- 虚拟机ubuntu14.04系统使用samba与win7文件共享
- Google photos -- reverse thinking
- 基于SRS的视频直播服务器搭建
- ubuntu14.04 nfs服务器搭建
- ubuntu14.04安装tftp服务器
- 理解RESTful架构
- 镜像分发工具压测解决方案——hijack压测
- KVM 介绍(4)
- poj 2253 Frogger
- centos 零碎学习小记 13.
- weblogic性能调优参考
- apache commons-io相关介绍-IOUtils类
- 菜鸟学Android笔记(二十四):ServletContext1
- Java中的中间缓存变量机制
- Maximal Square
- linux中断源码分析 - 软中断(四)
- linux中断源码分析 - 中断发生(三)