我正在通过视频am 开发rtmps实况流。
但我有个问题。T_T
rtmps直播不播放。(Rtmp效果很好。)
即使你使用另一个闪存播放器,它也不会播放。(前) jwplayer
<video ...
data-setup='{ "techOrder":["html5", "flash"]}'>
...
<source src = " ** RTMPS_URL ** " type ="rtmp/flv"/>
</video>视频错误信息。
"FLASH: rtmpconnectfailure"
怀疑的部分如下。
我做错了什么?
我需要你的帮助。
谢谢:-)
发布于 2020-12-04 05:08:22
我希望你解决了这个问题,但我仍然在这里发布解决方案,因为那些问题和我一样。
我的工作环境: nginx带有rtmp模块,ffmpeg从ip摄像头获取RTSP并以flv格式推送到nginx,在web上显示此流。
视频so改变了很多,所以我把我的html放在这里:
<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>########################
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。
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)
https://stackoverflow.com/questions/42616151
复制相似问题