nginx plus中的Mpeg dash支持

nginx plus中的Mpeg dash支持,nginx,rtmp,mpeg-dash,Nginx,Rtmp,Mpeg Dash,我搜索了足够多,但无法确定如何在nginxplus中配置mpeg-dash 我想rtmp模块支持它,但我不太明白如何在nginx plus服务器中配置和请求它 当我在nginx.conf中配置rtmp时,出现了错误 unknown directive "rtmp" in /etc/nginx/nginx.conf:13 配置是 user nginx; worker_processes auto; error_log /var/log/nginx/error.log not

我搜索了足够多,但无法确定如何在nginxplus中配置mpeg-dash

我想rtmp模块支持它,但我不太明白如何在nginx plus服务器中配置和请求它

当我在nginx.conf中配置rtmp时,出现了错误

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

  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 to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   html;
    }

    # proxy the PHP scripts to Apache listening on 127.0.0.1:80
    #
    #location ~ \.php$ {
    #    proxy_pass   http://127.0.0.1;
    #}

    # pass the PHP scripts to 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 to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    #location ~ /\.ht {
    #    deny  all;
    #}
}

include /etc/nginx/conf.d/*.conf;
}


如何在nginx plus中启用rtmp

必须将
rtmp
部分放置在
http
之外,如下所示:

rtmp {
    server {
    ...
}

http {
    server {
    ...
}

有关完整示例,请参阅自述文件:

,它已经存在,但我已经安装了nginx plus,无法将ngnx rmtp模块添加到其中,因此它显示rmtp的方向未知。对于我放置的任何模块,都会将错误作为我尝试的ex:image\u filter rotate 90的“未知方向”。我的问题是如何在nginx中配置其他模块-plus@RachitGupta据我所知,nginxplus已经包含了RTMP模块。您在问题中发布的配置中缺少
http
指令。这是一个输入错误,还是它的确切位置?http{include/etc/nginx/mime.types;default_type application/octet stream;server{listen 99;server_name 127.0.0.1;location/video{root/usr;mp4;}location/dash{root/usr/share/nginx/html;add_header Cache Control no Cache;}}include/etc/nginx/conf.d/*.conf;}它已经在那里了。我试图通过yum安装nginx plus extras,因为我在某个地方读到它支持rmtp,但得到错误“正在处理冲突nginx plus冲突nginx extras”不仅是rmtp,还有很多像图像过滤器这样的模块也不工作。我相信它在nginx plus中不存在。你能帮忙吗?