如何在网页中显示 RTSP 视频流?

问题描述:

我有一台提供实时 RTSP 视频流的网络摄像机.我可以使用 VLC 媒体播放器通过提供 URL 来查看提要:

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

但我需要在网页上显示提要.相机供应商提供了一个我可以使用的 ActiveX 控件,但它确实有问题,导致浏览器经常挂起.

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.

有谁知道我可以使用哪些支持 RTSP 的替代视频插件?

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

摄像机可以配置为以 H264 或 MPEG4 格式进行流式传输.

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

VLC 还附带了一个 ActiveX 插件,可以在网页中显示提要:

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>