Posts Tagged ‘ how to’

How to use an IP camera to create a Time Lapse Video for a Web Page

Written By:
Tuesday, June 17th, 2014

There are many ways to utilize IP cameras. One great way is for HD Time Lapse Videos as they provide Megapixel resolution with stunning images such as the one above. I just recently received a forum request to integrate software with our IP cameras and pull snapshots onto the software which uploads the files into an FTP server which will then be displayed onto a webpage.

Our Goal is to display an image as well as a video such as this one here.

Lets start with the Hardware and software we will be needing for this task.

  1. IP camera 
  2. PC on the same network as the Camera.
  3. IPTIMELAPSE by [optional]
  4. Router [Connected to the Internet]
  5. Webpage ;)

Identifying your Network camera’s IP address:

If you forgot the IP address it can be a little confusing. Normally our cameras are set to but in occasions where you may have multiple cameras or simply have a different IP scheme such as you will end up having to search and see what your cameras are set to. You can use this software here which will scan your network for any cameras running that are Onvif. It is simple to use. Just launch the application after installing the software and it will display all of your cameras in the network. Of course this will not work if you have an NVR with a Built in PoE switch as the built-in switch will keep the cameras attached to it separate from your local network. After identifying the cameras IP address we can move on to the Software that we will be utilized to create the images and upload them to the FTP server.

Software vs. FTP upload from IP camera [Differences]

The software that I am utilizing is IPTIMELAPSE by It is a paid software but there is a trial you can utilize to test the software. The software itself is great if you want to create time-lapse videos or upload still images onto a webpage as it does this by uploading the files using a File Transfer Protocol “FTP” and keeps the file names correct so that it may be correctly coded into the webpage. Now if we utilize the File Transfer Protocol on the Network Camera it will create a file with different file names and folders and this is not best when creating your code for your webpage. This is why we will be using the software that does most of the hard work.

Lets start configuring and learning how to setup the software. 


In the image above we are in the “View” tab. Insert the following address is my cameras IP address make sure to add the correct address.

We are using the Onvif port which is 9989 and we are calling to view the Snapshot feature of the camera by navigating to the Snapshot service.

Since we are using the Onvif port of this camera we are not required to input the cameras credentials. So, we leave the check box for “Use Login” unchecked. IP camera is checked and “Generic” is utilized. Once you have done this make sure the Display on check box is on and click on the “Take Picture” this will display an image. Once we have confirmed that the connection is established click on “Save Settings”.

Screenshot (94)


 In this Image you can see the Schedule and FTP settings In the General Options you can select the Image quality. In my case I have it pointed to a local folder in my PC.

You can set here the FTP settings as well as the capture rate, make sure the Credentials are correct for your FTP server.

Screenshot (95)

Here is where you will name the file you will be using on your HTML code and JavaScript. I left mine set to default as you can see in the image.

Screenshot (96)

Here you can select the settings for your Time lapse video if you wish to upload one . You can select to push a video at a certain time and from a certain day or in general.

The video shown here was taken from an IPOD-EL1MPIR50 camera set to take snapshots at 5 second intervals. It was not the best position but it makes a good example of what can be achieved with the software.

Once you have set the software to upload the images and take the snapshots to whatever you want, in my case I chose 5 seconds and the video above was encoded to 30FPS [Frames per second]. This is why the video looks fast. A better setting would have been 30 second snapshot with 30 fps  I did not have a lot of time so I chose a quicker method.

In this video you can see how the software uploads the files and keeps 2 files with the same name. One is named snapshot0 and the other one is titled thumb0, these are both JPG image files. In the code we will be focusing on thumb0 since this is the current and most up to date image and snapshot is the file the was once the current file.

Lets break this down so anyone can understand what is going on here. JavaScript is browser side handled so the browser runs the script .
The Script starts by identifying that the following code is JavaScript.

<script type = “text/javascript”>

There is a function called “refresh” this is what will be called in the html code to run the script.

function refresh() {

The next Variable states the interval time  for now  the “5″ stands for 5 seconds this can be changes to suit your needs.

var refreshTime = 5*1000; //5000ms

The next Variable states what image or element the script will be focusing on in my case it is default which is thumb0.jpg.

var thisImage = “thumb0.jpg”;

The next variable adds a time stamp to the file so that it can identify the image and ignore the file if the file has not been changed it will not execute the ‘Refresh” function.

var today = new Date();

The next line of code is part of the verifying if the file has changed at all.


The next line of code sets a time out which waits to run the script once more , this will continue over and over until the user viewing the webpage either navigates to another page or closes their browser.

t=setTimeout(‘refresh()’, refreshTime);

After the script there is HTML code that is for the title as well as for displaying the image which is thumb0.jpg as well as calling the script to start in the body of the html code. Now I have added a link to where you can view the time-lapse video this will only work if you set the software to create a time-lapse video and push it out to the FTP server i have comment this out so it will not work , you can remove the comment tags <!–…–> to turn it on also make sure to use the correct file type when adding the video link i have mine set to .mp4 you can select either .flv and .wmv. Once you have completed coding this into your webpage  you should be done.


How to Setup a License Plate Capture Camera

Written By:
Thursday, February 13th, 2014
TP-LP700 License Plate Capture Camera

I often get asked how to best capture a license plate from a vehicle with a camera system. I generally tell the customer that it is done with magical leprechauns, the tooth fairy, and a dash of pixie dust! Then when I get serious I will go into the long explanation of the proper setup to capture the image. With license plate capture there are several things that need to be considered and in place to be able to capture a license plate on a vehicle. You need to be between a certain height and angle, need to be focused on a concentrated area, need speed control of the vehicles, and need the proper camera.

The Right Height and Angle

With any camera, the right angle and height are very important when trying to achieve specific shots. A license plate capture camera is no different, and actually it is more important than most. There are several schools of thought as to what is the idea height and angles for this application. The one that I have found works the best, is to ensure the camera is between thirty six inches from the driveway up to ten feet. The height of the camera plays a big role in how clear the image will be, if the camera is too high and the vehicle has some sort of plate cover on it, you can get an image that is too distorted to make out.

If you think about it, most vehicle license plates are between twenty inches and forty eight inches from the driveway surface, so you don’t want to create a crazy angle to try and capture a license plate from. Another important thing to remember is how far off the lane of travel the camera is situated, this plays into the angle created on the capturing of the image. Typical rule of thumb is to have the camera as close to the lane of travel as possible. So the closer to the curb the better!  Now, I know you are asking yourself, “what if someone comes up and vandalizes the camera?” Well, the way to help protect this is by having a camera that watches over the location of the license plate capture camera.

Focused Area of View

Another big factor in license plate capture, is not trying to do everything with one camera. In order to properly capture a license plate, the camera needs to be focused on one lane of travel. So, if you are trying to capture multiple lanes of travel you will need as many cameras as lanes you are trying to capture. A good rule of thumb is to have a camera per lane and a camera that gives overviews of the area. The overview camera will give you the description of the vehicle, while the license plate capture camera will get the license plates. If you try to do too much with one camera you will fail at doing anything useful except get a description of the vehicle. It may cost you a little more upon initial setup for the extra camera, but what you will gain with useful information is priceless!

Speed Control

A very important factor to be considered is the speed the vehicle will be going. If you have a vehicle that is traveling at a high rate of speed and you expect to capture it’s license plate you better plan to spend some very very big dollars on a camera. Now if you are realistic and have an area where a vehicle has to slow down or even better stop, you will be in tall cotton. The most ideal way to capture a license plate from a vehicle is to have an area where the vehicle will have to come to a complete stop. Whether that is at a stop sign, a severe speed bump, or a gate that has to open does not matter, as long as you can get a vehicle to stop. The next best solution is where a vehicle has to slow down extremely, ideally under ten mile per hour or so. Now if you do not have the ability to slow the vehicles down, you are going to have to look into the cameras that most interstate systems use which generally cost in the thousands of dollars per camera.

Proper Camera

Barring needing a specialty high speed camera that interstate systems use, you can generally find a good camera with a reputable company. The right camera will depend on several things. The first and foremost is the distance from camera to target. Why this is so important is because you need the right lens to narrow down on your target. If you are at thirty feet and trying to use a 2.8mm – 12mm varifocal camera and narrow the shot down to a eight foot by eight foot area, you will fail. This is because at a thirty foot distance to target and the camera zoomed all the way to it’s 12mm setting, your area of view is going to be over ten foot by eight foot. This generally will be too wide of a shot to capture a clean enough image. I personally would suggest going with a 9mm – 22mm lens for anything over twenty feet to about forty five feet. For any shot that is from about fifteen feet to about one hundred and twenty five feet you should use a camera with a 6mm – 60mm lens. If you are unsure of the millimeter lens that you will need, you can always use the lens calculator on Security Camera King’s website.

If your project meets all of these requirements, your license plate capture should occur with minimal issues. With every job and every location there are different obstacles that will be needed to be overcome, no two jobs will ever be identical especially when it comes to license plate capture. The best thing you can do for yourself is to survey the area, taking lots of pictures and measurements. Find any possible available power source and possible areas to burry conduit to get to the camera location. Keep in mind to always obey local codes and pull the necessary permits. The last thing you want to have happen is an inspector/ code enforcement officer to flag the site and cost you time and money.


How to Troubleshoot Analog Security Cameras

Written By:
Friday, December 6th, 2013

Frustrated Man

Help my camera is dead and I don’t know what to do!!!! Relax the Camera is not going to cause a cascading failure and blow up the whole system or burn the house down. You will need a multi meter to verify voltages and amps.  Depending on where your cameras are located is how you may want to proceed. If the cameras are easy to get to the first thing I would do is break out a ladder if needed and get up to the camera.

If your camera has IR or infrared cup your hand around the camera to trick the sensor so it thinks it is night then see if the IRs do come on.  If they do good, I know the camera is getting power. I would still test power output regardless if IRs comes on.  The infrared does not need much to power up so there could still be an issue.  If this camera is a DC then you should get at or above 12 volts DC. Should the camera be AC the reading should be at or above 24 volts AC.  11.7 volts is close but not enough 23.9 volts is close but not enough. The voltage must be at or above the required amount. It has been my experience that “almost” in voltage needed is not enough. Almost only counts in horse shoes and hand grenades.  The camera may give you a video feed during day but as soon as the Infra-Red led come on the camera will act very strange, or the camera will act strange to begin with.

Now at this point let us say you have less than required or no power at the camera.  You now need to go to your power supply to test it also taking the camera down at this point is advisable. Check the connections on the coax cable. Twist on BNC connectors is convenient but they do get loose if they move or shake for whatever reason they will make the camera have grainy or lines or a waviness to the image produced. BNC Twists are an unreliable connection. I like them for bench testing since they are so convenient. For installation I avoid them if I can. In the early days of computing there was a phenomena called chip creep. Ram chips would get hot and cold and slowly work themselves out of the slot on mother board. It is logical that the same would happen with the twists over time.

Crimp on BNC connectors and compression fittings are the best. Some people will swear by crimp on BNC other people will swear by compression BNC. In either case they typically do not become loose preventing video loss or poor images. For both types of connectors you need the specified tool to install the ends. Pliers will not get the job done they will only create a problem.

Now that we have the camera in question down it is time to go back to the power supply and do some testing. Check output on the channel of the power supply is do you get 12vdc or 24vac. If we get the full output needed at power supply connect camera directly to power supply and DVR. Does the issue go away in day and night mode? If it does then you now know something is going on the cable.  If not we know for sure the camera is not operating correctly. This could be from any number of reasons. To prevent the cameras from going bad a surge protector is always recommended. If you can get a battery backup and conditioner, the conditioner cleans up feedback or interference on the power side that can cause cameras to act very strange.

For cable issues there several ways to go about determining what to do next. First is how long of a cable run do you have? Coax cables have limitations on distance. The common cable RG59 which most people use for CCTV has the highest attenuation or signal loss. It is never recommended to use RG59 above a distance of 1000 feet. Some people do not recommend to use RG59 over 750 feet. Having a cable that has an impedance of 75 ohms is crucial. If the impedance is outside of that you will get more signal loss.  If you are using RG6 this coax cable has lower attenuation so you can get more distance before running into problems. Normally you can get up to 1500 feet. RG6 is recommended for use between 1000 – 1500 feet. As there is a price difference I would not use RG6 unless distance required it. RG11 is the thickest of the cables used. It does have the lowest attenuation of all coax cable. You can get up to 2000 feet on a home run.  With all cable bending and pulling cable can and will damage the cable. Using a lubricant helps in preventing damage from pulling. When it comes to bending any cable you cannot bend, twist, or roll up cable tighter that the radius of the cable itself. If you do, get a new piece of cable because you just damaged that cable. The cable may work but the longer the run the more likely you will have a bad video feed. Once you bend the cable that far you put a kink in the wire and add to the resistance. Another issue I have seen is failure to ensure there are no jagged edges for the cable to get caught on or sliced into. For example running cable in an attic there are old rusty nails and screws everywhere. If a screw gets in contact with cable you can inadvertently add an extra ground the “POOF” no more video or you get static if you’re lucky. Sometimes it just is not possible to measure resistance on a cable run end to end that is why I say take the camera down so we can isolate the issue.

With the steps I have outlined you should be able to troubleshoot your system when issues arise. I can tell you that most issues in CCTV arise from to long of cable runs with the wrong cable type. Power is especially problematic as the thinner the wire the higher the voltage drop at distance.