Html 如何在浏览器中播放 .ts 文件(视频/MP2T 媒体类型)?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16386510/
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
How to play .ts files (video/MP2T media type) in Browser?
提问by David Hofmann
I have one .m3u file that points to several .ts files (all in akamai).
我有一个 .m3u 文件指向几个 .ts 文件(都在 akamai 中)。
Because we give to akamai a live stream, they convert it to these .ts files each of 10s. I see that the m3u files are easy to understand, but I can't find a browser based (flash, html5 or native plugin) player for these files.
因为我们向 akamai 提供了一个实时流,他们将其转换为这些 .ts 文件,每 10 秒一次。我看到 m3u 文件很容易理解,但我找不到这些文件的基于浏览器(flash、html5 或本机插件)的播放器。
If I give to vlc the link of the m3u file, vlc plays all the .ts files one after another as if it where only one big file. I want to use flash or something similar to be able to play in browser, the same way vlc can play those .m3u files.
如果我将 m3u 文件的链接提供给 vlc,vlc 会一个接一个地播放所有 .ts 文件,就好像它只有一个大文件一样。我想使用 flash 或类似的东西来在浏览器中播放,就像 vlc 可以播放那些 .m3u 文件一样。
Is this possible ?
这可能吗 ?
采纳答案by hockey_dave
You are basically talking about Apple's HLS format. You can use an html5 object in your web page. You can use http://osmfhls.kutu.ru/flash plugin. You can use jwplayer. There are more choices (e.g. flowplayer).
您基本上是在谈论 Apple 的 HLS 格式。您可以在网页中使用 html5 对象。您可以使用http://osmfhls.kutu.ru/flash 插件。您可以使用 jwplayer。有更多的选择(例如flowplayer)。