I have a IP CCTV camera which support MJPEG. I would like to display image in HTML (from PHP script) together with other data.
I know that I can get a screenshot from the camera using:
http://username:password@<servername>/Streaming/channels/1/picture
however when I am using this simple html code image is not always displayed:
<html>
<body>
<IMG id="myImage" SRC='http://username:password@192.168.0.20/Streaming/channels/1/picture'>
</body>
</html>
On Microsoft Edge, it is not possible even to login to camera. On Firefox works fine. On Chrome camera is logged however image is not displayed.
So the question is how I can get image in HTML or better in PHP to display it on the page. I prefer to use PHP because I want to add more data to page, like temperature etc.
Also will be nice to refresh the image, but this can be done in AJAX later.