diff --git a/nginx.conf b/nginx.conf index ccc238f563275f842323de80eca08e6524def6c5..eb42334a7236f97e3626439439153b7808b7323e 100644 --- a/nginx.conf +++ b/nginx.conf @@ -17,6 +17,7 @@ rtmp { on_publish http://pitube:3000/callback/rtmp; on_publish_done http://pitube:3000/callback/rtmp; on_update http://pitube:3000/callback/rtmp; + on_record_done http://pitube:3000/callback/recorder; notify_update_timeout 15s; hls on; @@ -25,7 +26,7 @@ rtmp { recorder all { record all manual; - record_suffix -%y%m%d-%h%m%s.flv; + record_suffix -%Y%m%d-%H%M%S.flv; record_path /records; record_unique on; record_max_size 4000m; @@ -33,16 +34,12 @@ rtmp { recorder audio { record audio manual; - record_suffix -%y%m%d-%h%m%s.audio.flv; + record_suffix -%Y%m%d-%H%M%S.audio.flv; record_path /records; record_unique on; record_max_size 500m; } - - } - - } } @@ -72,6 +69,12 @@ http { add_header Access-Control-Allow-Origin *; } + location /records { + auth_request /callback/record; + alias /records; + add_header Access-Control-Allow-Origin *; + } + location /stat { rtmp_stat all; rtmp_stat_stylesheet static/stat.xsl;