首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >RTMPS协议,视频,HTML5,直播

RTMPS协议,视频,HTML5,直播
EN

Stack Overflow用户
提问于 2017-03-06 01:22:50
回答 1查看 1.8K关注 0票数 2

我正在通过视频am 开发rtmps实况流。

但我有个问题。T_T

rtmps直播不播放。(Rtmp效果很好。)

即使你使用另一个闪存播放器,它也不会播放。(前) jwplayer

代码语言:javascript
复制
<video ...
data-setup='{ "techOrder":["html5", "flash"]}'>
...
<source src = " ** RTMPS_URL ** " type ="rtmp/flv"/>
</video>
  • RTMPS_URL :rtmps://{SERVER_URL}/?
  • SERVER_URL :IP:端口/args2 1/args2 2
  • 参数: key = value

视频错误信息。

"FLASH: rtmpconnectfailure"

怀疑的部分如下。

  1. rtmps服务器正在编写个人证书。(未经公共机构认证的证书)因此我在计算机上安装了个人证书,错误是相同的。
  2. 据说视频博客提供rtmps.Are,你确定吗?

我做错了什么?

我需要你的帮助。

谢谢:-)

EN

回答 1

Stack Overflow用户

发布于 2020-12-04 05:08:22

我希望你解决了这个问题,但我仍然在这里发布解决方案,因为那些问题和我一样。

我的工作环境: nginx带有rtmp模块,ffmpeg从ip摄像头获取RTSP并以flv格式推送到nginx,在web上显示此流。

视频so改变了很多,所以我把我的html放在这里:

代码语言:javascript
复制
<html>
<script src="./video.min.js"></script>  //download the videojs from npm or use the online url one
<link rel="stylesheet" type="text/css" href="./video-js.css">
<script src="https://cdn.jsdelivr.net/npm/videojs-flash@2/dist/videojs-flash.min.js></script>

<body>
<video id="liveVideo" class="video-js" controls autoplay preload="auto" width="320" height="240" data-setup="{}">
        <!-- <source src="rtmp://ns8.indexforce.com/home/mystream" type="rtmp/flv">-->
        <!-- the above rtmp link is for testing your videojs works or not -->
        <source src="rtmp://192.168.1.180/cam1/" type="rtmp/flv">
</video>
</body>
</html>

########################

代码语言:javascript
复制
rtmp://192.168.1.180/cam1/ is my nignx server ip address (both my server and client are in the same local network)

ffmpeg -i <Your video/stream> -f flv <Your RTMP url>

########################

首先,我得到了FLASH: rtmpconnectfailure,VIDEOJS: ERROR:(代码:0 MEDIA_ERR_CUSTOM) FLASH: rtmpconnectfailure。

代码语言:javascript
复制
I solved by just adding a '/' at the end in "<video....><source src="rtmp://.../.../ <----this one '/' "></video>" in my html file

因此,请确保在源url.的末尾添加“/”。

在DEC 2020上成功运行Chrome、Opera和Edge (必须启用浏览器中的闪存设置)

好运:o)

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42616151

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档