Page 1 of 1
Face detection video url
Posted: Sun May 24, 2020 6:18 pm
by Jamieeburgess
Hi folks,
So FINALLY got round to taking some photos and training the model - well like everything in Zoneminder - works a charm

solid work.
Only question I have (as i'm sending to MQTT and then using HomeAssistant (via Node-Red) to send an iOS alert with the video and actionable buttons) is what is the video url of the output of a detected face.
Little confused as this is what I have been using but does not work:
https://<domain>/zm/index.php?username=user&password=pass&action=login&view=view_video&eid={{payload.eventid}}
I can retrieve the image using this:
https://<domain>/zm/index.php?username=user&password=pass&action=login&view=image&eid={{payload.eventid}}&eid=1075&fid=snapshot&width=600
If i use `view=event` i'm taken to the ZM console
and `view=video` offers me the option to generate the video
I did wonder if the video didnt exist, but as above I can view the video of the event in the ZM console.
Any help would be greatly appreciated.
PS the person detected in the image in JSON is super handy!
Re: Face detection video url
Posted: Sun May 24, 2020 9:57 pm
by asker
The URL for the recorded video is:
Code: Select all
https://<domain>/zm/index.php?view=view_video&eid=eid&username=user&password=pass
Try the above in a browser (replace the right values) and see if it works first.
However, remember the following:
a) If you are not using ZM master, while the event is recording, this video link will not work. It will only work after the event is over.
b) The video is the full event video - not just the face detection part
c) The video does not have bounding boxes
Depending on how you setup the ES, there is also objectdetect.mp4 and object detect.gif (see objectconfig.ini)
Re: Face detection video url
Posted: Sun May 24, 2020 10:53 pm
by Jamieeburgess
Thanks for the reply. I get a video loading screen but nothing plays.
This only happens for videos that have gone through the face detection process OR is related to just a single camera.
In the past i have had to enable cameras manually for some things as i have added them later.
Could there be a setting preventing the video from loading?
Also as a side note - I dont need bounding boxes, and have a delay built in to wait until the video is ready.
Weird this scenario isnt working (using image for now until I can get to the bottom of this)
Thanks again
Re: Face detection video url
Posted: Sun May 24, 2020 11:47 pm
by asker
Jamieeburgess wrote: ↑Sun May 24, 2020 10:53 pm
This only happens for videos that have gone through the face detection process OR is related to just a single camera.
This should not be related to face detect at all. ZM is unaware of the python scripts and they don't affect ZM's video at all. It is more likely some property of the camera (maybe ZM settings - passthru/x264 encode etc).
Please make sure of the following:
a) You try and play the video only after the video has completed recording (that is, you also see and end time in the event record)
b) Only try with the browser (forget face detect/HA etc, for now)
c) When trying to play, take a look at your ZM logs (turn debug logs on)
d) If you continue to face issues, post debug logs when trying to play, and please mention your ZM version/distro
Re: Face detection video url
Posted: Mon May 25, 2020 12:00 am
by asker
I missed this comment of yours:
I did wonder if the video didnt exist, but as above I can view the video of the event in the ZM console.
So the video plays correctly in ZM console? Then when does it fail? With your "&username=&password=" additions? If so , take a look at ZM web_php logs (turn debug logs on)
Re: Face detection video url
Posted: Mon May 25, 2020 5:06 pm
by Jamieeburgess
Code: Select all
web_php 10553 WAR No includes/actions/view_video.php for action login /usr/share/zoneminder/www/index.php
Is the result when trying to load the event_id.
I've also confirmed that this isn't limited to the face detection - the same happens for any videos on this camera. Its a USB camera streamed via motion running on a Rpi 4 (h264 but only getting 1fps at the moment).
Good to know the video url is the same and uneffected by face detection. (appreciate the troubleshooting tips!)
Now just to figure out why the camera is performing so badly and why the recorded video wont load (as you say i'm assuming its the format)
Re: Face detection video url
Posted: Mon May 25, 2020 7:56 pm
by asker
Note that in the URL I posted:
Code: Select all
https://<domain>/zm/index.php?view=view_video&eid=eid&username=user&password=pass
There is no "action=login" so make sure you are not adding it.
Re: Face detection video url
Posted: Mon May 25, 2020 9:22 pm
by Jamieeburgess
yep, copied in your url directly (with edits for my set up) and no luck
Re: Face detection video url
Posted: Mon May 25, 2020 9:29 pm
by asker
What are the debug logs? The last log you posted says
Code: Select all
web_php 10553 WAR No includes/actions/view_video.php for action login /usr/share/zoneminder/www/index.php
That should not be what you see if you don't add login action.
Also, please read the suggestions above completely:
a) debug logs need to be enabled
b) Please post the full logs when you try and access (and they should include DBG logs)
c) ZM version