%EV% email created but never sent when attaching video

Support and queries relating to all previous versions of ZoneMinder
Locked
john.a.sutherland
Posts: 15
Joined: Fri Jun 01, 2007 6:47 pm

%EV% email created but never sent when attaching video

Post by john.a.sutherland »

E-mails are being sent based on an alarm filter, then I tried to attach the mpg file, but it appears to be created but never sent. So email works when I do not attach an mpg file, then it does not work when I try to attach the mpg file.....Why? How can I fix it?

Here are the var logs:

Nov 10 10:28:27 cameras zmfilter[13288]: INF [Sending notification email 'ZoneMinder: Alarm - Cam1-179 (26 - 19 2)']
Nov 10 10:28:28 cameras zmfilter[13288]: INF [Notification email sent]
Nov 10 10:28:28 cameras zmfilter[13288]: INF [Creating notification email]
Nov 10 10:28:28 cameras zmfilter[13288]: INF [Sending notification email 'ZoneMinder: Alarm - Cam1-200 (39 - 19 62)']
Nov 10 10:28:29 cameras zmfilter[13288]: INF [Notification email sent]
Nov 10 10:28:29 cameras zmfilter[13288]: INF [Creating notification email]
etc......

then when I attach the mpeg with %EV% I get this:

Nov 10 10:24:00 cameras zmfilter[10541]: INF [Creating notification email]
Nov 10 10:24:01 cameras zmvideo[12786]: INF [Creating video file Event-83-r1-s1.mpg for event 83]
Nov 10 10:24:01 cameras zmfilter[10541]: INF [Creating notification email]
Nov 10 10:24:01 cameras zmvideo[12790]: INF [Creating video file Event-179-r1-s1.mpg for event 179]
Nov 10 10:24:01 cameras zmfilter[10541]: INF [Creating notification email]
Nov 10 10:24:01 cameras zmvideo[12792]: INF [Creating video file Event-200-r1-s1.mpg for event 200]

etc.... and no mail ever gets sent

Anyone have experience with attaching Mpeg or avi files to e-mails?

Thanks,

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

Post by cordel »

Have you checked to make sure the video file is even created and compleated?
john.a.sutherland
Posts: 15
Joined: Fri Jun 01, 2007 6:47 pm

Post by john.a.sutherland »

Cordel,

I can see the event in the Zoneminder console, and I can play it. I wonder if there is a timeout, or a way to have the email wait until the mpg file is done before trying to send? Not sure if that is the problem.

What is the best way to start troubleshooting this?

Thanks,

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

Post by cordel »

Yes, Check and make sure the video file is actually created. If it fails and the file is not created, the process for sending the email is not complete. It should create the video file in the same folder as the saved jpgs for the event. You should also have a logfile in the same location from ffmpeg and you should also check zmvideo.log.
john.a.sutherland
Posts: 15
Joined: Fri Jun 01, 2007 6:47 pm

Post by john.a.sutherland »

Ok, I have more info. There is not mpg or avi in the folder for the event. I guess when I click on the event in Zoneminder console it just plays back the jpegs, I assumed it was an mpg. I cannot find a zmvideo.log. I have ffmpeg installed, but I have not tested it.

What can I do to test ffmpeg and make sure it works with Zoneminder?

Thanks for all your help,

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

Post by zoneminder »

Have a look in zmvideo.log and see if there is a problem creating the file. You can try manually creating video by running zmvideo.pl directly.

Code: Select all

Usage: zmvideo.pl -e <event_id>,--event=<event_id> [--format <format>] [--rate=<rate>] [--scale=<scale>] [--fps=<fps>] [--size=<size>] [--overwrite]
Parameters are :-
-e<event_id>, --event=<event_id>  - What event to create the video for
-f<format>, --format=<format>     - What format to create the video in, default is mpg. For ffmpeg only.
-r<rate>, --rate=<rate>           - Relative rate , 1 = realtime, 2 = double speed , 0.5 = half speed etc
-s<scale>, --scale=<scale>        - Scale, 1 = normal, 2 = double size, 0.5 = half size etc
-F<fps>, --fps=<fps>              - Absolute frame rate, in frames per second
-S<size>, --size=<size>           - Absolute video size, WxH or other specification supported by ffmpeg
-o, --overwrite                   - Whether to overwrite an existing file, off by default.
just be careful of permissions (ie if you run it as root then a root owned file will be created in the directory which may never get deleted).
Phil
john.a.sutherland
Posts: 15
Joined: Fri Jun 01, 2007 6:47 pm

FIXED!!

Post by john.a.sutherland »

Well, I found another string on this problem, I had to change line 323 in zmvideo.pl:
occhiostanco wrote:Most likely, this error raise when the location for the log file produced along with the video (ffmpeg.log) is not writable.
This expecially if you can't fint a ffmpeg.log

Check in zmvideo.pl and change ">& ffmpeg.log" to "&> /tmp/ffmpeg.log"
and see what happens

Roberto
That fixed it for me.

Strange thing is, I have no zmvideo.log or ffmpeg.log that I can find.

So, why do we have to change the zmvideo.pl file? Can this be fixed in future releases of Zoneminder?

Thanks for everyone's help!
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

There is no normal reason why ffmpeg.log is not writeable _unless_ you are running it as an ordinary user and not apache (or equivalent) or root.
Phil
Sully
Posts: 9
Joined: Sat Feb 17, 2007 12:41 am

zmvideo.pl file?

Post by Sully »

Following your thread, I cannot find the zmvideo.pl file? Where is it located?

Thanks,
Sully
Sully
Posts: 9
Joined: Sat Feb 17, 2007 12:41 am

Post by Sully »

Found it...
Locked