-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Event Video(s) aren't getting attached to email. #1550
Comments
Can you show us how you configured your email tab? |
This has been caused by commit b32ef77 @connortechnology appears to have made extensive changes to zmvideo.pl recently, and consequently the solution is not as simple as uncommenting this line: In any case, I am out of time for today, and will explore what the solution should be later, unless someone else beats me to it. |
I don't think the problem is too much harder though. The old standard case hasn't changed much. My efforts were to add a mode in which multiple events would be concatenated into one file, in which case we should print that out. I'll have a PR in a bit. |
Yup, I just ran out of time last night to make any further progress. Thanks for fixing this. |
@knnniggett sure, since I use the PPA I've modified the file by hand in the same places and about to test now. Anything else I need to test besides my normal use case with this change? |
@knnniggett No go, here is what I see:
I created a forced alarm situation and ran my filter manually to make it go as seen here: |
I know you said the video file was getting created in your initial post, but can you check again the file exists and is not zero bytes?
|
The print from zmvideo.pl seems to dump the entire path hence the double directory structure but when I shorten I see the file there.
|
Oh yeah, that'll do it. I didn't notice that until you mentioned it. |
@connortechnology Previous behavior of video.pl is to return the filename only, without the path. The safest change seems to be to change the GenerateVideo sub in Event.pm: Alternatively, we could remove modify the generateVideo sub in zmfilter to not sprintf the path: Unless you know the former will cause a problem with your recent changes, that is the solution I would rather take. We don't always know what third party tools are out there, which expect zmvideo.pl to return the filename only. No sense in causing breakage if we can avoid it. |
I expect to change code to handle full paths. Just giving a file name is not useful because we have no idea where it is. |
Yeah I went with your second suggestion. PR updated. My reasoning is that not giving the full path is really not useful to a human,and fixing any external tools that rely on the behaviour is not difficult, nor is it our problem. Plus I would like to know about these external tools. |
@connortechnology @knnniggett just made the modifications by hand and it worked! Anything else you want me to test?
|
I did? |
In any case, glad it worked. If you've got the time and haven't done so already, go through your entire system and see if all the buttons and widgets work. The more testers we have the less likely something will sneak its way into the release. |
I've noticed in recent updates from Ubuntu's default version to the master branch that anytime an event is triggered and emailed off the video of the event isn't being attached. This worked in 1.29.0 but with 1.29.0-xenial-2016060101 I noticed it and before that as well. Here is my system details:
root@zoneminder:/var/log/zm# uname -a
Linux zoneminder 4.4.0-28-generic #47-Ubuntu SMP Fri Jun 24 10:09:13 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
root@zoneminder:/var/log/zm# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04 LTS"
root@zoneminder:/var/log/zm# dpkg -l | grep zoneminder
ii zoneminder 1.29.0-xenial-2016060101 amd64 video camera security and surveillance solution
ii zoneminder-doc 1.29.0-xenial-2016060101 all ZoneMinder documentation
root@zoneminder:/var/log/zm#
I can see the events are being generated properly since the mp4 is there and the ffmpeg.log is in the event directory. From zmvideo.log:
07/06/2016 10:53:19.109424 zmvideo[16807].INF [Creating video file Event-33-r1-s1.mp4 for event 33] 07/06/2016 10:53:21.089052 zmvideo[16807].INF [Finished Event-33-r1-s1.mp4]
You can see in zmfilter.log the event is mailed and the image is attached, per my email notification setup, but the event isn't.
07/06/2016 10:53:18.726292 zmfilter[12426].INF [Archiving event 33]
07/06/2016 10:53:21.098528 zmfilter[12426].INF [Creating notification email]
07/06/2016 10:53:21.438639 zmfilter[12426].INF [Sending notification email 'ZoneMinder: Alarm - Backdoor-33 (2016-07-06 10:50:35)']
07/06/2016 10:53:21.439869 zmfilter[12426].INF [Attaching '/usr/share/zoneminder/www/events/3/16/07/06/10/50/35/00077-capture.jpg]
07/06/2016 10:53:21.440641 zmfilter[12426].INF [Attaching '/usr/share/zoneminder/www/events/3/16/07/06/10/50/35/]
07/06/2016 10:53:21.500236 zmfilter[12426].INF [Notification email sent]
Here is a successful event before the upgrade for reference from zmfilter.log:
07/06/2016 08:49:23.232178 zmfilter[2843].INF [Archiving event 22]
07/06/2016 08:49:26.948009 zmfilter[2843].INF [Creating notification email]
07/06/2016 08:49:27.112325 zmfilter[2843].INF [Sending notification email 'ZoneMinder: Alarm - Driveway-22 (2016-07-06 08:44:37)']
07/06/2016 08:49:27.113986 zmfilter[2843].INF [Attaching '/usr/share/zoneminder/www/events/1/16/07/06/08/44/37/00207-capture.jpg]
07/06/2016 08:49:27.114838 zmfilter[2843].INF [Attaching '/usr/share/zoneminder/www/events/1/16/07/06/08/44/37/Event-22-r1-s1.mp4]
07/06/2016 08:49:28.996618 zmfilter[2843].INF [Notification email sent]
Here is the directory of the failed events after the upgrade showing the file is there and generated:
root@zoneminder:/var/log/zm# ls -la /usr/share/zoneminder/www/events/3/16/07/06/10/50/35/ | grep -v jpg
total 13240
drwxr-xr-x 2 www-data www-data 12288 Jul 6 10:53 .
drwxr-xr-x 3 www-data www-data 4096 Jul 6 10:50 ..
-rw-r--r-- 1 www-data www-data 0 Jul 6 10:50 .33
-rw-r--r-- 1 www-data www-data 620497 Jul 6 10:53 Event-33-r1-s1.mp4
-rw-r--r-- 1 www-data www-data 325171 Jul 6 10:53 ffmpeg.log
root@zoneminder:/var/log/zm#
If you need anything else let me know and thanks for the investigation.
The text was updated successfully, but these errors were encountered: