首页
仓库
文档
nginx手册
Docker手册
workerman
Flask
PHP
python
RabbitMQ
其他
Linux
占位1
占位2
目录
###nginx-rtmp-module模块 ``` worker_processes 2; events { worker_connections 8192; # max value 32768, nginx recycling connections+registry optimization = # this.value * 20 = max concurrent connections currently tested with one worker # C1000K should be possible depending there is enough ram/cpu power # multi_accept on; } #rtmp rtmp { server { listen 1935;#监听端口,若被占用,可以更改 chunk_size 4000;#上传flv文件块儿的大小 application live #创建一个叫live的应用 { live on;#开启live的应用 allow publish 127.0.0.1;# allow play all; } application hls #自动切片转成m3u8 { live on; hls on; hls_path D:/hls; #切片存放位置 hls_fragment 5s; hls_playlist_length 15s; hls_continuous on; hls_cleanup on; hls_nested on; } } } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; server { listen 80; server_name localhost 127.0.0.1 192.168.1.111; location / { root D:/hls; index index.html index.htm; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } location /hls { types { application/vnd.apple.mpegurl m3u8; } alias D:/hls/; expires -1; add_header Cache-Control no-cache; } location /stat { rtmp_stat all; rtmp_stat_stylesheet stat.xsl; } location /stat.xsl { root /usr/local/extend_module/nginx-rtmp-module/; } } } ```