rtmp - Mpeg-dash support in nginx-plus -


i searched enough couldn't sort out how configure mpeg-dash in nginx plus .

rtmp module supporting guess dont understand how can configure , request in nginx plus server.

when configured rtmp in nginx.conf getting error

 unknown directive "rtmp" in /etc/nginx/nginx.conf:13 

configuration

  user  nginx;   worker_processes  auto;    error_log  /var/log/nginx/error.log notice;   pid        /var/run/nginx.pid;     events {       worker_connections  1024;     }     rtmp {               server {      listen       98;     server_name  127.0.0.1;                application dash {          live on;          dash on;          dash_path /usr/share/nginx/html/dash;     }   } }  http {     include       /etc/nginx/mime.types;     default_type  application/octet-stream;      log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '                   '$status $body_bytes_sent "$http_referer" '                   '"$http_user_agent" "$http_x_forwarded_for"';  access_log  /var/log/nginx/access.log  main;  sendfile        on; #tcp_nopush     on;  keepalive_timeout  65;  #gzip  on;  server {     listen       99;     server_name  127.0.0.1;      #charset koi8-r;      #access_log  logs/host.access.log  main;  location / {     rewrite ^(.*)$ /crossdomain.xml; }  location = /crossdomain.xml {     root /var/www/crossdomain; }       location /images {         root   /usr;     }      location /flv {         root   /usr;         flv;         mp4_buffer_size       1m;         mp4_max_buffer_size   5m;         mp4_limit_rate        on;         mp4_limit_rate_after  30s;     }      location /video {         root   /usr;         mp4;         mp4_buffer_size       1m;         mp4_max_buffer_size   5m;         mp4_limit_rate        on;         mp4_limit_rate_after  30s;     }      location /hls {          root   /usr/share/nginx/html;          hls;          hls_fragment            5s;          hls_buffers             10 10m;          hls_mp4_buffer_size     1m;          hls_mp4_max_buffer_size 5m;          types          {                application/vnd.apple.mpegurl m3u8;                video/mp2t ts;         }    add_header 'access-control-allow-origin' '*';   add_header 'cache-control' 'no-cache';     }      location /dash {          root /usr/share/nginx/html;          add_header cache-control no-cache;      }      #error_page  404              /404.html;      # redirect server error pages static page /50x.html     #     error_page   500 502 503 504  /50x.html;     location = /50x.html {         root   html;     }      # proxy php scripts apache listening on 127.0.0.1:80     #     #location ~ \.php$ {     #    proxy_pass   http://127.0.0.1;     #}      # pass php scripts fastcgi server listening on 127.0.0.1:9000     #     #location ~ \.php$ {     #    root           html;     #    fastcgi_pass   127.0.0.1:9000;     #    fastcgi_index  index.php;     #    fastcgi_param  script_filename  /scripts$fastcgi_script_name;     #    include        fastcgi_params;     #}      # deny access .htaccess files, if apache's document root     # concurs nginx's 1     #     #location ~ /\.ht {     #    deny  all;     #} }  include /etc/nginx/conf.d/*.conf; 

}

how can enable rtmp in nginx-plus

the rtmp section must placed outside http, this:

rtmp {     server {     ... }  http {     server {     ... } 

for full example see readme: https://github.com/arut/nginx-rtmp-module


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -