attaching video to email

Support and queries relating to all previous versions of ZoneMinder
Post Reply
jimsey
Posts: 7
Joined: Wed Sep 17, 2008 12:18 pm

attaching video to email

Post by jimsey » Wed Sep 17, 2008 12:28 pm

Hi all. I've recently got a zoneminder 1.23.3 installation up and running on a ubuntu 8.04 intel atom machine, using the new package and it is working 99.9% correctly, so thanks to everyone for that!

There is just one issue that I need to get fixed before I can rest contented, and it is to do with attaching video to emails.

If I send an email with %EI1%, to attach the first image, everything works fine, I get the attachment in the email. Here is my zmfilter.log...

Code: Select all

09/16/08 19:40:26.301834 zmfilter[9054].INF [Creating notification email]
09/16/08 19:40:26.304988 zmfilter[9054].INF [Sending notification email 'ZoneMinder: Alarm - path-328 (6 - 5 13)']
09/16/08 19:40:26.350486 zmfilter[9054].INF [Attaching '/usr/share/zoneminder/events/5/08/09/16/19/34/00/011-capture.jpg]
09/16/08 19:40:29.775646 zmfilter[9054].INF [Notification email sent]
If I try to send an email with %EV% to attach the video file it fails. Here is the zmfilter.log...

Code: Select all

09/16/08 19:34:22.141114 zmfilter[8909].INF [Creating notification email]
09/16/08 19:34:23.563717 zmfilter[8909].INF [Sending notification email 'ZoneMinder: Alarm - path-328 (6 - 5 13)']
09/16/08 19:34:23.609671 zmfilter[8909].INF [Attaching '5/328/Event-328-r1-s1.mpg]
Note the differences in the 'attaching' comment vs the working image attachment. My ffmpeg video generation is working fine, and I can see an mpg video in the event directory is created.

It looks to me like the zmfilter.pl script is not using the correct path to attach the video file? Before I dive in and start hacking it, what do we think, is this a bug? I have 'deep file structure' turned on - perhaps that is the problem...?

jimsey
Posts: 7
Joined: Wed Sep 17, 2008 12:18 pm

Post by jimsey » Fri Sep 19, 2008 6:13 pm

Great though ZoneMinder is, I had a feeling I would end up doing some programming when I installed it, and sure enough I have :wink:

I turned off 'deep file system' and it still could not attach the video - same problem with the path. What I did was to edit a line of code in the zmfiler.pl file...

Code: Select all

return( $format, sprintf( "%d/%d/%s", $event->{MonitorId}, $event->{Id}, $output ) );
...I changed to...

Code: Select all

return( $format, sprintf( "%s/%s", getEventPath( $event ), $output ) );
...and now to %EV% tag works fine. Since I used the 'getEventPath' it probably works for the deep file system too, but as I am going to leave my system on the old way for now, I can't say for sure.

I'm all done now, thanks again for this software!

Next up is my battle with smtp.googlemail.com to prevent the zoneminder emails being considered spam and the account being locked. :roll:

il_ferra
Posts: 5
Joined: Sun Oct 05, 2008 2:33 pm

Post by il_ferra » Mon Oct 06, 2008 12:02 pm

Hi!
what atom cpu are you using? What camera are you capturing from (IP or analog)
I'd like to build a zm system over an Atom330 based hardware but i need to acquire from 4 analog camera?
What do you think about it?
thanks

User avatar
zoneminder
Site Admin
Posts: 5220
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder » Tue Oct 07, 2008 9:43 am

jimsey wrote:Great though ZoneMinder is, I had a feeling I would end up doing some programming when I installed it, and sure enough I have :wink:

I turned off 'deep file system' and it still could not attach the video - same problem with the path. What I did was to edit a line of code in the zmfiler.pl file...

Code: Select all

return( $format, sprintf( "%d/%d/%s", $event->{MonitorId}, $event->{Id}, $output ) );
...I changed to...

Code: Select all

return( $format, sprintf( "%s/%s", getEventPath( $event ), $output ) );
...and now to %EV% tag works fine. Since I used the 'getEventPath' it probably works for the deep file system too, but as I am going to leave my system on the old way for now, I can't say for sure.

I'm all done now, thanks again for this software!

Next up is my battle with smtp.googlemail.com to prevent the zoneminder emails being considered spam and the account being locked. :roll:
Missed this the first time round. Thanks for spotting. I have now applied the fix into the trees.
Phil

jimsey
Posts: 7
Joined: Wed Sep 17, 2008 12:18 pm

Post by jimsey » Tue Oct 07, 2008 11:33 am

No problem - happy to help..!

To answer il_ferra query...

I'm using a Gigabyte GA-GC230D motherboard, which has an integrated Atom CPU, solid caps and is overclockable. I think www.mini-itx.com just posted a 'shootout' of Atom motherboards, worth a read. Ubuntu 8.04.1 installed perfectly on this board, with no problems at all. I think there is a dual-core Atom available soon, which I would go for.

My capture card is a cheap 4-port Conexant 'fusion' BT878A based DVR card from eBay. There appear to be two versions on sale. I have a smaller looking non-square brown card with solid caps and 'phono' ports. Works fine with card type 77. I am running two 420 TVL analogue cameras at 384x288 at 4 to 5fps and the Atom cpu copes easily with this, using 'blob' motion detection. I am sure you could get four cameras running at 1 or 2fps, and I think there are other posts on this forum that talk about it.

Good luck if you go for it, and I'll try to help if I can!

daspug
Posts: 3
Joined: Tue May 05, 2009 10:09 am

Post by daspug » Tue May 05, 2009 11:06 am

Just noticed this in 1.24....

Using %EV% doesn't work with NEW_MAIL_MODULES option in Options/Email enabled.

That was the cause of my problems as I'd enabled it to originally get images sent through whilst I was figuring out how to get videos instead
:P :D

Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests