Embed an IP camera in a website with PHP?

I did it quickly, but I was wondering if this is possible? I opened the ports on our router so that it is accessible from anywhere, but could I use PHP or similar to capture streaming video and show it on a website somewhere?

+5
source share
3 answers

Try this (HTML5) or just an internal object (HTML <5) with all the entries %StreamURL%replaced by the URL of your stream.

<video width="320" height="240" autoplay controls>
    <source src="%StreamURL%" type="video/mp4">
    <object width="320" height="240" type="application/x-shockwave-flash" data="http://releases.flowplayer.org/swf/flowplayer-3.2.5.swf">
        <param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.5.swf" /> 
        <param name="flashvars" value='config={"clip": {"url": "%StreamURL%", "autoPlay":true, "autoBuffering":true}}' /> 
        <p><a href="%StreamURL%">view with external app</a></p> 
    </object>
</video>
+5
source

You need a server to broadcast the stream for the viewer and the player component, which can also work on the desktop and on a mobile device.

stackowerflow: RTSP -?

: http://ipcamlive.com/howdoesitwork

+4

Please also make sure that it is safe, which includes live demos of it and for free:

http://foscam.us/forum/showing-secure-methods-using-php-to-display-your-ip-cameras-t8721.html#p42139

Don

0
source

All Articles