Unable to download files using the HTTP API (RPC_Loadfile)

Have some questions or having issues with your IP Camera(s), Post them here for the mods and other users to assist you with.
Post Reply
Valacar
Posts: 1
Joined: Sat Dec 09, 2017 9:42 am

Unable to download files using the HTTP API (RPC_Loadfile)

Post 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!
DavidChilvers
Posts: 1
Joined: Fri Dec 22, 2017 2:43 pm

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

Post 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.
oppyoppy
Posts: 2
Joined: Wed Feb 21, 2018 8:35 pm

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

Post 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)
rxj
Posts: 1
Joined: Thu Dec 20, 2018 2:43 pm

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

Post 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??
jack7
Posts: 904
Joined: Tue May 29, 2018 7:46 pm

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

Post 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.
mrchocoborider
Posts: 3
Joined: Tue Jun 27, 2023 4:36 pm

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

Post 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.
Post Reply