Below are some notes on the camera setup. Some of this is a bit technical for those that are interested. Skip to the “What do I need if I want to do this” at the end if you want quick breakdown of what you need.
There are 100 ways to get this done but this is how I ended up setting up my cameras.
I installed a Hikvison IP camera and power it over the network cable with PoE (Power Over Ethernet)
The camera is configured to take a snapshot every 60 seconds and upload it to an FTP server that I have setup.
On this FTP server is a script that runs every one minute to copy the newest image (by time and date) to a file called latest.jpg.
So each minute the latest.jpg is overwritten but the original image is kept with it’s filename which has the date and time.
There are 2 ways to view the latest.jpg image.
The first is a simple webpage on a wordpress site that has the latest.jpg image embedded in it. I did this so I could keep track of the number of vistors that were viewing the images from the camera. example of this page is https://www.nwsza.net/tunbridge-camera1/. What this is really doing us just displaying the URL https://tuncam1.nwsza.net/latest.jpg Which is the latest image. This URL could be used by anyone on any website if they chose. Anyone is more than welcome to link to the latest images but if you can let me know so that if I do change anything I can inform you if it is a breaking change.
At approximately 23h45 each day a script runs to create a time lapse video of the +- 1400 images (one each minute of the day).
The software used is ffmpeg to create this time lapse video.
The video is moved to a time-lapse directory for easy access and viewing.
The next step of the script is to create a new directory with that day’s date. all the images for that day are then moved into this directory to keep all the orignal images in the case they want to be used for something later.
DNS names are used to refer to the different directories on the same server to make it easy to link to.
Eg https://tuncam1.nwsza.net/latest.jpg and https://tuncam2.nwsza.net/latest.jpg
How much bandwidth does it use?
I have 2 cameras setup and uploading an image each minute.
the first camera has an image resolution of 1920×1080 and that creates a file size of +- 350KBs
The other image resolution is much higher at 2688×1520 and that creates a file size of +- 800KBs
During the evening these images are much smaller.
Over a 24 hour period it upload +- 1.5GB of date. That would equate to 45GB per month.
The two factors that would change the bandwith requirement are resolution and the frequency of the upload.
If you have a bandwith constraint eg it is a mobile connection you could reduce the frequency of the upload.
I currently host this on my own phyiscal server in a data centre in Durban at no cost thanks to friends at Edgeconnect.
The server doesnt have a lot of storage so I have to download the images from the server to a local hard drive every few months to make space for new images.
What do I need if I want to do this?
Have/Buy Compatible IP Camera. These can range from R1500 to R20 000.
I have a Hikvison DS-2CD2021G1-I for Camera1 and DS-2CD2T46G2-2I for Camera2
Camera linked to an internet connection. remember a camera can upload up to 1GB per day or 30 GB per month.
Some cameras are Wireless but you would still need to power them.
Configure the camera with an FTP server address with username and password.
You can send images to your own server hosting or I am happy to provide hosting at no cost. Get in touch with me and for a the server details and username and password. If you want the images to be publicly accessible like the the current cameras I have let me know and I can setup a page for that camera