简体   繁体   English

如何将树莓派的实时流嵌入到html网页中

[英]how to embed live stream from raspberry pi into a html webpage

i recently posted about a rapberry pi project that im working on regarding a RC robot using a pi as a brain and i was trying to make a GUI for it. 我最近发布了一个有关rapberry pi项目的信息,该项目正在致力于将pi用作大脑的RC机器人,并且我正尝试为其创建GUI。

my question got shut down! 我的问题被拒绝了!

so here is another one. 所以这是另一个。 i have decided to go with a web GUI. 我决定使用Web GUI。

im teaching myself html, CSS and javascript and Jquery along the way. 我会自学HTML,CSS,JavaScript和Jquery。

however my first problem has been how to embeb a live feed of my raspberry camera onto my web page. 但是,我的第一个问题是如何将树莓相机的实时供稿嵌入到我的网页中。

i thought this was going to be very easy, it probably would have been if browsers or (at least chrome,my browser) still supported the vlc plug-in. 我认为这将非常容易,如果浏览器或(至少是我的浏览器为chrome)仍支持vlc插件,那就应该是这样。

i have spent the day googling various ways to embed my live stream onto a web page with no success. 我花了整整一天的时间搜索各种方法,将我的实时流嵌入到网页上,但没有成功。

the thing most places are pushing towards is using some form of .mjepg file to stream to the web page but im having now hope with this either. 大多数地方都在努力使用某种形式的.mjepg文件流式传输到网页,但是我现在对此都抱有希望。 one website suggested using U4VL but i can seem to download it onto my pi. 一个网站建议使用U4VL,但我似乎可以将其下载到我的pi上。 im assuming as the post was from 2013 that U4VL doesnt exist anymore. 我假设从2013年开始发布该帖子,不再存在U4VL。

is there anything similar to either vlc embedded streaming or the U4VL .mjpeg driver out there that will do the same job nowadays?? 有没有类似于vlc嵌入式流或U4VL .mjpeg驱动程序的东西,它们现在可以做同样的工作?

many thanks. 非常感谢。

I can think of a few ways to accomplish this with H264 instead of MJPEG. 我可以想到几种使用H264而不是MJPEG来完成此操作的方法。 One way would be to use ffmpeg or gstreamer or VLC to write a HLS/Mpeg-Dash stream to a file location visible to the web server. 一种方法是使用ffmpeg或gstreamer或VLC将HLS / Mpeg-Dash流写入Web服务器可见的文件位置。 You can then incorporate the stream to your page using a Html5 video tag. 然后,您可以使用Html5视频标签将流合并到页面中。 Example with raspi, Logitech camera, and ffmpeg raspi,Logitech相机和ffmpeg的示例

An alternative method maybe to leverage WebRTC. 一种替代方法可能是利用WebRTC。 Example with raspi camera and gstreamer . 带有raspi相机和gstreamer的示例

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

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