MPEG-2 Video Surveillance & Comskip

Where all the user feedback and suggestions for improvements go
Post Reply
PVR4ME
Posts: 1
Joined: Mon May 14, 2007 12:32 am

MPEG-2 Video Surveillance & Comskip

Post by PVR4ME »

Erik,
Thank you for all your hard work and dedication to comskip. It is an excellent piece of software for commercial detection. I was wondering if you could provide some insight on the practicality of how some of the code and logic in comskip could be used in a security camera system. I know this is kind of a stretch for it's intended use but I ask you bear with me on this.

You'll see a lot of video surveillance software out there for the various kinds of cameras available - IP, webcam, cctv, etc. Once you are able to digitize the video and get it into the format the surveillance software supports, a person is in good shape. Unfortunately, this means being limited for the most part to *NOT* using MPEG-2 encoder capture cards (specifically like those sold by Hauppuage) as the surveillance software does not interface well with the capture cards/MPEG-2 output stream. In fact, I was unable to find any video surveillance software that will even attempt to handle MPEG-2 output (I find it hard to believe there isn't any).
One neat aspect of most surveillance software is that fact they have a motion detection feature that sifts through the real time video output and will do various things depending on a user configuration (email notification, ftp uploads of pictures of events causing motion, video clip isolation of motion events, etc.)
While trying to figure out how one could detect motion automatically on a MPEG-2 file, I ran a couple of test MPEG-2 videos (from a CCTV camera going into the composite jacks of a WinTV-USB2 encoder) through comskip and analyzed the output of the csv file generated. To my surprise, it looks as if one could detect motion just by monitoring the "uniform" value. It looks as if this value tends to go higher as the average frame darkness increases (but this may only be coincidental). As objects come and go in the video window of a camera, the average "uniformness" will increase or decrease depending on the coloration and size of the object moving into view. As objects come and go, there is a distinct shift in the "uniform" value comskip generates and this makes it easy to detect motion.
My question to you is does this approach seem sensible for what I am trying to do? Would you look at monitoring some other aspect of the file rather than the "uniform" value to do this? Of course, I would have to make some modifications to the code to make this effective. For now it appears as if detecting commercials is far harder than detecting motion, so the program would mostly be stripped down from what it is now. I think once the motion detection was optimized, it would be easy to mark out segments of the recorded MPEG file containing motion for further processing. Please let me know your thoughts on this. Thanks!
erik
Site Admin
Posts: 3369
Joined: Sun Aug 21, 2005 3:49 pm

Post by erik »

It may be much better to write an actual motion detector. Should not be too difficult.
The current Comskip is not designed to be running 24/7
Post Reply