SHARE
TWEET

Untitled

a guest Jun 19th, 2017 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. worker_processes  1;
  2.  
  3. # removed pid from systemctl service file
  4. #pid /run/nginx.pid;
  5.  
  6. events {
  7.     worker_connections  1024;
  8. }
  9.  
  10. rtmp {
  11.     server {
  12.         listen 1935;
  13.  
  14.         chunk_size 4000;
  15.  
  16.         # video on demand for flv files
  17.         application vod {
  18.             play /var/streaming/flv;
  19.         }
  20.  
  21.         # video on demand for mp4 files
  22.         application vod2 {
  23.             play /var/streaming/mp4;
  24.         }
  25.  
  26.     # test rtmp stream from ffmpeg
  27.     application live {
  28.         live on;
  29.         drop_idle_publisher 10s;
  30.        
  31.     }
  32.     }
  33. }
  34.  
  35. # HTTP can be used for accessing RTMP stats
  36. http {
  37.     # access_log /var/log/nginx/access-streaming.log;
  38.     # error_log /var/log/nginx/error-streaming.log;
  39.  
  40.     server {
  41.         # in case we have another web server on port 80
  42.         listen      80;
  43.     root /usr/local/nginx/html/;
  44.     include mime.types;
  45.  
  46.     # test
  47.     location / {
  48.         autoindex on;
  49.     }
  50.  
  51.         # This URL provides RTMP statistics in XML
  52.         #location /stat {
  53.         #    rtmp_stat all;
  54.         #    rtmp_stat_stylesheet stat.xsl;
  55.         #}
  56.  
  57.         #location /stat.xsl {
  58.         #    # XML stylesheet to view RTMP stats.
  59.         #    # Copy stat.xsl wherever you want
  60.         #    # and put the full directory path here
  61.         #    root /var/www/;
  62.         #}
  63.  
  64.         #location /hls {
  65.         #    # Serve HLS fragments
  66.         #    types {
  67.         #        application/vnd.apple.mpegurl m3u8;
  68.         #        video/mp2t ts;
  69.         #    }
  70.         #    alias /tmp/app;
  71.         #    expires -1;
  72.         #}
  73.     }
  74. }
RAW Paste Data
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top