1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00

Update NGINX configuration to comment out unused settings and improve clarity

This commit is contained in:
Daniel Neto 2025-07-18 17:21:31 -03:00
parent 08098a8384
commit 0d2d5edbd8
3 changed files with 36 additions and 28 deletions

View file

@ -15,18 +15,18 @@ rtmp {
allow play all;
#creates our "live" full-resolution HLS videostream from our incoming encoder stream and tells where to put the HLS video manifest and video fragments
application live {
allow play all;
#allow play all;
live on;
hls on;
hls_nested on;
hls_path /HLS/live;
hls_playlist_length 60m;
hls_fragment 4s;
#hls on;
#hls_nested on;
#hls_path /HLS/live;
#hls_playlist_length 60m;
#hls_fragment 4s;
drop_idle_publisher 30s;
sync 500ms;
hls_keys on;
hls_fragments_per_key 20;
#hls_keys on;
#hls_fragments_per_key 20;
#Experimental. Force dropped stream, or ended stream from being watched. (idle_streams)
#idle_streams off;
@ -35,11 +35,13 @@ rtmp {
on_play http://avideo/plugin/Live/on_play.php;
on_record_done http://avideo/plugin/Live/on_record_done.php;
#exec ffmpeg -re -i rtmp://localhost/live/$name
exec ffmpeg -re -i rtmp://localhost/live/$name
# -c:v libx264 -preset veryfast -vf scale=-2:240 -r 20 -g 40 -keyint_min 40 -sc_threshold 0 -bf 2 -b_strategy 1 -b:v 400k -maxrate 500k -bufsize 1000k -c:a aac -b:a 96k -ac 2 -ar 44100 -f flv rtmp://localhost/adaptive/$name_low
# -c:v libx264 -preset veryfast -vf scale=-2:480 -r 30 -g 60 -keyint_min 60 -sc_threshold 0 -bf 2 -b_strategy 1 -b:v 1200k -maxrate 1500k -bufsize 3000k -c:a aac -b:a 128k -ac 2 -ar 44100 -f flv rtmp://localhost/adaptive/$name_mid
-c:v libx264 -preset veryfast -vf scale=-2:480 -r 30 -g 60 -keyint_min 60 -sc_threshold 0 -bf 2 -b_strategy 1 -b:v 1200k -maxrate 1500k -bufsize 3000k -c:a aac -b:a 128k -ac 2 -ar 44100 -f flv rtmp://localhost/adaptive/$name_mid;
# -c:v libx264 -preset veryfast -vf scale=-2:720 -r 30 -g 60 -keyint_min 60 -sc_threshold 0 -bf 2 -b_strategy 1 -b:v 2400k -maxrate 2800k -bufsize 5600k -c:a aac -b:a 128k -ac 2 -ar 44100 -f flv rtmp://localhost/adaptive/$name_hi;
exec ffmpeg -i rtmp://localhost/live/$name -vn -c:a aac -b:a 64k -ar 44100 -ac 2 -f flv rtmp://localhost/adaptive/${name}_audio;
recorder video {
record all manual;
record_path /var/www/tmp;
@ -57,23 +59,25 @@ rtmp {
#}
}
#application adaptive {
# live on;
# hls on;
# hls_path /HLS/live;
# hls_nested on;
# hls_playlist_length 60m;
# hls_fragment 4s;
# allow play all;
# allow publish 127.0.0.1;
# deny publish all;
application adaptive {
live on;
hls on;
hls_path /HLS/live;
hls_nested on;
hls_playlist_length 60m;
hls_fragment 4s;
allow play all;
allow publish 127.0.0.1;
deny publish all;
hls_keys on;
hls_fragments_per_key 20;
hls_variant _audio BANDWIDTH=64000;
#hls_variant _low BANDWIDTH=900000;
hls_variant _mid BANDWIDTH=1000000;
#hls_variant _hi BANDWIDTH=2500000;
}
# hls_keys on;
# hls_fragments_per_key 20;
# hls_variant _low BANDWIDTH=900000;
# hls_variant _mid BANDWIDTH=1000000;
# hls_variant _hi BANDWIDTH=2500000;
#}
}
}
http {