Git Product home page Git Product logo

Comments (14)

xiaooloong avatar xiaooloong commented on August 26, 2024 2

目前是在 https 的 server 下 proxy_pass 到 http 的 server 下的 flv_live on;

大概是这样:

server {
    listen 127.0.0.1:8080 default;
    location ^~ /live {
        flv_live on;
    }
}
server {
    listen 443 ssl http2;
    location / {
        proxy_pass http://127.0.0.1:8080;
    }
}

from nginx-http-flv-module.

winshining avatar winshining commented on August 26, 2024 2

此问题其实是 http/2.0 的问题,http/2.0 的实现要求强制加密。
鉴于社区参与度太低,"自主研发"的太多,不会支持了,原生支持的效果可以在 B站搜 nginx-http-live-module。

from nginx-http-flv-module.

winshining avatar winshining commented on August 26, 2024 1

我试过了,nginx-http-flv-module支持vlc和flv.js以https方式访问http-flv直播流,但是HTTP 2.0没测试,因为系统上的openssl不支持HTTP 2.0,无法验证。下面是截图:
20180520063211
20180520061616

from nginx-http-flv-module.

0079123 avatar 0079123 commented on August 26, 2024 1

我觉得问题可能出在http2.0上,把h2配置去掉保留https 确实能播放
123

from nginx-http-flv-module.

xiaooloong avatar xiaooloong commented on August 26, 2024 1

我也遇到了这个问题,确实是由于 http2 引起的。
环境:

  • CentOS 7
  • LibreSSL 2.7.4
  • OpenResty 1.13.6.2
  • nginx-http-flv-module 1.2.4
nginx version: openresty/1.13.6.2
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC) 
built with LibreSSL 2.7.4
TLS SNI support enabled
configure arguments: --prefix=/opt/openresty/nginx --with-cc-opt='-O2 -DNGX_LUA_ABORT_AT_PANIC -I/usr/local/openresty/zlib/include -I/usr/local/openresty/pcre/include -I/opt/libressl/include' --add-module=../ngx_devel_kit-0.3.0 --add-module=../echo-nginx-module-0.61 --add-module=../xss-nginx-module-0.06 --add-module=../ngx_coolkit-0.2rc3 --add-module=../set-misc-nginx-module-0.32 --add-module=../form-input-nginx-module-0.12 --add-module=../encrypted-session-nginx-module-0.08 --add-module=../srcache-nginx-module-0.31 --add-module=../ngx_lua-0.10.13 --add-module=../ngx_lua_upstream-0.07 --add-module=../headers-more-nginx-module-0.33 --add-module=../array-var-nginx-module-0.05 --add-module=../memc-nginx-module-0.19 --add-module=../redis2-nginx-module-0.15 --add-module=../redis-nginx-module-0.3.7 --add-module=../ngx_stream_lua-0.0.5 --with-ld-opt='-Wl,-rpath,/opt/openresty/luajit/lib -L/usr/local/openresty/zlib/lib -L/usr/local/openresty/pcre/lib -L/opt/libressl/lib -Wl,-rpath,/usr/local/openresty/zlib/lib:/usr/local/openresty/pcre/lib:/opt/libressl/lib' --with-pcre-jit --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_v2_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --with-http_stub_status_module --with-http_realip_module --with-http_addition_module --with-http_auth_request_module --with-http_secure_link_module --with-http_random_index_module --with-http_gzip_static_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-threads --with-dtrace-probes --add-module=/root/openresty-1.13.6.2/nginx-http-flv-module-1.2.4 --with-stream --with-stream_ssl_module --with-http_ssl_module

from nginx-http-flv-module.

seamory avatar seamory commented on August 26, 2024 1

目前是在 https 的 server 下 proxy_pass 到 http 的 server 下的 flv_live on;

大概是这样:

server {
    listen 127.0.0.1:8080 default;
    location ^~ /live {
        flv_live on;
    }
}
server {
    listen 443 ssl http2;
    location / {
        proxy_pass http://127.0.0.1:8080;
    }
}

感谢提供思路!

from nginx-http-flv-module.

winshining avatar winshining commented on August 26, 2024

编辑了一下你的issue的格式。
你的意思是使用播放器可以以https方式可以播放http-flv直播对吧?如果是这样,要看flv.js是否支持HTTP 2.0

from nginx-http-flv-module.

0079123 avatar 0079123 commented on August 26, 2024

对的,flv.js是支持的。之前测试过,用SRS3拉flv,再NGINX方向代理到SRS3的口就可以了(SRS有个自带的http服务),相当于SRS3和NGINX之间是http,出去之后是https。但是用您的这个模块,按照上面的配置是flv.js是获取不到视频流的,很奇怪。

from nginx-http-flv-module.

winshining avatar winshining commented on August 26, 2024

后续我看看是什么问题

from nginx-http-flv-module.

WayChan avatar WayChan commented on August 26, 2024

http2.0似乎真的支持有些许问题,删除http2字段,https可以拉取。加上之后,VLC跟chrome的flv.js都无法拉取。Chrome的调试日志会提示net::ERR_SPDY_PROTOCOL_ERROR。目前我也无法判断具体是由哪个引起的。http/1.1协议拉取https流则正常~

from nginx-http-flv-module.

jeese-l avatar jeese-l commented on August 26, 2024

我开启 https 之后 ,nginx就报405 请问知道怎么解决吗
1594381777(1)

from nginx-http-flv-module.

jeese-l avatar jeese-l commented on August 26, 2024

from nginx-http-flv-module.

spongefather avatar spongefather commented on August 26, 2024

我也是啊 开启 http2.0,error 文件提示: [error] 20808#13280: *79 flv live: HTTP version 0.9 or 2.0 not supported,
程序是不支持 http2.0 协议吧。
用 不开启http2.0 ,只用 https 是可以的。
或者用一个 http2.0 端口反代 flv 地址就行。。

from nginx-http-flv-module.

HuYihe2008 avatar HuYihe2008 commented on August 26, 2024

我开启 https 之后 ,nginx就报405 请问知道怎么解决吗 1594381777(1)

我也是这样,有办法解决吗?

from nginx-http-flv-module.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.