winlin

fix #222, the dvr path rule changed.

1 # the config for srs to dvr in segment mode 1 # the config for srs to dvr in segment mode
2 -# @see https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_DVR 2 +# @see https://github.com/winlinvip/simple-rtmp-server/wiki/v2_CN_DVR
3 # @see full.conf for detail config. 3 # @see full.conf for detail config.
4 4
5 listen 1935; 5 listen 1935;
@@ -7,7 +7,7 @@ max_connections 1000; @@ -7,7 +7,7 @@ max_connections 1000;
7 vhost __defaultVhost__ { 7 vhost __defaultVhost__ {
8 dvr { 8 dvr {
9 enabled on; 9 enabled on;
10 - dvr_path ./objs/nginx/html; 10 + dvr_path ./objs/nginx/html/[app]/[stream].[timestamp].flv;
11 dvr_plan segment; 11 dvr_plan segment;
12 dvr_duration 30; 12 dvr_duration 30;
13 dvr_wait_keyframe on; 13 dvr_wait_keyframe on;
1 # the config for srs to dvr in session mode 1 # the config for srs to dvr in session mode
2 -# @see https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_DVR 2 +# @see https://github.com/winlinvip/simple-rtmp-server/wiki/v2_CN_DVR
3 # @see full.conf for detail config. 3 # @see full.conf for detail config.
4 4
5 listen 1935; 5 listen 1935;
@@ -7,7 +7,7 @@ max_connections 1000; @@ -7,7 +7,7 @@ max_connections 1000;
7 vhost __defaultVhost__ { 7 vhost __defaultVhost__ {
8 dvr { 8 dvr {
9 enabled on; 9 enabled on;
10 - dvr_path ./objs/nginx/html; 10 + dvr_path dvr_path ./objs/nginx/html/[app]/[stream].[timestamp].flv;
11 dvr_plan session; 11 dvr_plan session;
12 } 12 }
13 } 13 }
@@ -326,8 +326,8 @@ vhost dvr.srs.com { @@ -326,8 +326,8 @@ vhost dvr.srs.com {
326 # @see https://github.com/winlinvip/simple-rtmp-server/wiki/v2_CN_DVR#custom-path 326 # @see https://github.com/winlinvip/simple-rtmp-server/wiki/v2_CN_DVR#custom-path
327 # @see https://github.com/winlinvip/simple-rtmp-server/wiki/v2_EN_DVR#custom-path 327 # @see https://github.com/winlinvip/simple-rtmp-server/wiki/v2_EN_DVR#custom-path
328 # segment,session apply it. 328 # segment,session apply it.
329 - # default: ./objs/nginx/html  
330 - dvr_path ./objs/nginx/html; 329 + # default: ./objs/nginx/html/[app]/[stream].[timestamp].flv
  330 + dvr_path ./objs/nginx/html/[app]/[stream].[timestamp].flv;
331 # the duration for dvr file, reap if exeed, in seconds. 331 # the duration for dvr file, reap if exeed, in seconds.
332 # segment apply it. 332 # segment apply it.
333 # session,append ignore. 333 # session,append ignore.
@@ -58,7 +58,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -58,7 +58,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
58 #define SRS_CONF_DEFAULT_HLS_MOUNT "[vhost]/[app]/[stream].m3u8" 58 #define SRS_CONF_DEFAULT_HLS_MOUNT "[vhost]/[app]/[stream].m3u8"
59 #define SRS_CONF_DEFAULT_HLS_ACODEC "aac" 59 #define SRS_CONF_DEFAULT_HLS_ACODEC "aac"
60 #define SRS_CONF_DEFAULT_HLS_VCODEC "h264" 60 #define SRS_CONF_DEFAULT_HLS_VCODEC "h264"
61 -#define SRS_CONF_DEFAULT_DVR_PATH "./objs/nginx/html" 61 +#define SRS_CONF_DEFAULT_DVR_PATH "./objs/nginx/html/[app]/[stream].[timestamp].flv"
62 #define SRS_CONF_DEFAULT_DVR_PLAN_SESSION "session" 62 #define SRS_CONF_DEFAULT_DVR_PLAN_SESSION "session"
63 #define SRS_CONF_DEFAULT_DVR_PLAN_SEGMENT "segment" 63 #define SRS_CONF_DEFAULT_DVR_PLAN_SEGMENT "segment"
64 #define SRS_CONF_DEFAULT_DVR_PLAN_APPEND "append" 64 #define SRS_CONF_DEFAULT_DVR_PLAN_APPEND "append"