gnolizuh / BLSS

NGINX-based Live Media Streaming Server
Other
197 stars 73 forks source link

请问http flv 部分的http server和 location怎么配置呢? #98

Open robinyeeh opened 6 years ago

robinyeeh commented 6 years ago

请问http flv 部分怎么配置呢? 我的配置如下,但是nginx 日志有错误.

2018/02/09 18:54:18 [error] 25162#0: *49 open() "/opt/app/nginx2/html/test/robin-test" failed (2: No such file or directory), client: 192.168.6.15, server: 192.168.4.133, request: "GET /test/robin-test HTTP/1.0", host: "192.168.4.133:80"

 server {
    listen       80;
    server_name  192.168.4.133;
    location / {
       http_flv on;
    }
}

rtmp { server { listen 1935 reuseport;

listen 1935;

    service cctv {
        #hostname pub rtmp publish.com;      # match rtmp push domain
        hostname sub rtmp 192.168.4.133;     # match rtmp pull domain
        hostname sub http_flv 192.168.4.133;  # match http-flv pull domain

        application test {
            live on;
            gop_cache on;
            gop_cache_count 1;

            pull rtmp://192.168.4.131:1935/test;
        }
    }
}

}

gnolizuh commented 6 years ago

你的请求后面没有 .flv 吧?