What's The Dealio with Amcrest Cameras?

Yes, that is exactly what happens. I don’t have the error on hand as I have disabled the camera in HA. I’m actively using the camera and adding it back into HA wrecks the picture quality on the camera.

Any updates on a fix for this? Is there any additional information I can give you that would help?

Thanks for your hard work.

I think the only way to fix that is to make a issue on aiohttp project and offer a debug instance.

Also having the same issue. Any ideas other than forcing aiohttp back to 1.2? I’m running on snapstream right now and it’s just not snappy enough at all.

Guys, I filed a new issue with the Amcrest cameras with the live streaming.

It seems that the new firmware requires HttpDigestAuth however the streaming is using aoihttp.HttpBasiAuth which is causing 401 errors on the streaming url.

I created this issue https://github.com/home-assistant/home-assistant/issues/7398 to check if we can modify it.

Currently using the newer firmware, I’m using snapshot as streaming for now too. Not perfect, but it is a workaround.

@pvizeli do you know if is possible to do HttpDigestAuth on aiohttp?

Guys, I spent some time trying to make it work, however after some researching it seems that due to the HTTPDigest auth, aiohttp cannot be used yet. Please let me know if I’m wrong here.

Looking other codes like camera/generic.py, camera/mjpeg.py it seems to behave the same way.

Having said this, I kept the sensor/amcrest configured for the automation and motion_sensor but for the camera component I’m using camera/ffmpeg which is working great. Basically the configuration was:

# camera.yaml
#- platform: amcrest
#  name: "Amcrest Backyard"
#  host: !secret amcrest_backyard_host
#  username: !secret amcrest_backyard_username
#  password: !secret amcrest_backyard_password
#  port: 80
#  resolution: high
#  stream_source: snapshot

- platform: ffmpeg
  name: "Amcrest Backyard"
  input: !secret amcrest_backyard_ffmpeg_url

Where the input will look like this:


Sorry about this guys. Let’s keep working to make it transparent for Amcrest component, but I think we will need to wait a little bit.

I’ve updated the https://github.com/home-assistant/home-assistant/issues/7398 as well.

1 Like

Thanks tchellomello for the continued support!

I’ll update tonight or tomorrow and report back. I’m also playing with HADashboard as well so that’s giving me fits :rage:


I can’t get my AT&T gateway to work via UPnP so no rtsp for me. Googling for a bit shows this gateway does not support UPnP and all my attempts to port forward TCP & RTSP have been unsuccessful. I setup the port forwarding and return to the configuration for Amcrest and hit refresh for UPnP and receive “Mapping Failed” every time.

I can however use the following:

http://admin:[email protected]/cgi-bin/mjpg/video.cgi?[channel=0]&subtype=1

With this though, I only receive the substream via MJPG and is limited to 640x480, not ideal.

Any suggestions?

hm… why do you need uPNP when you have direct access internally on your network?

No DigestAuth will not work with aioHTTP. I hope some one will add this. That is a big point of my wishlist.

When I try to access the RTSP URL nothing works. So i looked into the Amcrest settings and found the UPnP setup and figured I needed to this.

But that’s what i see, mapping failed. I’m at a loss.

Hello guys,

The support to rtsp was introduced on version 0.45.

You can check the docs at https://home-assistant.io/components/camera.amcrest/ . The configuration for rtsp streaming would be something similar with below:

- platform: amcrest
  name: "Amcrest Driveway"
  host: !secret amcrest_driveway_host
  username: !secret amcrest_driveway_username
  password: !secret amcrest_driveway_password
  port: 80
  resolution: high
  stream_source: rtsp

Thanks everyone

Did you ever get this working? I’m having a similar problem.

I just updated to 0.45 and setup this configuration in my yaml file. I get the still image for the camera, but when I click on the still I get a broken image icon for the stream. I checked my UPnP settings on the camera and it shows “Mapping Failed” just like FrenchToast. Is there additional setup that needs to be done on the camera side to get RTSP working?

Hello guys,

I don’t think you need UPNP enabled for the RTSP to work especially if you are on the same network.

Did you guys try to run the command directly via ffmpeg on the shell? Try also using the low resolution.


Sorry guys, been a little absent lately.

I did not get the RTSP working prior to the 0.45 release. I’ve yet to upgrade to the latest release but I plan to this week.

Did you follow the FFMPEG instructions tchellomello hinted at in the amcrest component page?

I have rtsp setup working on my Amcrest IP2M-841W with this config, not using the specific component.

It is still very slow to update the feed though. It helps a bit on lower settings as defined in the camera stream setup in the camera itself.

  ffmpeg_bin: /usr/bin/avconv

  - platform: ffmpeg
    input: rtsp://user:password@cameraIP:554/cam/realmonitor?channel=1&subtype=0
    name: lounge
1 Like

@skptic Is your camera on WiFi? If so, try to set the subtype=1 to a lower resolution which should help to render the image faster.

My wifi cameras take a long time to render when using the subtype=0.

Nope, hadn’t done that. Got it going now.

RTSP for Amcrest wasn’t supported before 0.45, so hopefully updating to that will get you going.

Got it working after FrenchToast pointed out the ffmpeg note to me. Thanks for your hard work getting something that works going.

1 Like