RTSP in HTML5 with low latency

  • Time to read less than 1 minute

For IP camera, low latency is very important, the best latency is about 300ms to 400ms, and RTSP(Real Time Streaming Protocol) is a best protocol for IP camera, all the IP camera has web interface, so the web interface need support video live view. and in IE and old version Chrome/Firefox/Safari support plugin, so most IP camera manufacturer will develop plug-in for IE and Chrome, IE has ActiveX, Chrome/Firefox/Safari has NPAPI interface. And Flash in another plug-in, some application also use RTMP for Flash to play video in HTML5.

And if you has used IP camera ActiveX, it is very difficult to use, and some company has IT policy, user can't install ActiveX.

ActiveX NPAPI

But the world has changed these years, most Browser has disable the plug-in and flash, Chrome/Edge has disable plugin, for IP camera manufacturer, how to keep update for new browser. we introduce two way to achieve low latency H264 video in browser.

  • Media source extensions

Most browser has support MSE(Media source extensions),  we can use websocket to get the H264 stream, and then put the H264 to MSE interface, as we has tested, Chrome video latency is about 500ms. but IE & Edge is not good. 

Media Source Extensions

 

  • WebRTC

Last year, Apple has join WebRTC group, and Safari 11 has support WebRTC in macOS & iOS, this is a good news for HTML5 app developer, before this, user must use HLS to play video in HTML5, but HLS has build-in video latency. Edge also has join WebRTC last year, so If IP camera has build in WebRTC, and it is a good news for this industry. 

WebRTC