Amcrest IP4M-1041W RTSP Stream Error - Error opening stream (ERRORTYPE_22, Invalid argument)

I have a Amcrest IP4M-1041W camera and I’m trying to get a live stream working via RTSP. I’ve configured the Amcrest integration as seen below. I can see a snapshot of the camera in Home Assistant, but when I click on the snapshot I don’t see the live stream. I might be missing a configuration setting in either HS or the camera, but I’m not sure what to check.

ffmpeg:

stream:

amcrest:
  - host: 192.168.1.15
    username: admin
    password: password
    name: 'Test Camera'
    stream_source: rtsp

The error I receive in the log file is : Error from stream worker: Error opening stream (ERRORTYPE_22, Invalid argument) rtsp://:@192.168.1.15:554/cam/realmonitor?channel=1&subtype=0

What else can I or should I check? I did test the RTSP url in VLC Media Player and it worked just fine.

Thanks for any help you can provide.

I don’t use Amcrest integration but try:

amcrest:
  - host: 192.168.1.15
    username: admin
    password: password
    name: 'Test Camera'
    stream_source: rtsp
    port: 80

Or port: 554

And don’t use H.265 HA only supports H.264

You can also try/use the Dahua integration: https://github.com/rroller/dahua :slightly_smiling_face:

Hey Jim, thanks for the reply. I tried port 80 and 554 with no success.

I just did a short test with my Amcrest AD110 without problems.

amcrest: 
  - host: 192.168.x.x
    name: Amcrest Test
    username: user
    password: userpassword
    stream_source: rtsp
    port: 80

HA entities
Amcrest_Test_1

Live Stream
Amcrest_Test_Live

Are your Amcrest camera and your HA server in the same network/IP range?

So, I figured it out. It was the camera password. I had an exclamation point and a question mark in the password. Once I took those out and restarted HA, the live stream started to work.

Thanks again for your help on this.

Sometimes the solution can be so simple. :slightly_smiling_face:

Hey @Zab , so how’s the camera been working out for you?

NAS storage?
PTZ?
Privacy mode?
Recording/snapshots?
Presence sensors?
AI follow function?
two way comms?

I’m looking to get one as it seems to be the best choice for HA at the moment.

Hey @TurfFiber, it’s actually worked pretty well. I control my garage door via an ESP8266 relay board wired to a garage door opener, and this camera is used to see if there is anything in the way of the garage door closing, as well as views of the garage.

Also, I use Frigate for AI object detection and recording. I’ve answered your questions below.

  • NAS Storage: I don’t store any video to a NAS device, it just sits on the Frigate HD for a couple of days or a week if the video falls within a triggered event.

  • PTZ: Works well when using the Amcrest app, haven’t used it with any other app through.

  • Privacy Mode: Work well however I only activate it from the Amcrest app when needed.

  • Recording/snapshots: Work well in Frigate although Frigate does advise against using wireless cameras. It has a pretty decent Wifi connection but occasionally I will get lines running through a video recording for a second or two, probably due to the Wifi connection. Snapshots work great in HA.

  • Presence sensors: I don’t use any that come with the camera (not even sure if it has this feature). Again, I use Frigate for that if needed.

  • AI follow function: I used this when I first mounted the camera and it worked decent but would at times lag behind or lose the object it was trying to follow. I have since disabled this.

  • Two way comm: Worked fine when we tested it using the Amcrest app, but I don’t really have a use for this in my particular application, so it’s not something we use often.

Let me know if you have any other questions.

1 Like

Awesome Zab, thanks for the lengthy reply!

I’ve been hoping for more HA sided use cases, because I’d like to keep everything within the HA app, but all of this sounds good so far, therefore I’ll give it a go!