Media File APIs request
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.
Hello @pvn01, thanks for the RFE.
Let's look what we can do.
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.
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.
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
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?