Html HTML5 <video> 标签:没有 Flash 的 RTMP 流媒体?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/28957205/
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-08-29 03:38:41  来源:igfitidea点击:

HTML5 <video> tag: RTMP streaming without Flash?

htmlflashvideo

提问by Madamadam

I am building a video-site for long lecture recordings. So a streaming server is a must. We only have to support newest browsers, which support the HTML5 <video>tag. So when the stream is done via RTMP protocol (Red5 server for example), will clients have to have adobe flash installed or is a browser capable of the <video>tag enough?

我正在建立一个视频网站,用于长时间的讲座录音。所以流媒体服务器是必须的。我们只需要支持支持 HTML5<video>标签的最新浏览器。因此,当流通过 RTMP 协议(​​例如 Red5 服务器)完成时,客户端是否必须安装 adobe flash 或者浏览器是否<video>足够支持标记?

回答by akmozo

I think that for a simple video streaming service (for VOD) you are not forced to use a streaming server(like AMS, Wowza, Red5, ...) just a HTTP server (like Apache, nginx, ...) with a good configuration and some special modules (like nginx ngx_http_mp4_module, H264 Streaming Module for Apache, ...) can do the job because it can provide a HTTP stream available for Flash Player and HTML5.

我认为对于简单的视频流服务(对于 VOD),您不必使用流服务器(如 AMS、Wowza、Red5 等),而只是一个 HTTP 服务器(如 Apache、nginx 等)良好的配置和一些特殊模块(如 nginx ngx_http_mp4_moduleH264 Apache Streaming Module,...)可以完成这项工作,因为它可以提供可用于 Flash Player 和 HTML5 的 HTTP 流。

So for your question, you should know that to play an RTMP stream on a browser, you should have Flash Player, HTML5 can not play it. That's why you have to provide a HTTP stream for HTML5 based video player. After that, you can use a Flash to HTML5 fallback or the inverse.

所以对于你的问题,你应该知道要在浏览器上播放RTMP流,你应该有Flash Player,HTML5不能播放。这就是您必须为基于 HTML5 的视频播放器提供 HTTP 流的原因。之后,您可以使用 Flash 到 HTML5 的后备或反向。

Hope that can help.

希望能有所帮助。

回答by emrhzc

In case anyone else ends up here looking for a non-Flash solution for a non-http-based protocol i.e. RTSP (beware that OP asks for RTMP) here's a solution https://github.com/Streamedian/html5_rtsp_player.

如果其他人最终在这里寻找非基于 http 的协议的非 Flash 解决方案,即 RTSP(注意 OP 要求 RTMP),这里有一个解决方案https://github.com/Streamedian/html5_rtsp_player