javascript 将 .ism 平滑流式传输到 HTML5 视频标签

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/16222889/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-27 03:46:14  来源:igfitidea点击:

Smooth Streaming .ism to an HTML5 video tag

javascripthtml5-videosmooth-streamingsmooth-streaming-player

提问by Tor

I understand that the best bet when streaming a video as a source in an HTML5 tag would be .mp4. But let's say that I have a source that only outputs fragmented to an ism/manifest.

我知道将视频作为 HTML5 标签中的源流式传输时最好的选择是 .mp4。但是假设我有一个源,它只输出碎片化到一个 ism/manifest。

Is there any way at all, whether through other libraries or messy hacks, that I can bring this video into something rendered as a tag onscreen? The closest I have found is Walkthrough: Building Your First HTML5 Smooth Streaming Playerbecause it allows this to be done - but I neither have Windows 8, or want to have this running a server capable of .NET. I was hoping there was something, messy or not, that I could achieve this with entirely within javascript and executable locally without a deploy.

有没有什么办法,无论是通过其他库还是凌乱的黑客,我可以把这个视频变成在屏幕上呈现为标签的东西?我发现的最接近的是演练:构建你的第一个 HTML5 平滑流播放器,因为它允许这样做 - 但我既没有 Windows 8,也不希望它运行支持 .NET 的服务器。我希望有一些东西,无论是否混乱,我都可以完全在 javascript 中实现这一点,并且无需部署即可在本地执行。

Thanks

谢谢

回答by Mike

Firstly, W3Cdoes not provide a standard for adaptive bitrate streaming, yet. So for the time being most browsers only support simple progressive download playback. Hence, there is no JS implementation of a Smooth Streaming player and Microsoft is not working on one, as far as I know.

首先,W3C还没有为自适应比特率流提供标准。所以目前大部分浏览器只支持简单的渐进式下载播放。因此,据我所知,Smooth Streaming 播放器没有 JS 实现,微软也没有在开发一个。

The example you provide uses the "Microsoft Smooth Streaming Client SDK Beta 2 for Windows 8" which is a C++ library and is only available for Windows Store Appsdevelopment. It has nothing to do with browsers.

您提供的示例使用“Microsoft Smooth Streaming Client SDK Beta 2 for Windows 8”,它是一个 C++ 库,仅可用于Windows Store Apps开发。它与浏览器无关。

So, unfortunately this is not yet possible. Even more, I doubt that this will ever happen, because everybody is waiting for MPEG DASHto be finalized.

所以,不幸的是,这还不可能。更重要的是,我怀疑这是否会发生,因为每个人都在等待MPEG DASH最终确定。

UPDATE. Please, notice that you always can use Siverlight application for playing SmoothStreaming. The referenced HTML5 Player frameworkis capable of falling back to Silverlight.

更新。请注意,您始终可以使用 Siverlight 应用程序播放 SmoothStreaming。引用的HTML5 播放器框架能够回退到 Silverlight。

回答by George Birbilis

no luck for Microsoft Smooth Streaming, but regarding MPEG-DASH which is similar (see http://blog.johndeutscher.com/2013/06/10/mpeg-dash-preview-from-windows-azure-media-services):

微软平滑流没有运气,但关于类似的 MPEG-DASH(参见http://blog.johndeutscher.com/2013/06/10/mpeg-dash-preview-from-windows-azure-media-services):

"Dash.js is permissively licensed (under the BSD license) and can therefore be studied and reused by anyone seeking to provide their own DASH-AVC/264 compliant player. The goal is to make it easier for third-parties to build adaptive streaming video players."

“Dash.js 获得许可(在 BSD 许可下),因此任何寻求提供自己的 DASH-AVC/264 兼容播放器的人都可以研究和重用。目标是让第三方更容易构建自适应流媒体视频播放器。”

http://msopentech.com/blog/2013/06/20/ms-open-tech-contributes-to-open-source-adaptive-streaming-video-player/

http://msopentech.com/blog/2013/06/20/ms-open-tech-contributes-to-open-source-adaptive-streaming-video-player/

also see: https://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.htmlwhich is required for Dash.js

另见: https://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html这是需要Dash.js