URL to get Image from Empire Camera

TonyK1321

n3wb
Feb 23, 2024
6
2
Colorado USA
Hello - I have an Empire IPC-B54IR-Z4E-S3. I would like to periodically capture an image that I will display on my dashboard. What URL would I use to do that? I'm guessing I need to add my user name and password to the URL string after its IP address, and maybe indicate that I want a snapshot. Is there a standard URL format for all or most security cameras, or does each vendor have their own string format? Is there a doc somewhere that shows the options that are available for the URL string for my camera?
Thanks,
Tony
 
This works for my Amcrest, Empire, Dahua, and Lorex cameras:

Bash:
cat AmcrestSnapshot.sh
#!/bin/bash

IPAddress=$1
OutPath=$2

cd /usr/local/bin

outfile=$OutPath
outfile+=$(date +%Y-%m-%d-%H-%M-%S)
outfile+=.jpg
echo $outfile
curl -o $outfile --digest --user username:password "$IPAddress/cgi-bin/snapshot.cgi"

which I can call with:

./AmcrestSnapshot.sh 192.168.50.36 /Volumes/TimeLapse/RoofLapse/

You may also be able to hardcode just:


but there are some cases (can't remember which) that are improved by using curl with --digest.
 
This works for my Amcrest, Empire, Dahua, and Lorex cameras:

Bash:
cat AmcrestSnapshot.sh
#!/bin/bash

IPAddress=$1
OutPath=$2

cd /usr/local/bin

outfile=$OutPath
outfile+=$(date +%Y-%m-%d-%H-%M-%S)
outfile+=.jpg
echo $outfile
curl -o $outfile --digest --user username:password "$IPAddress/cgi-bin/snapshot.cgi"

which I can call with:

./AmcrestSnapshot.sh 192.168.50.36 /Volumes/TimeLapse/RoofLapse/

You may also be able to hardcode just:


but there are some cases (can't remember which) that are improved by using curl with --digest.
In the last URL above it should be a colon ( : ) between "username" and "password", not a semicolon ( ; ). :cool:
 
Yes, typo while I was deleting my real password :facepalm:
 
  • Like
Reactions: TonyR
Be advised that, depending on firmware and version of webGUI, you may have to insure that CGI is enabled in your camera's webGUI. I have a Loryta (Dahua OEM) IPC-T5442TM-AS that requires it here, although it was enabled by default.

You can check by opening the camera's webGUI and going to "System" => "Safety" => "System Service" and check the box next to "CGI Service".
 
  • Like
Reactions: TheWaterbug