From fcab17741c6f4b47e99e91b0bcd46ec3d97674a2 Mon Sep 17 00:00:00 2001 From: winlin Date: Mon, 23 Mar 2015 22:06:18 +0800 Subject: [PATCH] fix #222, the dvr path rule changed. --- trunk/conf/dvr.segment.conf | 4 ++-- trunk/conf/dvr.session.conf | 4 ++-- trunk/conf/full.conf | 4 ++-- trunk/src/app/srs_app_config.hpp | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/trunk/conf/dvr.segment.conf b/trunk/conf/dvr.segment.conf index f29c28d30..eeae6a2a5 100644 --- a/trunk/conf/dvr.segment.conf +++ b/trunk/conf/dvr.segment.conf @@ -1,5 +1,5 @@ # the config for srs to dvr in segment mode -# @see https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_DVR +# @see https://github.com/winlinvip/simple-rtmp-server/wiki/v2_CN_DVR # @see full.conf for detail config. listen 1935; @@ -7,7 +7,7 @@ max_connections 1000; vhost __defaultVhost__ { dvr { enabled on; - dvr_path ./objs/nginx/html; + dvr_path ./objs/nginx/html/[app]/[stream].[timestamp].flv; dvr_plan segment; dvr_duration 30; dvr_wait_keyframe on; diff --git a/trunk/conf/dvr.session.conf b/trunk/conf/dvr.session.conf index 8b16b32eb..addc2113e 100644 --- a/trunk/conf/dvr.session.conf +++ b/trunk/conf/dvr.session.conf @@ -1,5 +1,5 @@ # the config for srs to dvr in session mode -# @see https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_DVR +# @see https://github.com/winlinvip/simple-rtmp-server/wiki/v2_CN_DVR # @see full.conf for detail config. listen 1935; @@ -7,7 +7,7 @@ max_connections 1000; vhost __defaultVhost__ { dvr { enabled on; - dvr_path ./objs/nginx/html; + dvr_path dvr_path ./objs/nginx/html/[app]/[stream].[timestamp].flv; dvr_plan session; } } diff --git a/trunk/conf/full.conf b/trunk/conf/full.conf index 886f5d2bb..7b03ac303 100644 --- a/trunk/conf/full.conf +++ b/trunk/conf/full.conf @@ -326,8 +326,8 @@ vhost dvr.srs.com { # @see https://github.com/winlinvip/simple-rtmp-server/wiki/v2_CN_DVR#custom-path # @see https://github.com/winlinvip/simple-rtmp-server/wiki/v2_EN_DVR#custom-path # segment,session apply it. - # default: ./objs/nginx/html - dvr_path ./objs/nginx/html; + # default: ./objs/nginx/html/[app]/[stream].[timestamp].flv + dvr_path ./objs/nginx/html/[app]/[stream].[timestamp].flv; # the duration for dvr file, reap if exeed, in seconds. # segment apply it. # session,append ignore. diff --git a/trunk/src/app/srs_app_config.hpp b/trunk/src/app/srs_app_config.hpp index 98cfa799e..80c875ac9 100644 --- a/trunk/src/app/srs_app_config.hpp +++ b/trunk/src/app/srs_app_config.hpp @@ -58,7 +58,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define SRS_CONF_DEFAULT_HLS_MOUNT "[vhost]/[app]/[stream].m3u8" #define SRS_CONF_DEFAULT_HLS_ACODEC "aac" #define SRS_CONF_DEFAULT_HLS_VCODEC "h264" -#define SRS_CONF_DEFAULT_DVR_PATH "./objs/nginx/html" +#define SRS_CONF_DEFAULT_DVR_PATH "./objs/nginx/html/[app]/[stream].[timestamp].flv" #define SRS_CONF_DEFAULT_DVR_PLAN_SESSION "session" #define SRS_CONF_DEFAULT_DVR_PLAN_SEGMENT "segment" #define SRS_CONF_DEFAULT_DVR_PLAN_APPEND "append"