Page 1 of 1

Unable to download files using the HTTP API (RPC_Loadfile)

Posted: Wed Dec 13, 2017 5:56 am
by Valacar
I am currently developing a software that download the videos from the Amcrest camera directly from it's SD card, my camera is the IP3M-943B
But all my tries to download a file result in a empty response from the API, and i have no ideia why this is happening.

This is what i am doing:

I am using the documentation found here:
https://s3.amazonaws.com/amcrest-files/ ... 3.2017.pdf
I also am using this tutorial as a helper:
https://partofthething.com/thoughts/dow ... th-python/

So far, this is the best solution i found:
  1. Create a finder using factory.create (Working)
  2. Search files using findFile (Working)
  3. List the files using findNextFile (Working, it give me all the path for the files in the SD card)
  4. Download files using RPC_Loadfile (NOT working, it always return a empty answer from the server)
Did anyone else faced this problem before and have any tip i can do?
The text of the blog i posted also said that he didn't managed to download the files using the RPC_Loadfile, he had to create a hack using some bogus cookies, sadly this also didn't worked for me.

Any help is greatly appreciated, thank you very much!

Re: Unable to download files using the HTTP API (RPC_Loadfile)

Posted: Fri Dec 22, 2017 2:46 pm
by DavidChilvers
I have exactly the same problem. I have not tried the 'Cookie' kludge, but I did not know where to look for the cookies on my PC.

Re: Unable to download files using the HTTP API (RPC_Loadfile)

Posted: Sat Feb 24, 2018 9:40 am
by oppyoppy
Hi ValaCar,
I have the same camera (except mine is W).

1.Create a finder using factory.create (Working)
2.Search files using findFile (Not working - I continue to get ErrorID=2, Detail=Invalid Request)
3.List the files using findNextFile (not working as I haven't gotten past step 2)

The syntax I have been using for step 2 is:
(my factory # is 1885239944)
I am looking for all files of type mp4

http://birdcam1/cgi-bin/mediaFileFind.c ... 2006:30:00

Can you share the syntax you used to get this to work?

I would also appreciate the syntax for the find next files.

Thanks,

Ryan (OppyOppy)

Re: Unable to download files using the HTTP API (RPC_Loadfile)

Posted: Thu Dec 20, 2018 2:45 pm
by rxj
Valacar wrote: So far, this is the best solution i found:
  1. Create a finder using factory.create (Working)
  2. Search files using findFile (Working)
  3. List the files using findNextFile (Working, it give me all the path for the files in the SD card)
  4. Download files using RPC_Loadfile (NOT working, it always return a empty answer from the server)
Same problem. Any answers??

Re: Unable to download files using the HTTP API (RPC_Loadfile)

Posted: Fri Dec 21, 2018 11:20 pm
by jack7
If you can't get the API working and are using a PC, this may be an alternative.
In Amcrest Surveillance Pro on PC, you can go to Playback, show all events on the SD card for any 24 hour period for multiple cameras, select any or all event files, and export(download) all of the files at once in a specified format.

Re: Unable to download files using the HTTP API (RPC_Loadfile)

Posted: Tue Jun 27, 2023 4:42 pm
by mrchocoborider
I had a similar issue with empty replies from the server with status 200 when trying to download files between times.

E.g.
http://<server ip>/cgi-bin/loadfile.cgi?action=startLoad&channel=1&startTime=2023-06-27%2013:59:00&endTime=2023-06-27%2013:59:30

Setting the video encoding type to H.264 (down from H.265) for the main stream is what fixed it for me. I'm using a NV4108E-2TB NVR with latest firmware.

Hope this helps someone who was struggling like I was struggling.