python-amcrest icon indicating copy to clipboard operation
python-amcrest copied to clipboard

Media File APIs request

Open pvn01 opened this issue 8 years ago • 6 comments

Please implement the APIs on section 4.11.5-4.11.7 of the AMCREST_HTTP_API_SDK_V2.10.pdf. These media file APIs would enable SD card media file search and download, which would add some useful functionalities to the Amcrest IP camera. For example, one can write a simple automation script to download a motion-triggered recorded video on camera SD card, based on certain conditions that are practically useful, e.g. when there is no network traffic and/or within certain time frames. Currently, Amcrest Ip cams can either record motion-triggered video to sd or send off to an FTP server. While this limitation is practically good to prevent network traffic (when multiple ip cams trying to send files to an FTP server), it is a big disadvantage not having a way to store the recorded video in a safer place, other than the cam sd card.

pvn01 avatar Feb 02 '17 19:02 pvn01

Hello @pvn01, thanks for the RFE.

Let's look what we can do.

tchellomello avatar Feb 02 '17 20:02 tchellomello

I'm trying to figure out how the media APIs work. Would like to be able to write some sort of smart download to pull recordings off the SD card.

rct avatar Dec 06 '18 22:12 rct

I've added some basic support for this in my fork: https://github.com/jessbo/python-amcrest

find_files() - partially works. The start_time, end_time, and types parameters are tested as working on my setup. The rest are untested.

download_file() works and outputs a working video file. download_time() appears to work, but the resulting files seems corrupt. Haven't looked into why.

I probably won't be doing anything more with this code, but wanted to get it out there in case it helps someone in the future.

jessbo avatar Nov 25 '19 14:11 jessbo

I've added some basic support for this in my fork: https://github.com/jessbo/python-amcrest

find_files() - partially works. The start_time, end_time, and types parameters are tested as working on my setup. The rest are untested.

download_file() works and outputs a working video file. download_time() appears to work, but the resulting files seems corrupt. Haven't looked into why.

I probably won't be doing anything more with this code, but wanted to get it out there in case it helps someone in the future.

Please consider doing pull request with your code. @jessbo

dougsland avatar Nov 25 '19 16:11 dougsland

Hi @jessbo, can we merge it into @tchellomello's master branch? It is very useful and works well (at least find_file(), download_file() that I need)

If you have no time for the PR, I can do it on your behalf. Any objection?

maximvelichko avatar Dec 27 '19 09:12 maximvelichko