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 {
- include mime.types;
- default_type application/octet-stream;
- ignore_invalid_headers on;
- server {
- listen 80;
- server_name localhost;
- # This URL provides RTMP statistics in XML
- location /stat {
- if ($request_method = "GET") {
- add_header "Access-Control-Allow-Origin" *;
- }
- rtmp_stat all;
- # Use this stylesheet to view XML as web page
- # in browser
- rtmp_stat_stylesheet /stat.xsl;
- }
- location /stat.xsl {
- # XML stylesheet to view RTMP stats.
- # Copy stat.xsl wherever you want
- # and put the full directory path here
- # root /path/to/stat.xsl/;
- root "C:/nginx";
- }
- location /control {
- rtmp_control all;
- }
- }
- }
- rtmp {
- server {
- listen 1935;
- ping 30s;
- notify_method get;
- chunk_size 8192;
- ack_window 8192;
- buflen 5s;
- # chunk_size 8192; // default
- # Stream to "rtmp://IPHERE/camera1/live".
- application camera1 {
- live on;
- wait_video on;
- wait_key on;
- sync 300ms;
- exec_options on;
- publish_notify on;
- play_restart on;
- drop_idle_publisher 6s;
- idle_streams off;
- }
- }
- server {
- listen 1936;
- ping 30s;
- notify_method get;
- chunk_size 4096;
- ack_window 8192;
- buflen 5s;
- # chunk_size 8192; // default
- # Stream to "rtmp://IPHERE/camera2/live".
- application camera2 {
- live on;
- wait_video on;
- wait_key on;
- sync 300ms;
- exec_options on;
- publish_notify on;
- play_restart on;
- drop_idle_publisher 6s;
- idle_streams off;
- }
- }
- }
Add Comment
Please, Sign In to add comment