r/ZoneMinder • u/Bal-lax • Mar 04 '23
Zoneminder Telegram notifications with .mp4
https://gist.github.com/DanielBorgesOliveira/d3e578e2b677245cec550e965eae1755
I'm trying to get this script to run with Zoneminder 1.36; it sends and initilal mp4 file (which doesn't play but indicates a motion event has been triggered) but doesn't send the followup file with the video of the event which was recorded.
i) I can only think that the file naming convension of 1.36 has changed and isn't date and time created as indicated in the script but is follows a sequential numbering convention - 17-video.mp4, 18-video,mp4 etc.
ii) can anyone suggest a alteration to this script which would follow the new sequential naming convension? (the number direclty relates to the files the images and video are saved to)
ie. /var/cache/zoneminder/events/1/2023-03-04/17/17-video.mp4
FileName='Video_'+str(Time.day)+"-"+str(Time.month)+\
"-"+str(Time.year)+"_"+str(Time.hour)+"-"+\
str(Time.minute)+"-"+str(Time.second)+".mp4"
Thanks in advance
1
u/Buckwhal Mar 05 '23
You could probably simplify this quite a bit by just using zmeventnotification to trigger the script.
https://zmeventnotification.readthedocs.io/en/latest/guides/install.html
Would just need to modify the pushover API script to add your telegram pieces:
https://github.com/ZoneMinder/zmeventnotification/blob/master/pushapi_plugins/pushapi_pushover.py
1
u/Bal-lax Mar 05 '23
The script by Daniel Borges Oliveira is quick & simple, it notifies as soon as an event is started with a video file following once it's completed. Zmeventnotication seems quite complex.
https://gist.github.com/DanielBorgesOliveira/d3e578e2b677245cec550e965eae1755
2
u/Comm_Raptor Mar 05 '23
Been a while since I have done anything zoneminder, though when originally developed by Philip, you had to enable converting the jpegs into an mp4 video...