2
我想從IP攝像機流視頻到我的WordPress的網站。我希望我的流可通過常見設備Windows,Mac,Android和IOS獲得。目前我正在使用VLC進行流式傳輸,但我只能使用Flash流式傳輸,但我想做FLV,MP4和webm。我應該使用什麼播放器在網站上顯示MP4和webm視頻?另外我不認爲對VLC的調用是正確的,因爲我無法在另一臺計算機上的VLC中打開MP4和webm流,但是我可以打開flv流。VLC流到MP4 WEBM和閃存
VLC腳本:
cd "C:\Program Files (x86)\VideoLAN\VLC"
vlc -vvv -I dummy http://IP/cgi/mjpg/mjpg.cgi :sout=#transcode{vcodec=h264,vb=200,deinterlace,ab=32,fps=25,width=460,height=480}:duplicate{dst=std{access=http{mime=video/x-flv},dst=0.0.0.0:8080/webcam.flv}}
vlc -vvv -I dummy http://IP/cgi/mjpg/mjpg.cgi :sout=#transcode{vcodec=VP80,vb=200,deinterlace,ab=32,fps=25,width=460,height=480,acodec=vorb}:duplicate{dst=std{access=http{mime=video/x-webm},dst=0.0.0.0:8080/webcam.webm}}
vlc -vvv -I dummy http://IP/cgi/mjpg/mjpg.cgi :sout=#transcode{vcodec=h264,vb=200,deinterlace,ab=32,fps=25,width=460,height=480}:duplicate{dst=std{access=http{mime=video/x-mp4},dst=0.0.0.0:8080/webcam.mp4}}
FLV播放器代碼:
<object id="player1" width="640" height="480" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0">
<param name="flashvars" value="file=http://VLC_IP:8080/webcam.flv&autostart=true&stretching=exactfit" />
<param name="allowfullscreen" value="true" />
<param name="allowscriptaccess" value="always" />
<param name="src" value="http://player.longtailvideo.com/player.swf" />
<embed id="player1" width="640" height="480" type="application/x-shockwave-flash" src="http://player.longtailvideo.com/player.swf" flashvars="file=http://VLC_IP:8080/webcam.flv&autostart=true&stretching=exactfit" allowfullscreen="true" allowscriptaccess="always" />
</object>
什麼是你的HTML代碼的支持?我說「沒有找到支持MIME類型的視頻」 – anu