diff --git a/nginx-rtmp.conf b/nginx-rtmp.conf index 3cdb977..2cfc4a0 100644 --- a/nginx-rtmp.conf +++ b/nginx-rtmp.conf @@ -13,8 +13,8 @@ rtmp { hls on; hls_path /var/www/html/canal/; # ajustes de hls - hls_fragment 3; - hls_playlist_length 60; + hls_fragment 5; + hls_playlist_length 1m; # para bloquear el directo # quita el comentario de la lĂ­nea siguiente # deny play all; @@ -23,6 +23,10 @@ rtmp { #on_publish http://docker.for.mac.host.internal:5000/api/stream/start; #on_publish_done http://docker.for.mac.host.internal:5000/api/stream/end; + idle_streams off; + hls_cleanup on; + + ## Transcode video for low latencies exec ffmpeg -i rtmp://localhost/entrada/$name -c:v libx264 -x264opts keyint=60:no-scenecut -b:v 450k -c:a copy -s 854x480 -r 30 -sws_flags bilinear -tune zerolatency -preset veryfast -f flv rtmp://localhost/show/$name_sd; }