简体   繁体   English

我是否需要azure媒体服务才能将视频流式传输到html5

[英]Do I need azure media services for streaming a video to html5

I am currently planing the total cost of hosting my videos on azure. 我目前正在计划在天青上托管视频的总费用。 After studying the pricing I noted that the costs for storing the data is actually much lower than the price for converting them. 在研究了定价之后,我注意到存储数据的成本实际上比转换数据的价格低得多。 Unfortunately I will have many videos, but they won't be watched a lot. 不幸的是,我将有很多视频,但它们不会被大量观看。 Therefore the relative cost for converting them to different formats is too high for me. 因此,将它们转换为不同格式的相对成本对于我来说太高了。

Now my question, do I actually need to convert the videos to different formats or wouldn't it be possible to send the video directly from the storage to the browser? 现在我的问题是,我是否真的需要将视频转换为不同的格式,还是不能将视频直接从存储设备发送到浏览器?

Yes, it's possible to send them directly from storage to the browser, just like it's possible to send any file that you make publicly accessible. 是的,可以将它们直接从存储设备发送到浏览器,就像可以发送您可以公开访问的任何文件一样。

If you're going to store your videos in blob storage, just make sure you either mark the container as public or you generate SAS urls for each video that make them publicly accessible. 如果要将视频存储在Blob存储中,只需确保将容器标记为公共容器,或者为每个视频生成SAS网址即可公开访问。

To send video's from storage to browser you can use SAS urls as Zain mentioned. 要将视频从存储设备发送到浏览器,您可以使用Zain提到的SAS网址。 You need to ask yourself what devices,bitrates your solution is targeting: which browsers, web only or web + mobile. 您需要问自己,解决方案针对的是哪种设备,比特率高:哪些浏览器,仅Web或Web + Mobile。

Probably you want your users be able to start watching video before it has been fully downloaded on client(progressive download). 可能您希望用户能够在视频完全下载到客户端之前(渐进式下载)开始观看视频。 Make sure that you encoded it into desired bitrate and moov atom in the video is placed at the beginning of file - https://support.jwplayer.com/customer/portal/questions/12945932-mp4-file-progressive-play . 确保已将其编码为所需的比特率,并且视频中的Moov原子位于文件的开头-https: //support.jwplayer.com/customer/portal/questions/12945932-mp4-file-progressive-play

Based on your original video format and answers to above questions you might need to re-encode your videos and upload re-encoded version to server. 根据您的原始视频格式和上述问题的答案,您可能需要对视频进行重新编码并将重新编码的版本上传到服务器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM