Storing sensor data with video with Linux
April 7, 2006 9:35 AM   Subscribe

I'm looking for reccomendations for Linux PVR software for a security camera application. I want to be able to store a lot (limited only by hard disk space) of high resolution video from a 3 chip DV camera (which will go through a TV tuner card). So far this is rather standard, but I have the (unusual?) requirement of needing to be able to store a lot of metadata from sensors with the video. (more inside!)

So for instance, I'd like to be able to jog through video and see what various sensors were reading at any given moment in the video stream. Some of the PVR systems I've seen use a MySQL database to store video (how exactly does that work, incedentally?) and I was thinking I could perhaps just insert my metadata into the database it used to store data. I, of course, don't know which, if any, of these systems would use a database structure conducive to this sort of thing.

The sensor data would not need to be polled at a particularly high frequency... maybe once every few seconds.
posted by phrontist to Technology (3 answers total)
 
It seems to me, and I'm by no means an expert, that you'd be better off writing an app that displays the info you want, and just capturing the video data from that app. For instance, write an app that shows the live camera feed and the current reading from your sensors. Then, record the video output of that app. That way, you don't have to store the data from the sensors and try to sync it with the video, since the data and your video are both embedded in the output.
posted by cosmicbandito at 11:52 AM on April 7, 2006


Response by poster: cosmicbandito: There are, indeed, ways to do this. The problem is I want to be able to search through the video using the metadata...

"Show me video from when sensor A read above 45..."
posted by phrontist at 2:16 PM on April 7, 2006


I don't think such an app exists right now, but you might be able to hack something together.

GSpy - Records images only when it detects motion. Timestamps the images and makes movies from them.

Now, if you record your sensor data to a flat file (or files) in a form like:

time_in_seconds sensordata
(e.g. "1144447270 45"),
then you could perl through the file for lines ending in numbers larger than 45, get the timestamps, and use the perl "Time::Period" module to determine which images (or video sequences) were shot during those time periods..
posted by Laen at 3:04 PM on April 7, 2006


« Older How can I force my current hosting company to let...   |   Money, it's a game Newer »
This thread is closed to new comments.