在网站上显示 RTSP [英] Displaying RTSP on website

查看:92
本文介绍了在网站上显示 RTSP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个指向要在网页上显示的摄像机的 RTSP 链接.由于视频标签不支持 RTSP,并且 google chrome 不再支持 VLC 和 QuickTime 插件,目前使用 RTSP 链接显示此相机的最佳方式是什么?

I have a RTSP link to a camera which I want to display on a web page. Since the video tag does not support RTSP, and google chrome does not support VLC and QuickTime plugins anymore, what is currently the best way to display this camera using the RTSP link?

推荐答案

您可以使用 Janus Gateway 在支持 h.264 的 WebRTC 浏览器中显示 h.264 流(我认为目前只有最近的 Chrome 和 Firefox 支持它盒子外面).如果你很幸运,如果相机输出适当的约束基线和 lvl 3.1(以及我最近了解到的每个 IDR 帧中的 SPS 和 PPS...),你甚至不需要转码.接近它的方法是:

You can use Janus Gateway to display the h.264 stream in the WebRTC enabled browsers with h.264 support (I think currently only recent Chrome and Firefox support it out of the box). If you are lucky you won't even need to transcode if the camera outputs proper Constrained baseline with lvl 3.1 (and SPS and PPS in each IDR frame as I've learned recently...). The way to approach it is to:

  • 设置 Janus 并配置 Janus 的流媒体插件以接受 RTP 源(一个条目可以包含音频和视频)
  • 使用 gstreamer/ffmpeg 读取 rtsp 并为每个提供的流(您感兴趣的流)将 RTP 流传输到 Janus

它可以工作并且无需转码,速度非常快,甚至比 VLC 的 RTSP 播放器还要快.如果你需要很好地转码取决于编码的速度,但它真的很快,正如我测试的那样,它不会提供一种缓慢的延迟,随着流的持续时间而变得更大(就像使用 HLS 和 ffmpeg)

It works and without transcoding it is blazingly fast, even faster than VLC's RTSP player. If you need to transcode it well depends on the speed of the encoding but It's really fast and as I tested it doesn't provide a kind of creeping on lag, that get's bigger with the duration of streaming (like with HLS and ffmpeg)

这篇关于在网站上显示 RTSP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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