如何通过Web应用程序获取RTSP流 [英] How to get RTSP stream over web application

查看:588
本文介绍了如何通过Web应用程序获取RTSP流的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设这是我的视频流网址:

Suppose this is my video stream URL:

rtsp://MyUserID:MyPassword@45.113.153.42:556/cam/realmonitor?channel=1&subtype=0

视频流可与VLC播放器完美配合,但我希望它可以在我的Web应用程序上播放.是否有可能在任何Web播放器中播放RTSP协议?

The video stream works perfectly with VLC player but I want it to play it over my web application. Is there any possibility to play RTSP protocol in any web player?

推荐答案

不幸的是,通过Web浏览器播放rtsp不再那么简单.

Unfortunately playing an rtsp via your web browser is not that straight forward anymore.

不再支持NPAPI插件

这意味着最终将不再支持浏览器的VLC插件. Firefox 52+和其他浏览器不再支持它.请参阅此公告,基本上指出:

This means in the end the VLC plugin for browsers is no longer supported. Firefox 52+ and other browser don't support it anymore. See this announcement, basically stating that:

Firefox不再支持

"已安装的NPAPI插件,除了 用于Adobe Flash"

"installed NPAPI plugins are no longer supported in Firefox, except for Adobe Flash"

videolan论坛,目前没有解决方案.

This also has been discussed on the videolan Forum, with no current solution.

使用旧的Mozilla Firefox ESR浏览器

仍然支持NPAPI插件.但是仅到2018年6月.因此,这并不是真正的未来解决方案.可以在此处.

Still supports NPAPI plugins. However only until June 2018. Thus not really a future proof solution. Details on Firefox ESR can be found here.

可能的解决方案

您可以将HTML 5与其他一些编码技术一起使用,以将您的RTSP流转换为分段流,并通过HTML 5视频标签进行传递.那里有很多解决方案.查看来自stackoverflow的帖子,例如:

You could use HTML 5 with some other coding technology to transform your RTSP stream into let's say a segmented stream and deliver it via HTML 5 video tag. There is alot of solutions out there; look into posts from stackoverflow such as:

  • Streaming via RTSP in HTML 5
  • VLC stream to chrome
  • Display an RTSP video stream in a web page (similar to your question)

希望这会为您指明正确的方向.

Hope this points you in the right direction.

这篇关于如何通过Web应用程序获取RTSP流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆