Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- user www-data;
- worker_processes 1;
- pid /run/nginx.pid;
- include /etc/nginx/modules-enabled/*.conf;
- events {
- worker_connections 768;
- # multi_accept on;
- }
- http {
- sendfile on;
- tcp_nopush on;
- tcp_nodelay on;
- keepalive_timeout 65;
- types_hash_max_size 2048;
- # server_tokens off;
- # server_names_hash_bucket_size 64;
- # server_name_in_redirect off;
- include /etc/nginx/mime.types;
- default_type application/octet-stream;
- gzip off;
- # gzip_vary on;
- # gzip_proxied any;
- # gzip_comp_level 6;
- # gzip_buffers 16 8k;
- # gzip_http_version 1.1;
- # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
- access_log /var/log/nginx/access.log;
- error_log /var/log/nginx/error.log;
- include /etc/nginx/conf.d/*.conf;
- include /etc/nginx/sites-enabled/*;
- }
- rtmp {
- access_log /var/log/nginx/rtmp_access.log;
- server {
- listen 1935;
- chunk_size 8192;
- application live {
- live on;
- meta on;
- record off;
- interleave off;
- wait_key on;
- wait_video off;
- idle_streams off;
- sync 300ms;
- session_relay on;
- max_connections 1000;
- allow publish all;
- allow play all;
- hls off;
- dash off;
- # on_publish http://yourdomain.com/plugin/Live/on_publish.php;
- # on_play http://yourdomain/plugin/Live/on_play.php;
- # on_record_done http://yourdomain/plugin/Live/on_record_done.php;
- push rtmp://localhost/hls;
- push rtmp://localhost/dash;
- }
- application hls {
- live on;
- record off;
- meta copy;
- allow publish 127.0.0.1;
- allow play all;
- hls on;
- hls_nested on;
- hls_cleanup on;
- hls_sync 100ms;
- hls_fragment 2s;
- hls_playlist_length 10s;
- hls_path /var/livestream/hls;
- }
- application dash {
- live on;
- record off;
- allow publish 127.0.0.1;
- deny publish all;
- allow play all;
- dash on;
- dash_nested on;
- dash_cleanup on;
- dash_fragment 5s;
- dash_playlist_length 20s;
- dash_path /var/livestream/dash;
- }
- application vods {
- play /var/livestream/recordings;
- allow play all;
- }
- application vods_http {
- play https://yourdomain.com/recordings;
- allow play all;
- }
- }
- }
Add Comment
Please, Sign In to add comment