问题
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.
We’ve played with ant community server, but we’ve some issues we’re not quite figure out. We’ve tested two scenarios:
- to serve a video hosted on a straight http server (httpd)
- to serve a video behind an ant service.
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).
Related code:
<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>
So, next question comes at mind: why do we need an Ant service if both (ant and http server) behaviors are the same?
回答1:
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
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.
I hope, I could help you.
来源:https://stackoverflow.com/questions/59984940/streaming-server-or-http-server