使用MPEG-Dash的流畅的流式.ism清单

时间:2014-09-21 17:00:32

标签: javascript html5 iis html5-video

我一直在试图弄清楚如何使用dash.js(MPEG-Dash)来处理.ism编码的流畅文件。正如您从下面提供的链接中看到的,他们使用的是.ism文件。当我尝试使用我的编码.ism视频并附加/manifest(format=mpd-time-csf)时,我在控制台中收到以下错误代码:415 (Unsupported Media Type)

我使用Microsoft Expression Encoder构建.ism文件,但这通常与Silverlight插件一起用于流式传输视频。是否有可能采用.ism并使其可以与dash.js一起玩?

Embedding a MPEG-DASH Adaptive Streaming Video in an HTML5 Application with DASH.js

Serving MPEG DASH with the Microsoft IIS Smooth Streaming Media Extension

<html>
<head>

<script type="text/javascript" src="/js/jquery.js"></script>
<script type="text/javascript" src="/js/dash.all.js"></script>

<style>
    video {
      width: 40%;
      height: 40%;
    }
</style>

<script>
    // setup the video element and attach it to the Dash player
    function setupVideo() {
        var url = "video.ism/manifest(format=mpd-time-csf)";
        var context = new Dash.di.DashContext();
        var player = new MediaPlayer(context);
        player.startup();
        player.attachView(document.querySelector("#videoplayer"));
        player.attachSource(url);
    }
</script>

</head><body onload="setupVideo()">

    <video id="videoplayer" controls></video>

</body></html>

2 个答案:

答案 0 :(得分:1)

你可以hasplayer.js扩展dash.js并支持SmoothStreaming。

(function(){
    var url = "http://playready.directtaps.net/smoothstreaming/SSWSS720H264/SuperSpeedway_720.ism/Manifest";
    var context = new MediaPlayer.di.Context();
    var player = new MediaPlayer(context);
    player.startup();
    player.attachView(document.querySelector("#videoPlayer"));
    player.attachSource(url);
})();

答案 1 :(得分:-1)

另一种解决方案是使用Universal Streaming中的工具。

(我不以任何方式与他们有任何关系)