網頁中插入VLC播放器播放rtsp視頻流步驟,vlcrtsp
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視頻流。