Describe the bug
I use the ISAPI/hikload to coordinate video recording and downloading for my research. However, when I download a video immediately after I stop a recording using ISAPI, the video is sometimes incomplete. However, the video is correctly formatted if I look on the DVR itself.
To Reproduce
To start a recording:
hikutils.putXML(self.server, 'ContentMgmt/record/control/manual/start/tracks/' + cam)
To stop a recording:
hikutils.putXML(self.server, 'ContentMgmt/record/control/manual/stop/tracks/' + addr)
To download:
resp = self.server.ContentMgmt.search.getAllRecordingsForID(addr)
vids = resp['CMSearchResult']['matchList']['searchMatchItem']
if not isinstance(vids, list):
vids = [vids]
vid = vids[-1]
dwnld = self.server.ContentMgmt.search.downloadURI(vid['mediaSegmentDescriptor']['playbackURI'])
if not os.path.exists(output_folder):
os.makedirs(output_folder)
with open(output_folder + str(name) + "_" + addr + ".mp4", 'wb') as file:
file.write(dwnld.content)
Additional context
Device is an iDS-7216HQHI-M2/S
Describe the bug
I use the ISAPI/hikload to coordinate video recording and downloading for my research. However, when I download a video immediately after I stop a recording using ISAPI, the video is sometimes incomplete. However, the video is correctly formatted if I look on the DVR itself.
To Reproduce
To start a recording:
hikutils.putXML(self.server, 'ContentMgmt/record/control/manual/start/tracks/' + cam)To stop a recording:
hikutils.putXML(self.server, 'ContentMgmt/record/control/manual/stop/tracks/' + addr)To download:
Additional context
Device is an iDS-7216HQHI-M2/S