Skip to content

Commit

Permalink
for #738, refine the dvr segmenter.
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Feb 6, 2017
1 parent 31191f2 commit 8c01f52
Show file tree
Hide file tree
Showing 9 changed files with 458 additions and 274 deletions.
13 changes: 13 additions & 0 deletions trunk/conf/dvr.mp4.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# the config for srs to dvr in session mode
# @see https://github.com/ossrs/srs/wiki/v3_CN_DVR
# @see full.conf for detail config.

listen 1935;
max_connections 1000;
vhost __defaultVhost__ {
dvr {
enabled on;
dvr_path ./objs/nginx/html/[app]/[stream].[timestamp].mp4;
dvr_plan session;
}
}
15 changes: 10 additions & 5 deletions trunk/conf/full.conf
Original file line number Diff line number Diff line change
Expand Up @@ -1103,9 +1103,9 @@ vhost hds.srs.com {

# vhost for dvr
vhost dvr.srs.com {
# dvr RTMP stream to file,
# DVR RTMP stream to file,
# start to record to file when encoder publish,
# reap flv according by specified dvr_plan.
# reap flv/mp4 according by specified dvr_plan.
dvr {
# whether enabled dvr features
# default: off
Expand All @@ -1118,12 +1118,13 @@ vhost dvr.srs.com {
# default: all
dvr_apply all;
# the dvr plan. canbe:
# session reap flv when session end(unpublish).
# segment reap flv when flv duration exceed the specified dvr_duration.
# session reap flv/mp4 when session end(unpublish).
# segment reap flv/mp4 when flv duration exceed the specified dvr_duration.
# append always append to flv file, never reap it.
# @remark MP4 only support session or segment plan, not suport append plan.
# default: session
dvr_plan session;
# the dvr output path.
# the dvr output path, *.flv or *.mp4.
# we supports some variables to generate the filename.
# [vhost], the vhost of stream.
# [app], the app of stream.
Expand Down Expand Up @@ -1154,6 +1155,10 @@ vhost dvr.srs.com {
# dvr_path /data/[vhost]/[app]/[2006]/[01]/[stream]-[02]-[15].[04].[05].[999].flv;
# =>
# dvr_path /data/ossrs.net/live/2015/01/livestream-03-10.57.30.776.flv;
# 5. DVR to mp4:
# dvr_path ./objs/nginx/html/[app]/[stream].[timestamp].mp4;
# =>
# dvr_path ./objs/nginx/html/live/livestream.1420254068776.mp4;
# @see https://github.com/ossrs/srs/wiki/v2_CN_DVR#custom-path
# @see https://github.com/ossrs/srs/wiki/v2_EN_DVR#custom-path
# segment,session apply it.
Expand Down
Loading

0 comments on commit 8c01f52

Please sign in to comment.