简体   繁体   English

需要帮助,让azure媒体服务编码的视频以HTML5 / DASH格式播放

[英]need help getting azure media services encoded video to play in HTML5/DASH

As a question this is pretty simple... but it is not really a question... it is more of a how do I do this? 作为一个问题,这很简单……但这并不是一个真正的问题……更多的是我该怎么做? Before you continue on the rest of the post boils down to this: "Can you please offer an example of a Azure Media Services encoded video, downloaded from and not deployed on Azure Media Services (AMS), and playing in DASH in HTML5"... 在继续其余文章之前,请先总结一下:“能否请您提供一个示例,示例说明一个Azure Media Services编码的视频,该视频是从Azure媒体服务(AMS)下载且未在其上部署的,并以HTML5的DASH格式播放。” ..


Considering Microsoft is dropping support for Expression and that Silverlight is not going to be in Edge... my company wants to pursue a solution where we use Azure Media Services (AMS) to encode video, download it to our network, and then serve it on webpages hosted on IIS on our intrAnet. 考虑到Microsoft放弃对Expression的支持,而Silverlight不会出现在Edge中...我的公司希望寻求一种解决方案,其中我们使用Azure媒体服务(AMS)对视频进行编码,然后将其下载到我们的网络中,然后提供服务在intrAnet上IIS上托管的网页上。 I feel I am making progress... but have some issues... 我觉得我正在进步...但是有一些问题...

Two approaches... 两种方法...

  1. In DASH - I am able to get the samples to work in code samples I have found. 在DASH中-我能够使示例在我发现的代码示例中工作。 But I cannot get the video I have downloaded to play. 但是我无法下载下载的视频。 At best I just get "Unknown Error" in the player where the video would be. 充其量我只是在播放器所在的视频中出现“未知错误”。

Here is an idea of how this code looks now: 这是这段代码现在的样子:

    <!-- DASH-AVC/265 reference implementation -->
<script src="js/jquery-1.11.3.js"></script>
<script src="js/dash.all.js"></script>

<link href="//amp.azure.net/libs/amp/1.0.0/skins/amp-default/azuremediaplayer.min.css" rel="stylesheet">
<script src="//amp.azure.net/libs/amp/1.0.0/azuremediaplayer.min.js"></script>

  <!-- DASH-AVC/265 reference implementation --> <script src="js/jquery-1.11.3.js"></script> <script src="js/dash.all.js"></script> <link href="//amp.azure.net/libs/amp/1.0.0/skins/amp-default/azuremediaplayer.min.css" rel="stylesheet"> <script src="//amp.azure.net/libs/amp/1.0.0/azuremediaplayer.min.js"></script> <script> // setup the video element and attach it to the Dash player function setupVideo() { //var url = "http://wams.edgesuite.net/media/MPTExpressionData02/BigBuckBunny_1080p24_IYUV_2ch.ism/manifest(format=mpd-time-csf)"; //var url = "http://localhost/temp/1/dash2/big_buck_bunny_720p_1mb.ism/manifest"; var url = "http://localhost/temp/1/big_buck_bunny_720p_1mb.ism/manifest"; //var url = "http://wams.edgesuite.net/media/MPTExpressionData02/BigBuckBunny_1080p24_IYUV_2ch.ism/manifest(format=mpd-time-csf)"; debugger; var context = new Dash.di.DashContext(); var player = new MediaPlayer(context); player.startup(); player.attachView(document.querySelector("#videoplayer")); player.attachSource(url); } </script> 

  1. Azure Media Player.. (I generally assume this is not compatible with things not hosted on AMS and am more strongly pursuing the DASH solution) -- In this case I get a blue tv screen thing with a crack in it with an error code below. Azure Media Player ..(我通常认为这与AMS上未托管的东西不兼容,并且更强烈地追求DASH解决方案)-在这种情况下,我得到了一个蓝色的电视屏幕东西,上面有一个裂缝,下面有一个错误代码。 The error code is... "A network error caused the video download to fail part way. (0x2020019f) 错误代码为...“网络错误导致视频下载部分失败。(0x2020019f)

Some things to note: 注意事项:

  1. I have verified the validity (in one way, but that way may not be applicable here) in the sense that it is recognized by IIS Manager as a "Smooth Streaming Presentation" 我已经从IIS管理器识别为“平滑流演示文稿”的意义上验证了有效性(以一种方式,但该方式可能不适用于此处)。

  2. IIS Media Services is installed. IIS媒体服务已安装。

  3. When using the DASH Validator (on the .ism file) at http://www-itec.uni-klu.ac.at/dash/?page_id=605 I get http://www-itec.uni-klu.ac.at/dash/?page_id=605使用DASH验证程序(在.ism文件上)时,我得到了

 Start XLink resolving ===================== XLink resolving successful Valid Start MPD validation ==================== Line:Col[2:111]:cvc-elt.1: Cannot find the declaration of element 'smil'. MPD validation not successful – DASH is not valid! Invalid 

You are trying to set up a streaming server (IIS Media Server) on your local machine. 您正在尝试在本地计算机上设置流服务器(IIS媒体服务器)。 Our team developed IIS Media Server on premises a few years ago, and we are no longer making update on this on premises technology. 几年前,我们的团队在本地开发了IIS Media Server,并且我们不再对此本地技术进行更新。 Instead, we make improvement on Azure Media Services, which hosts streaming server in the cloud. 相反,我们对Azure媒体服务进行了改进,该服务在云中托管流服务器。 New feature such as DASH support, dynamic packaging are not included on IIS Media Server. IIS Media Server不包括DASH支持,动态打包等新功能。

I am just wondering why don't you consider streaming from Azure Media Services, and Azure Media Player you are using only works with Azure Media Services. 我只是想知道为什么您不考虑从Azure媒体服务流式传输,而您正在使用的Azure媒体播放器仅适用于Azure媒体服务。 By Feeding in /manifest as a streaming URL, Azure Media Player will detect which formats best playback on your platform based on your technology preference, and it will request different format. 通过将/ manifest作为流URL进行输入,Azure Media Player将根据您的技术偏好来检测哪种格式在您的平台上最佳播放,并且将请求其他格式。 The server will dynamically package the stream based on multiple rate Mp4 (which you need to encode to). 服务器将基于多个速率Mp4(需要对其进行编码)动态打包流。 For more information, please refer to our MSDN documentation and please let me know if you have any questions. 有关更多信息,请参考我们的MSDN文档 ,如果您有任何疑问,请告诉我。

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

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