17

After we are moving over to html5 and many browsers like Google chrome bans VLC web plugin....

Is there any way to play h.264 / h.265 Rtsp streams in browsers this days ?

Ali
  • 3,057
  • 4
  • 33
  • 50
Stweet
  • 603
  • 3
  • 9
  • 25
  • i have search about that but find way on firefox only, i think chrome dont support that anyway – Ali Feb 01 '17 at 16:55

5 Answers5

23

Direct RTSP streaming is still not supported by browsers, if you have to play an RTSP stream in the browser then you need a proxy server that will convert RTSP to HTTP stream.

Many open source projects are there that will do the work of RTSP to HTTP conversion or you can use FFmpeg (used by VLC) to convert RTSP to HTTP and then can stream it on the browser.

Mohd Asim Suhail
  • 2,020
  • 14
  • 21
  • 1
    Why doesn't browser support this protocol? I'm a complete noobs at computer network, and doesn't understand the difficulties in implementing native or JS rtsp client. – Minh Nghĩa Aug 28 '19 at 10:09
  • I feel it is all about what tech giants like Microsoft, Google, Amazon etc wants. If they all agree to use RTSP then it will be implemented but i dont see that happening as MP4, webp are highly used format. – Mohd Asim Suhail Aug 28 '19 at 10:27
6

These guys put together an rtsp over websocket player. https://github.com/Streamedian/html5_rtsp_player

But it does require a server to create the connection and parse the rtsp info (they include an easy to install package to take care of that).

And it doesn't support h265.

Victor.dMdB
  • 831
  • 2
  • 10
  • 25
  • 1
    Is this project still alive? 502 - Bad Gateway error all the time (In spite of that for the full example you would need some license thing from their site) – Daniel Jan 08 '20 at 15:34
2

As other mentioned you cannot play RTSP natively on any browser. If your source is strictly RTSP then you can use a proxy server between your RTSP server and browser. You can use WebRTC proxy server to play RTP on WebRTC compliant browsers. http://webrtc.live555.com/

Alam
  • 1,318
  • 13
  • 25
1

you can use VXG Media Plugin for Chrome Supported video formats: H.264, MPEG-4, MPEG-2 and others. you can find full document related this plugin from link given below https://www.videoexpertsgroup.com/vxg-chrome-plugin/

https://www.videoexpertsgroup.com/nacl_player_api/#examples

This plugin works perfect but now it is not working. You can use ffmpeg and video.js to convert and display it for more detail see here Streaming via RTSP or RTP in HTML5

Hitesh Tripathi
  • 854
  • 10
  • 20
0

Bhargav: I've deleted another answer, please undelete this one.

It's possible with media-stream-library-js but you'll need to wrap RTSP into a WebSocket with websockify or websockify-nginx-module

sergio
  • 111
  • 4