流媒体服务器或 http 服务器 [英] Streaming server or http server
问题描述
我们正在考虑使用媒体服务器来构建我们的本地媒体服务的可能性.
We’re taking in mind the possibility of using a media server in order to build our on-premise media service.
我们只关注视频和音频点播用例.直播目前不在我们的范围内.
We’re only focusing at Video- and Audio-on-Demand use-case. Live stream is out of our scope right now.
我的意思是,我们需要提供性能良好的预注册视频和音频.
I mean, we’re need to serve pre-registered videos and audios with a good performance.
我们已经使用过 ant 社区服务器,但我们还没有完全弄清楚一些问题.我们测试了两种情况:
We’ve played with ant community server, but we’ve some issues we’re not quite figure out. We’ve tested two scenarios:
- 提供托管在直接 http 服务器 (httpd) 上的视频
- 在蚂蚁服务背后提供视频.
我们研究了浏览器如何下载视频,我们惊讶地发现视频使用相同的策略提供:使用 http 部分内容 (206).
We’ve look at how videos are downloaded by browser and we’ve surprised to see that videos are served using the same strategy: using http partial content (206).
相关代码:
<head>
<link href="https://vjs.zencdn.net/7.6.6/video-js.css" rel="stylesheet" />
<!-- If you'd like to support IE8 (for Video.js versions prior to v7) -->
<script src="https://vjs.zencdn.net/ie8/1.1.2/videojs-ie8.min.js"></script>
</head>
<body>
<video
id="my-video"
class="video-js"
controls
preload="auto"
width="640"
height="264"
data-setup="{}"
>
<source src="http://localhost:5080/LiveApp/streams/378475861251583275889765.mp4?accessToken=null" type="video/mp4" />
</video>
<video
id="my-video2"
class="video-js"
controls
preload="auto"
width="640"
height="264"
data-setup="{}"
>
<source src="http://localhost:8080/video.mp4" type="video/mp4" />
</video>
<script src="https://vjs.zencdn.net/7.6.6/video.js"></script>
</body>
那么,我想到了下一个问题:如果(ant 和 http 服务器)行为相同,为什么我们需要 Ant 服务?
So, next question comes at mind: why do we need an Ant service if both (ant and http server) behaviors are the same?
推荐答案
如果您使用 Ant Media Server,您可以更好地控制您的结构.请查看以下 AMS 安全文档 -> https://github.com/ant-media/Ant-Media-Server/wiki/Stream-Security-Documentation
If you use Ant Media Server, you have more control in your structure. Please review AMS Security docs in follows -> https://github.com/ant-media/Ant-Media-Server/wiki/Stream-Security-Documentation
基本上,您可以在带有 REST 服务的 AMS 中使用上传/删除/计数等功能.请在此处检查 AMS REST 服务 -> https://antmedia.io/rest/ 另外,您可以在您的 VoD 文件中播放 MP4 和 HLS.
Basically, you can use upload/delete/count, etc. abilities in AMS with REST Services. Please check AMS REST services in here -> https://antmedia.io/rest/ Also, you can play with MP4 and HLS in your VoD files.
希望能帮到你.
这篇关于流媒体服务器或 http 服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!