使用 HTML 5 进行实时视频流传输?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/40045857/
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
Live video streaming with HTML 5?
提问by Dimitrina Stoyanova
I want to make live video streaming. For example there is discussion. And somebody is recording it. I want the video record to appear on my web page. I want to do this with HTML 5. I don't know if it's possible, but has anyone tried ? Thank you in advance!
我想制作实时视频流。例如有讨论。有人正在记录它。我希望视频记录出现在我的网页上。我想用HTML 5做到这一点。我不知道这是否可能,但有人尝试过吗?先感谢您!
回答by Dimitrina Stoyanova
I'm sorry, I wasn't clear enough in my question. I was thinking to use HTML 5 and JS instead of flash and other software products. I found my solution here: https://davidwalsh.name/browser-cameraand here : http://recordrtc.org/. Thank you all for your help!
对不起,我的问题不够清楚。我正在考虑使用 HTML 5 和 JS 而不是 Flash 和其他软件产品。我在这里找到了我的解决方案:https: //davidwalsh.name/browser-camera和这里:http: //recordrtc.org/。谢谢大家的帮助!
回答by Reinhard Grandl
To generate a state of the art live stream with good quality of experience, I recommend to make use of adaptive streaming technologies like MPEG-DASH or HLS.
为了生成具有良好体验质量的最先进的实时流,我建议使用自适应流技术,如 MPEG-DASH 或 HLS。
Utilizing Youtube's live streaming feature is definitely one (good) option. If you prefer a more controllable solution, you can use live streaming services, like Wowzaor Bitmovin, which offer Encoding as well as HTML5 based playout solutions.
利用 Youtube 的直播功能绝对是一个(不错的)选择。如果您更喜欢更可控的解决方案,您可以使用实时流媒体服务,例如Wowza或Bitmovin,它们提供编码以及基于 HTML5 的播放解决方案。
回答by Endios
You need an intermediary server like flashphoner. Here you can read article how to stream video from HTML5page to YouTube live using the gateway software.
你需要一个像flashphoner这样的中间服务器。在这里您可以阅读文章如何使用网关软件将视频从 HTML5页面流式传输到 YouTube 直播。
Long story short you have to convert your HTML5 (WebRTC) stream into RTMP stream acceptable by Youtube Live.
长话短说,您必须将 HTML5 (WebRTC) 流转换为 Youtube Live 可接受的 RTMP 流。
回答by pattyland
A few browserscan display a HTTP Stream right in the HTML5 <video>
tag
一些浏览器可以直接在 HTML5<video>
标签中显示 HTTP 流
<video src="http://example.com/stream.m3u8">
You should built fallbacks for the other ones... View this answer too: https://stackoverflow.com/a/22001830/2874523
你应该为其他人建立后备......也查看这个答案:https: //stackoverflow.com/a/22001830/2874523