简体   繁体   English

将原始H264流式传输到Web浏览器

[英]Stream raw h264 into web browser

So for the project, we already have a raw h.264 stream that is correctly produce, but we want to send that into a web browser to be displayed as a simple live stream. 因此,对于该项目,我们已经有正确生成的原始h.264流,但是我们希望将其发送到Web浏览器中以作为简单的实时流显示。

We are looking at RTP, because it seems like it can support such live stream. 我们正在研究RTP,因为它似乎可以支持这种实时流。 But it's all confusing. 但这一切令人困惑。

So, is it possible to simply stream raw h.264 data into the web browser, using which ever protocol there is? 因此,是否有可能使用存在的任何协议将原始的h.264数据简单地流式传输到Web浏览器中? That's all we want. 这就是我们想要的。 We don't care about going rewinding or fast forward, just showing the last image produced, as fast as possible. 我们不在乎快退或快进,只是尽可能快地显示最后生成的图像。

We might even be able to go with another encoder if it's possible and it's easily supported by browsers ( only Chrome really matters here ). 如果可能的话,我们甚至可以使用其他编码器,并且浏览器可以轻松地支持它( 只有Chrome在这里才很重要 )。

And the application is real time critical, so converting to m3u8/ts files is probably not a good solution because of the delay. 而且该应用程序对实时至关重要,因此由于存在延迟,因此转换为m3u8 / ts文件可能不是一个好的解决方案。

There's already a couple of discussion here about that, but it's so confusing and not even sure that's what we are looking for. 此处已经有一些讨论,但这很令人困惑,甚至不能确定这就是我们想要的。 Here are some that I found: - H264 RTP stream with gstreamer-1.0 - How to stream h264 with udp gstreamer 我发现了以下内容:- 使用gstreamer-1.0的H264 RTP流 - 如何使用udp gstreamer传输h264

So, is it possible to simply stream raw h.264 data into the web browser, using which ever protocol there is? 因此,是否有可能使用存在的任何协议将原始的h.264数据简单地流式传输到Web浏览器中?

No. Web browsers only supply HTTP, WebSocket, and WebRTC. 否。Web浏览器仅提供HTTP,WebSocket和WebRTC。

And the application is real time critical, so converting to m3u8/ts files is probably not a good solution because of the delay. 而且该应用程序对实时至关重要,因此由于存在延迟,因此转换为m3u8 / ts文件可能不是一个好的解决方案。

So Http is out. 所以Http出来了。 Leave you with WebRTC or fMp4 over web socket. 通过网络套接字使用WebRTC或fMp4。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM