Comments (14)
目前是在 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.
此问题其实是 http/2.0 的问题,http/2.0 的实现要求强制加密。
鉴于社区参与度太低,"自主研发"的太多,不会支持了,原生支持的效果可以在 B站搜 nginx-http-live-module。
from nginx-http-flv-module.
我试过了,nginx-http-flv-module支持vlc和flv.js以https方式访问http-flv直播流,但是HTTP 2.0没测试,因为系统上的openssl不支持HTTP 2.0,无法验证。下面是截图:
from nginx-http-flv-module.
我觉得问题可能出在http2.0上,把h2配置去掉保留https 确实能播放
from nginx-http-flv-module.
我也遇到了这个问题,确实是由于 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.
目前是在 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.
编辑了一下你的issue的格式。
你的意思是使用播放器可以以https方式可以播放http-flv直播对吧?如果是这样,要看flv.js是否支持HTTP 2.0
from nginx-http-flv-module.
对的,flv.js是支持的。之前测试过,用SRS3拉flv,再NGINX方向代理到SRS3的口就可以了(SRS有个自带的http服务),相当于SRS3和NGINX之间是http,出去之后是https。但是用您的这个模块,按照上面的配置是flv.js是获取不到视频流的,很奇怪。
from nginx-http-flv-module.
后续我看看是什么问题
from nginx-http-flv-module.
http2.0似乎真的支持有些许问题,删除http2字段,https可以拉取。加上之后,VLC跟chrome的flv.js都无法拉取。Chrome的调试日志会提示net::ERR_SPDY_PROTOCOL_ERROR。目前我也无法判断具体是由哪个引起的。http/1.1协议拉取https流则正常~
from nginx-http-flv-module.
我开启 https 之后 ,nginx就报405 请问知道怎么解决吗
from nginx-http-flv-module.
from nginx-http-flv-module.
我也是啊 开启 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.
我也是这样,有办法解决吗?
from nginx-http-flv-module.
Related Issues (20)
- [bug] rtmp url stuck after a while HOT 6
- to big message error log HOT 4
- max_streams
- [bug] ffmpeg exiting after 9 seconds HOT 12
- variable 'nbufs' set but not used [-Werror,-Wunused-but-set-variable] HOT 4
- Why don't we provide a default compiled software package? HOT 2
- [question] http://example.com[:port]/dir/streamname.m3u8 unable to play HOT 4
- [bug] live: already publishing HOT 5
- ffmpeg [rtmp]: Cannot open connection tcp://127.0.0.1:1935?tcp_nodelay=0
- WriteN, RTMP send error 32(**bytes) HOT 2
- [bug] nginx reload causes lots of errors: 111: Connection refused and auto_push: connect failed in error log HOT 5
- unknown directive "rtmp" HOT 2
- Dynamic proxy pass HOT 1
- The clock rate during play video by HTTP-FLV is slower compared to the normal clock rate. HOT 1
- I have disabled gop cache,but the time of requesting for http-flv first frame is too long. HOT 3
- fls切片只有声音没有画面,vlc和浏览器播放都是如此 HOT 1
- [bug] Directory Permissions error when moving to nginx 1.26
- two questions for me about control record HOT 1
- redirect with domain name?
- [bug] Abnormal CPU, Memory usage within Ubuntu 24.04(noble-20240605), Nginx 1.24.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nginx-http-flv-module.