ZoneMinder / pyzm

Python API, Log, Event Server and Memory wrapper for ZoneMinder
GNU General Public License v2.0
31 stars 20 forks source link

Unable to download event video #39

Closed LukeARohl closed 2 years ago

LukeARohl commented 2 years ago

Issue: I am unable to download a Zoneminder (v1.34.26) event video. I am able to authenticate no problem. The thumbnail even downloads just fine, but the video [ERR] Event 146494 does not have a video file

Below is the code I am using in order to download the video. ` from pyzm.api import ZMApi

options = {

FIXME use secrets instead

"apiurl": "https://nvr_url/zm/api",
"portalurl": "https://nvr_url/zm",
"user": "zm_bot",
"password": "zm_bot_pass",
"disable_ssl_check": True,

} zm = ZMApi(options)

event_filter = { 'min_alarmed_frames': 0, 'max_events': 10, }

print ('I got {} events'.format(len(cam_events.list()))) for e in cam_events.list(): print('\nID:{} Event:{} Cause:{} Notes:{}'.format( e.id(), e.name(), e.cause(), e.notes())) print('\tDuration: {} Link: {}'.format(e.duration(), e.get_video_url()))

# Download thumbnail and video
e.download_image(dir=events_path)
e.download_video(dir=events_path)

`

If there is any additional information or step I should try please let me know.