0

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?

Yonatan Naxon
  • 639
  • 1
  • 7
  • 25
  • 1
    Possible duplicate of [How can I display an RTSP video stream in a web page?](http://stackoverflow.com/questions/2245040/how-can-i-display-an-rtsp-video-stream-in-a-web-page) – Samer Tufail Oct 19 '16 at 08:56

2 Answers2

0

If latency is not a great consideration you can use ffmpeg to generate a HLS playlist and serve it to clients via an HTTP server - see this. Otherwise you would need solution that would output a live fragmented MP4 stream.

Community
  • 1
  • 1
Rudolfs Bundulis
  • 11,636
  • 6
  • 33
  • 71
0

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:

  • Setup Janus and configure Janus' streaming plugin to accept RTP sources (one entry can contain audio and video)
  • Use gstreamer/ffmpeg to read rtsp and for each of the streams provided (one's you've interest in) stream RTP to Janus

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)

Pawel K
  • 766
  • 8
  • 19