我找到了运行我自己的rtmp服务器的方法,我也有一个mp4视频。使用VLC,我可以使用rtmp文件,但是我需要将视频嵌入到HTML页面中。我看到了以下链接:https://www.codeproject.com/Tips/668131/How-to-embed-streaming-Video-rtmp-protocol-in-HTML。,但没有为我工作,。
我还读到,您可以使用名为JWPlayer.....But的东西,我不知道它是如何工作的,也不知道使用它需要遵循哪些步骤。
我知道网上有很多关于这个话题的帖子,有人能给我举个例子吗?(我指的是HTML代码)
提前谢谢!!
埃里克。
发布于 2017-12-26 15:13:19
终于解决了我的问题,,我不得不用Flowplayer在一个网站上显示我的rtmp视频。
以下是我遵循的步骤:
1 - wget http://releases.flowplayer.org/flowplayer.rtmp/flowplayer.rtmp-3.2.13.swf (在rtmp服务器上,特别是在usr//nginx/html中)
2 -打开我创建的html并保持如下(在我的例子中是test.html):
<html>
<head>
<script src="http://releases.flowplayer.org/js/flowplayer-
3.2.12.min.js"></script>
</head>
<body>
<div id="player" style="width:644px;height:276px;margin:0 auto;text-align:center">
<img src="/path/to/background.png" height="260" width="489" />
</div>
<script>
$f("player", "http://releases.flowplayer.org/swf/flowplayer-
3.2.16. swf ", {
clip: {
url: '<YOUR_FILE.flv>',
scaling: 'fit',
provider: 'hddn'
},
plugins: {
hddn: {
url: "flowplayer.rtmp-3.2.13.swf",
netConnectionUrl: 'rtmp://<IP_OF_THE_SERVER>:1935/vod'
}
},
canvas: {
backgroundGradient: 'none'
}
});
</script>
</body>
</html>3 -修改netConnectionUrl和url的值。
4 -导航服务器(在我的例子中是http://10.11.1.11/test.html)
而且很管用!
https://stackoverflow.com/questions/47868433
复制相似问题