Page 2 of 2

Posted: Mon Mar 01, 2010 7:43 am
by beerygaz
My events structure doesn't look like yours suggests.

I have ./events/<monitorID>/<5> like this:

/var/lib/zoneminder/events/19/89799

ls -la in Monitor ID 19 folder reveals:

Code: Select all

drwxr-xr-x    2 apache apache 12288 2010-02-28 10:23 89786
drwxr-xr-x    2 apache apache 20480 2010-02-28 11:02 89789
drwxr-xr-x    2 apache apache 12288 2010-02-28 11:55 89790
drwxr-xr-x    2 apache apache 12288 2010-02-28 12:59 89793
drwxr-xr-x    2 apache apache 12288 2010-02-28 13:02 89795
drwxr-xr-x    2 apache apache  4096 2010-02-28 17:54 89797
drwxr-xr-x    2 apache apache 20480 2010-03-01 06:11 89799
Any idea why my events folders are these numbers and not named by date?

Version: ZM 1.24.1

Posted: Mon Mar 01, 2010 12:17 pm
by Flav
beerygaz wrote:My events structure doesn't look like yours suggests.

I have ./events/<monitorID>/<5> like this:

/var/lib/zoneminder/events/19/89799

ls -la in Monitor ID 19 folder reveals:

Code: Select all

drwxr-xr-x    2 apache apache 12288 2010-02-28 10:23 89786
drwxr-xr-x    2 apache apache 20480 2010-02-28 11:02 89789
drwxr-xr-x    2 apache apache 12288 2010-02-28 11:55 89790
drwxr-xr-x    2 apache apache 12288 2010-02-28 12:59 89793
drwxr-xr-x    2 apache apache 12288 2010-02-28 13:02 89795
drwxr-xr-x    2 apache apache  4096 2010-02-28 17:54 89797
drwxr-xr-x    2 apache apache 20480 2010-03-01 06:11 89799
Any idea why my events folders are these numbers and not named by date?

Version: ZM 1.24.1
This is the good structure the script find the events Creat at this Date

Posted: Mon Mar 01, 2010 5:44 pm
by whatboy
You're not using Options -> Paths -> USE_DEEP_STORAGE on to store events...

Posted: Tue Mar 02, 2010 10:17 am
by beerygaz
Flav / whatboy - seem to be conflicting answers. Do I keep the existing structure and look for some other problem? Or do I need to enable USE_DEEP_STORAGE?

Posted: Tue Mar 02, 2010 12:18 pm
by Flav
i'm not use : USE_DEEP_STORAGE and it's work.

Posted: Tue Mar 02, 2010 8:47 pm
by coke
Deep storage also increases the speed of deletes, eliminates possible file limit problems down the road, and probably a few other things that are handy.

Posted: Tue Mar 02, 2010 10:06 pm
by whatboy
I only have a problem, I created a script with my solution, to added to the crontab... script (zmmkmov) looks like...

Code: Select all

#!/bin/sh
rm /home/user/bin/list.txt
ls -Ca --format=single-column /events/1/$(TZ=EST24EDT date +%y/%m/%d)/.*/*capture.jpg > /home/user/bin/list.txt
/usr/bin/mencoder "mf://@list.txt" -mf fps=5 -o /home/user/bin/mon1-$(TZ=EST26EDT date +%F).avi -ovc lavc -lavcopts vcodec=mpeg4
sudo mv /home/user/bin/mon1-$(TZ=EST26EDT date +%F).avi /stuffs/video
and on crontab I set to ran at 00:10 each day, but emncoder exit with error, I don't have the e-mail that shows the error, but I'll post it here later, and I can't use SUDO on a crontab??? gives me an error too

Code: Select all

SHELL=/bin/sh
HOME=/home/user
PATH=/usr/bin:/bin:/home/user/bin
LOGNAME=user
USER=user
10 00 * * * umask 002; /home/user/bin/zmmkmov

Maybe is the "mf://@list.txt" I'll try with "mf://@/home/user/bin/list.txt" and see if mencoder doesnt fail, but sudo??? why can I use sudo on a crontab??? it says I can only use sudo on a tty console...


But if I ran it manual from console, nor mencoder, nor sudo (ofcourse) gives me errors!!!

Posted: Mon Apr 19, 2010 6:49 pm
by kongobongo
Hi,

I've created the script from the first post and customised it with the correct options, when I run it I get the following output....

Found ZM Events Directory: /var/www/zm/events/ -> OK!
Found Video Output Directory: /var/www -> OK!
Found Monitor: 10 -> OK!
Found requested day: 2010-04-19 -> OK!
Found FFmpeg binary: /usr/local/bin/ffmpeg -> OK!
Processing wanted events......23431 events found
Building video: /var/www/2010-04-19--Monitor-10.avi -> FINISHED!
Removing temporary files, bye!

The amount of events is incorrect, I only have a total of 1375 events combined for both cameras. The output video file is only 1mb in size.

Any suggestions as to where I am going wrong?

Posted: Wed Apr 28, 2010 8:09 pm
by brunitho
I'm having problems with the line 73 states:

argument list too long

has some way to improve this line or reduce the amount of arguments?

Posted: Wed Apr 28, 2010 8:20 pm
by kongobongo
Yep, i'm getting that argument error as well now.....

The script looks like a good starting point, just needs looking at. I've tried to get in touch with Trendkill via email and msn but with no joy :(

crontab

Posted: Wed Apr 28, 2010 8:30 pm
by johnnytolengo
whatboy be careful with the crontab expressions, try with this:

as a root

10 0 * * * root /home/user/bin/zmmkmov

OR

as apache
10 0 * * * www-data /home/user/bin/zmmkmov

good luck.

Tolengo.

Posted: Wed Apr 28, 2010 8:31 pm
by brunitho
what a pity

my zoneminder is not willing to export the videos is still saying, exporting and not displayed the files to download.

look
http://www.zoneminder.com/forums/viewto ... highlight=

and my HD is getting full.

Posted: Sat May 01, 2010 7:34 am
by kongobongo
I am speaking to TrendKill, the original author about the problems so I will post an update as soon as I have one

Posted: Mon May 24, 2010 8:31 am
by lifeisboost
Hello everyone.

I am trying to use this script but it never finds my events. i manually tried running the command



Code: Select all

[root@localhost zm]# ls -Al /var/www/html/zm/events/1/ --time-style=long-iso |grep -l 2010-05-01

to try and find the events but this is the response it returns. im not sure where to go as i have not found any answers in looking through the net on the response.

Code: Select all

(standard input)