I am developing the rtmps live streaming by videojs.
But I have a problem. T_T
The rtmps live-streaming do not play. (Rtmp works well.)
Even if you use another flash player, it won't play. (ex) jwplayer
<video ...
data-setup='{ "techOrder":["html5", "flash"]}'>
...
<source src = " ** RTMPS_URL ** " type ="rtmp/flv"/>
</video>
videojs error message.
"FLASH: rtmpconnectfailure"
The suspected part is as follows.
The rtmps server is writing a personal certificate.(Certificate not certified by public institutions) So I installed a personal certificate on my computer, and the error is identical.
Videojs blogs are said to offer rtmps.Are you sure?
What am I doing wrong?
I need your help.
thanks :-)
I hope you solved this problem but I still post the solution here for those have the same issues like me.
My working environment: nginx with rtmp module, ffmpeg get RTSP from ip camera and push to nginx in flv format, display the this streaming in web.
videojs changed a lot so I put my html here:
<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>
########################
I get the FLASH: rtmpconnectfailure, VIDEOJS: ERROR: (CODE:0 MEDIA_ERR_CUSTOM) FLASH: rtmpconnectfailure, at first.
I solved by just adding a '/' at the end in "<video....><source src="rtmp://.../.../ <----this one '/' "></video>" in my html file
So make sure you add '/' at the end in your source url.
Successful run in Chrome, Opera and Edge (have to enable flash in browser setting) at DEC 2020
Good Luck :o)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With