网页中插入VLC播放器播放rtsp视频流步骤

1.      仿照http://download.csdn.net/detail/haowenxin123456789/8044245 中步骤;

2.      从http://www.videolan.org/vlc/index.html  中下载 vlc-2.2.1-win32.exe 并安装到D:\\ProgramFiles文件夹下;

3.  运行:vegsvr32  D:\\ProgramFiles\\VideoLAN\\VLC\\axvlc.dll ;

4.  test.html 文件代码如下:

<html>
<body>
<!--[if IE]>
   <object type='application/x-vlc-plugin' id='vlc' events='True'
       classid='clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921' codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab" width="720" height="540">
          <param name='mrl' value='http://g3.ykimg.com/0130391F455321692EC42C1496BCB33029ABCB-A4FF-A71D-EC9C-063ED7327684' />
          <param name='volume' value='50' />
          <param name='autoplay' value='true' />
          <param name='loop' value='false' />
          <param name='fullscreen' value='false' />
    </object>
<![endif]-->
<!--[if !IE]><!-->
    <object type='application/x-vlc-plugin' id='vlc' events='True' width="720" height="540" pluginspage="http://www.videolan.org" codebase="http://downloads.videolan.org/pub/videolan/vlc-webplugins/2.0.6/npapi-vlc-2.0.6.tar.xz">
        <param name='mrl' value='rtsp://218.204.223.237:554/live/1/0547424F573B085C/gsfp90ef4k0a6iap.sdp' />
        <param name='volume' value='50' />
        <param name='autoplay' value='true' />
        <param name='loop' value='false' />
        <param name='fullscreen' value='false' />
    </object>
<!--<![endif]-->
</body
</html>

在IE浏览器中打开test.html即会播放实时的rtsp视频流。

你可能感兴趣的:(网页中插入VLC播放器播放rtsp视频流步骤)