How can I display an RTSP video stream in a web page?

elMarquis picture elMarquis · Feb 11, 2010 · Viewed 523.2k times · Source

I have an ip camera which provides a live RTSP video stream. I can use VLC media player to view the feed by providing it with the URL:

rtsp://cameraipaddress

But I need to display the feed on a web page. The camera provider supplied an ActiveX control which I got working, but it is really buggy and causes the browser to frequently hang.

Does anyone know of any alternative video plugins I could use which support RTSP?

The camera can be configured to stream in either H264 or MPEG4.

Answer

Russell picture Russell · Jul 7, 2011

VLC also comes with an ActiveX plugin that can display the feed in a web page:

http://wiki.videolan.org/ActiveX/HTML

<OBJECT classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921"
     codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab"
     width="640" height="480" id="vlc" events="True">
   <param name="Src" value="rtsp://cameraipaddress" />
   <param name="ShowDisplay" value="True" />
   <param name="AutoLoop" value="False" />
   <param name="AutoPlay" value="True" />
   <embed id="vlcEmb"  type="application/x-google-vlc-plugin" version="VideoLAN.VLCPlugin.2" autoplay="yes" loop="no" width="640" height="480"
     target="rtsp://cameraipaddress" ></embed>
</OBJECT>