ZoneMnder for animal behaviour experiments

Support and queries relating to all previous versions of ZoneMinder
Locked
vrios
Posts: 2
Joined: Thu Mar 15, 2007 4:43 pm

ZoneMnder for animal behaviour experiments

Post by vrios »

First of all, I apologize if these questions have been answered before, I searched but couldn´t find anything like it

I work at an animal behavior research lab, and we use a dvr system to record our experiments, but we've been having problems with our recording program (namely, it uses a proprietary format and converting the data to mpeg takes ages, and uses an insane amout of space). I read on the web that Zoneminder records directly in .avi, I believe that it could be the solution, but I need to kow the following:

How does Zoneminder organize its recorded files? Does it record into a single .avi, or several small .avi's of a given size?

Do I have to export the videos into a separate file to view them on a pc without ZM?

Can i customize the name of the output files (e.g. date-starthour-endhour-cameranumber.avi)?

Can I set ZM to record on a removable HD to view the files on another PC ? (we want to have at least 2 removable HDs so that we can analyze the videos while we are recording another experiment, and streaming the video would be a resource hog)

Thanks in advance
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Re: ZoneMnder for animal behaviour experiments

Post by cordel »

vrios wrote:First of all, I apologize if these questions have been answered before, I searched but couldn´t find anything like it

I work at an animal behavior research lab, and we use a dvr system to record our experiments, but we've been having problems with our recording program (namely, it uses a proprietary format and converting the data to mpeg takes ages, and uses an insane amout of space). I read on the web that Zoneminder records directly in .avi, I believe that it could be the solution, but I need to kow the following:
No it does not record to avi, it saves everything as jpeg images, they can then be exported from the system to almost any format you like.
vrios wrote: Do I have to export the videos into a separate file to view them on a pc without ZM?
yes, unless you want the still images.
vrios wrote: Can i customize the name of the output files (e.g. date-starthour-endhour-cameranumber.avi)?
you can rename after you export to any thing you wish.
vrios wrote: Can I set ZM to record on a removable HD to view the files on another PC ? (we want to have at least 2 removable HDs so that we can analyze the videos while we are recording another experiment, and streaming the video would be a resource hog)
Well sort of, you would end up with still images. Events you exported would also have the file you created for the export but would have to be done before you removed the drive. Also you would need to find a way to have the databases event data stay with the drive and I'm not sure that this could be done.
vrios
Posts: 2
Joined: Thu Mar 15, 2007 4:43 pm

Re: ZoneMnder for animal behaviour experiments

Post by vrios »

No it does not record to avi, it saves everything as jpeg images, they can then be exported from the system to almost any format you like.
Well sort of, you would end up with still images. Events you exported would also have the file you created for the export but would have to be done before you removed the drive. Also you would need to find a way to have the databases event data stay with the drive and I'm not sure that this could be done.
hmm, that might be enough, if ZM saves the stills with understandable sequential filenames (please tell me it does :) ), I guess I can convert them to avi on another pc even without the databases. my reasoning for using the removable HDs is to avoid overloading the processor and dropping frames, even with powerful processors, I think capturing eight 30fps video streams and converting another eight at the same time would be too much.
Kirk22
Posts: 7
Joined: Mon Dec 06, 2004 6:58 pm

Re: ZoneMnder for animal behaviour experiments

Post by Kirk22 »

vrios wrote:
...my reasoning for using the removable HDs is to avoid overloading the processor and dropping frames, even with powerful processors, I think capturing eight 30fps video streams and converting another eight at the same time would be too much.
Don't forget that the ZM box could be on a network which can xfer the files to a client for processing.
User avatar
tgutwin
Posts: 24
Joined: Thu Jan 12, 2006 4:02 am
Location: North Vancouver, Canada

Re: ZoneMnder for animal behaviour experiments

Post by tgutwin »

ZM frontend is web based so you can view all parts of it on any computer anywhere you want. There is even a user-contributed windows frontend http://www.zoneminder.com/forums/viewtopic.php?t=5105

YES... ZM saves the files with nice sequential filenames.

I think ZM has everything (and more) of what you need :D ... It will answer all your Qs.

- each monitor (camera) gets its own sub dir
- each recorded event gets its own unique event numbered sub-dir
- you can set the frames per second that gets recorded - for example if you have it set to 20 fps ... if an event gets triggered by motion you will get 20 jpeg files per second
- here is a sample cut/paste from one of my event dirs.
[root@dvr 4109]# pwd
/var/media/security/zoneMinderWWW/events/1/4109
[root@dvr 4109]# ls
0001-capture.jpg 0002-capture.jpg 0003-capture.jpg 0004-capture.jpg 0005-capture.jpg 0006-capture.jpg ......

As far as exporting these files into a video file. ZM has an export button that will do it for you, or you can use a script file to do it outside of ZM.
for example I use ffmpeg to turn the evnet jpegs into an avi or mp4

Code: Select all

#!/bin/bash
EVENT_DIR=/var/www/html/zm/events
EVENT_SUBDIR=$1/$2
EVENT_ID=$2
cd $EVENT_DIR/$EVENT_SUBDIR
ffmpeg -y -r 10.84 -y -i $EVENT_DIR/$EVENT_SUBDIR/%04d-capture.jpg -s  320x240 -target ntsc-dvd Event-$EVENT_ID-r1-s1.avi > ffmpeg.log
mv $EVENT_DIR/$EVENT_SUBDIR/Event-$EVENT_ID-r1-s1.avi /var/media/video/video/ZoneMinder/zmArchives/
tom
------------------------------------------------------------
Don't Let Software Push You Around... Push Back
------------------------------------------------------------
Locked