网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

nginx-http-flv-moduleflv拉流错误有哪些

这篇文章主要介绍“nginx-http-flv-module flv拉流错误有哪些”,在日常操作中,相信很多人在nginx-http-flv-module flv拉流错误有哪些问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”nginx-http-flv-module flv拉流错误有哪些”的疑惑有所帮助!接下来,请跟着小编一起来学习吧!

让客户满意是我们工作的目标,不断超越客户的期望值来自于我们对这个行业的热爱。我们立志把好的技术通过有效、简单的方式提供给客户,将通过不懈努力成为客户在信息化领域值得信任、有价值的长期合作伙伴,公司提供的服务项目有:主机域名雅安服务器托管、营销软件、网站建设、惠州网站维护、网站推广。

1.flv拉流错误

Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document first. https://goo.gl/xX8pDD

在video标签中加入 muted 即可


Your browser is too old which doesn't support HTML5 video.

2.HTML采用flv.js与dplayer播放器来播放http-flv格式视频时,请求nignx服务器遇到了chrom跨域的问题

Access to fetch at ‘http://192.168.31.66:9999/zzh-1586620072-2020-04-11-23_47_52.flv’ from origin ‘http://localhost:8080’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled.

http{
    server {
        listen      8000;
        server_name localhost;
        add_header 'Access-Control-Allow-Origin' '*'; #允许所有来源访问
        add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, DELETE'; #允许访问的方式

3.推流权限控制

rtmp {  
    server {  
        listen 1935;  #监听的端口
        chunk_size 4000;
        application myapp {
            live on;
            notify_method get;
            publish_notify on;
            on_publish http://192.168.0.103:8087/autho/rtmp; #这里进行权限控制
			on_publish_done http://127.0.0.1:8087/autho/rtmpOver;#直播结束回调
        }  
        application hls {
            live on;
            hls on;
            hls_path /home/soap/rtmp/hls;#视频流存放地址
            hls_fragment 5s;
            hls_playlist_length 15s;
            hls_continuous on; #连续模式。
            hls_cleanup on;    #对多余的切片进行删除。
            hls_nested on;     #嵌套模式。
        }
    }  
}

4.flv拉取流的路径

http://example.com[:port]/dir?[port=xxx&]app=appname&stream=streamname

http://127.0.0.1:8000/live?app=myapp&stream=fhx

port默认为1935

myapp为配置路径

fhx为流路径

5.obs设置

nginx-http-flv-module flv拉流错误有哪些

6.效果图

nginx-http-flv-module flv拉流错误有哪些

到此,关于“nginx-http-flv-module flv拉流错误有哪些”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注创新互联网站,小编会继续努力为大家带来更多实用的文章!


分享文章:nginx-http-flv-moduleflv拉流错误有哪些
转载源于:http://bjjierui.cn/article/jiggei.html

其他资讯