You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
91 lines
1.9 KiB
91 lines
1.9 KiB
|
|
#user nobody;
|
|
worker_processes 1;
|
|
|
|
#error_log logs/error.log;
|
|
#error_log logs/error.log notice;
|
|
#error_log logs/error.log info;
|
|
|
|
|
|
worker_rlimit_nofile 102400;
|
|
worker_rlimit_core 2G;
|
|
working_directory /tmp;
|
|
|
|
#pid logs/nginx.pid;
|
|
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
|
|
|
|
stream_zone buckets=1024 streams=4096;
|
|
|
|
rtmp {
|
|
server {
|
|
listen 1935;
|
|
application live {
|
|
send_all off;
|
|
zero_start off;
|
|
live on;
|
|
hls on;
|
|
hls_path /tmp/hls;
|
|
hls2memory on;
|
|
mpegts_cache_time 20s;
|
|
hls2_fragment 1300ms;
|
|
hls2_max_fragment 1800ms;
|
|
hls2_playlist_length 3900ms;
|
|
wait_key on;
|
|
wait_video on;
|
|
cache_time 2s;
|
|
low_latency on;
|
|
fix_timestamp 2000ms;
|
|
# h265 codecid, default 12
|
|
hevc_codecid 12;
|
|
}
|
|
}
|
|
}
|
|
|
|
http {
|
|
server {
|
|
listen 8080;
|
|
location / {
|
|
chunked_transfer_encoding on;
|
|
root html/;
|
|
}
|
|
location /flv {
|
|
flv_live 1935 app=live;
|
|
}
|
|
location /ts {
|
|
ts_live 1935 app=live;
|
|
}
|
|
location /rtmp_stat {
|
|
rtmp_stat all;
|
|
rtmp_stat_stylesheet /stat.xsl;
|
|
}
|
|
location /xstat {
|
|
rtmp_stat all;
|
|
}
|
|
location /sys_stat {
|
|
sys_stat;
|
|
}
|
|
location /hls {
|
|
# Serve HLS fragments
|
|
types {
|
|
application/vnd.apple.mpegurl m3u8;
|
|
video/mp2t ts;
|
|
}
|
|
root /tmp;
|
|
add_header Cache-Control no-cache;
|
|
}
|
|
location /hls2 {
|
|
hls2_live 1935 app=live;
|
|
}
|
|
location /dash {
|
|
# Serve DASH fragments
|
|
root /tmp;
|
|
add_header Cache-Control no-cache;
|
|
}
|
|
}
|
|
}
|
|
|