Easy CCTV Solution using IP Cameras

For a while I have been looking for simple CCTV solution, where video is captured on a long loop, so when the storage is full the earliest dated footage is deleted to make way for new. And of course, footage is available for immediate review.

Many newer IP cameras, including my Trendnet TV-IP572W comes equipped with a microSD slot for recording on a rotating basis. However, this has two main caveats, firstly the investment in a microSD card to be used solely for this purpose and of a high enough capacity to record enough footage, especially with the introduction of HD capture. Secondly is accessing the footage, as it is effectively held on the IP camera it is the gateway to the data. In my experience this process is slow, with having to download each video file manually and slow transfer speeds.

Imagine wanting to view an event that could have happened over a span of a few hours, and with video captured in segments of 5 minutes at most, the whole process can become tedious very quickly.

Therefore, I came up with another solution, one that uses my server’s hard disks for video storage to save on money while allowing larger video retention than a micro SD card. Also the ability to automatically delete older files to make way for new. This method uses Samba settings of an IP camera to save video to a Windows Server, and on the server itself, employing Disk Quota management to effectively trick the camera into thinking it only has a certain amount of disk space, to allow the cyclic video retention and prevent the footage taking up a whole drive on the server.

The benefit of employing Disk Quota management is that many cameras can record to the same volume or drive without fighting over space, plus with careful space management the days’ retention per camera can be manipulated. For instance an outdoor facing camera can be allocated more data and therefore more footage to search for suspicious activity, while an indoor camera can be set to record just a day’s footage in case of break ins.

Here’s how…

The heart of this system is to assign a user account per camera; this gives the ability to manipulate data capacity for each feed.

On the server

Open up Computer Management, on newer systems this is found by right clicking the Windows icon.

ecs01

In System Tools, Local Users and Groups, right click Users and select New user.

ecs02

Enter the details in the new user field, ensuring to check User cannot change password and Password never expires. Then click Create.

ecs03

Next, on the drive of the video storage, right click and choose Properties, then choose the Quota tab.

Enable quota management by clicking the Enable quota management checkbox, and check the Deny disk space to users exceeding limit.

ecs04

Then click on Quota Entries, then the new entry button ecs09.

Time for the drawn out Windows user selection, click Advanced, on the next window click Find now, then choose the newly created cctv account, then OK and OK to bring up the Add New Quota Entry.

ecs05

Set the disk limit for this user, this is the maximum the camera will store on the drive, you can specify a warning level but most IP Camera will ignore this setting. On clicking OK the user will appear in the Quota Entries Windows, this window can then be closed.

Click OK on the drive properties window and acknowledge the warning, Disk Quota will be active.

On the Camera

Setting the camera up can vary drastically on the model, in the setup menu the recording menu needs to be found.

ecs08

In the example of the Trendnet TV-IP572W, in the setup menu, choose Action then click the Recording checkbox to open the settings dialog.

Dependant on the camera settings, look for an option to save to a remote machine/server, or in this case a Samba share.

Use the credentials added to the Quota Management, and if available choose the Cyclic / Loop option so the camera manages deletion of the oldest files.

Review

Finally it’s time to wait for the quota to fill, and then check to see if the older data is being deleted automatically. For a more in depth review open the Quota Entries window, the camera will use the maximum available so will always be triggering the warning status, but this means that the maximum amount of data is available for review.

ecs10