I am trying to stream video from a IP Cam to my my Wordpress site. I would like my stream to be available via common devices Windows, Mac, Android and IOS. Currently I am using VLC to stream,but I can only get a flash stream to work but I would like to do FLV, MP4 and webm. What player should I use to display the MP4 and webm video on the site? Also I don't think the calls to VLC are correct cause I can't open the MP4 and webm stream in VLC on another computer, but I can open the flv stream.
VLC Script:
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 Player Code:
<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>
To stream WebM you can use the following command (worked on arch linux setup)
Although this (webm) is not officially supported. See these supported formats matrices
For the documentation of sout params please see the official page
As for MP4:
It is not supported at all