Networked Digital Video

Resource Image

On the surface, recording and replaying video seems such a simple task, and if that’s all you want to do then it is a simple task. However, rarely in the CCTV world is this sufficient.

There was once a salesman who would persistently ask his engineering team why they had not produced an enterprise-grade recording solution for their IP video platform; "After all", he suggested, "isn't it just writing and reading the hard drive?"

We have frequently been asked the same question, although often in different guises. On the surface, recording and replaying video seems such a simple task, and if that's all you want to do then it is a simple task.

However, rarely in the CCTV world is this sufficient. You will most likely want to simultaneously view the stream as it is recorded, tag it with relevant information as events occur, and vary the length and storage requirements as it progresses.

Later on, during playback you'll want instant access to the recording at random points, be able to inspect it frame by frame, fast forward through event-sparse sections and stream it to remote clients.

Once you've identified a significant section then you'll want to export the relevant data, capture still images, create media files for viewing in standard video players, allow the export's origins to be authenticated, encrypt the data... the list of requirements goes on; and it often all needs to be done while still recording!

Data is data is data
On a technical level all of this means that the data can't just be written to the hard drive and retrieved later on. Regardless of the type of video compression used each frame needs to be indexed and its position and timestamp stored to allow random access and smooth playback. There needs to be a database element to allow metadata such as alarm information to be stored alongside the video but at the same time allowing for fast searching and querying later.

If the recording is to be continuous, then, in the absence of infinite storage capacity, we need to segment the data as it is written. This allows older video to be overwritten with newer data. However, for motion codecs such as MPEG4 or H.261, this requires restart information to ensure that we can play back from the beginning of each segment. There also needs to be a facility to limit the maximum length or duration of any one segment for easier file management later on.

Fit for purpose
Usability dictates that playback should be on demand and perceptually instant. This is directly affected by the video indexing method used. In-memory indexing makes recording efficient but then makes it difficult to begin playback before a recording has ended. It also requires proportionally large amounts of memory and can result in disastrous data-loss under system failure.

A better method is to write index information to a file, separate from the video data, with a windowing mechanism to allow sections of the index to be loaded into memory. This is a good halfway-house between efficient recording and providing instant random access with minimal system requirements.

Exporting also has its technical issues. The stored data needs to be flexible enough to allow data from the beginning and end to be removed while still providing clean seamless playback. The static metadata from the recording including original start time, length, source, format, etc needs to be retained along with the addition of new metadata detailing the clip information.

There may also be a requirement to add metadata during playback identifying user access and user action history for evidential purposes. Also for this reason the exported clip needs to have a signature and a degree of traceability to authenticate its source and integrity. Although the validity of digital video footage has so far not been questioned in court, the data storage and access methods need to account for this inevitable occurrence.
Unfortunately no single standards based file format exists with all these features, whether from the CCTV industry or from the entertainment and media streaming world. Mostly the standard formats favour recording, playback or editing but not all three and certainly not with the real-time requirements built in.

Not when but where
Another interesting dimension to the issue is that of distributed storage. Many IP Video units allow for onboard recording and Digital Video Recorders (DVRs) are becoming ever more popular in the analogue-replacement sector. While great for servicing sites with intermittent or poor connectivity, these products don't really fit in with the concept of a single Networked Video Recorder product.

The Codestuff Networked Media Recording SDK has been designed with these unique CCTV requirements in mind and provides a platform with low latency recording, exceptional random access playback and flexible export features, for an ever growing range of supported IP Video hardware. It offers built-in support for retrieving archived data from IP video devices and DVRs.