Click to See Complete Forum and Search --> : how to show a fixed image when stream from webcam is off
skwebpages
01-21-2009, 08:02 PM
I have a remote streaming IP Panasonic webcam which sometimes goes off-line and I would like to automatically display an alternative fixed image in its place when this occurs.
Any suggestions would be appreciated.
the code used at present is shown below:
<img alt="Live Inveraray Webcam. Apologies if image is unavailable. " src="http://inveraraytv.viewnetcam.com/nphMotionJpeg?Resolution=640x420&Quality=Motion" height="480" width="640" border="2" hspace="2" vspace="2" />
Eye for Video
01-21-2009, 08:58 PM
What shows up when it goes off-line now? Is the display in a player, or just a <div> as an <img>.
You may want to check the cam software for a default message or image, then edit that. I think some cams can keep that last image. Check your software.
A second option might be the html approach, using a background image, transparency, and/or z-indexing.
So what shows when off line will be the key of how to fix this problem.
EfV
skwebpages
01-21-2009, 09:33 PM
Hi EfV
Nothing shows at all when the stream is off, (as it is now). It's not on a player but is a motion jpeg which is served from the IP camera through the Panasonic free server www.viewnetcam.com and is viewed in a div as an image every 2 seconds. The background image approach would be good if you can give me a clue how to include it.
The server only serves when the url is called and is on a viewing time limit to preserve bandwidth. When the camera is off there is nothing to serve so it is blank and that is why I would like to display a fixed image in its place.
SK
Eye for Video
01-21-2009, 09:45 PM
If there is no signal, is there a little x in a box showing that the image is missing?
Try placing a background image in the <div id="web_cam">. This is the CSS.
#web_cam {
background-image:url(images/off_line.jpg);
background-repeat:no-repeat;
border:none;
padding: 0px;
margin-left: auto;
margin-right: auto;
}
Make up an image that exactly fits the <div>, adjust this code as needed.
EfV
skwebpages
01-22-2009, 02:32 AM
Thanks EfV, success. It now lets viewers know that it is not just another 'bad' page.
http://www.inveraraypier.com/camera1.html