frigate: [Camera Support]: Amcrest IP5M-1190W ONVIF not working
Describe the problem you are having
I upgraded my frigate installation to the latest because I saw PTZ support was added. I have two PTZ cameras (Amcrest IP5M-1190W) and I added the required entries to the frigate config file for ONVIF as follows:
onvif:
host: 192.168.86.45
port: 80
user: admin
password: (redacted)
After adding this I get an error in the frigate logs:
2024-02-11 15:28:23.889963896 [2024-02-11 15:28:23] frigate.ptz.onvif ERROR : Unable to connect to camera: Front: Unknown error: Sender not Authorized. Invalid username or password! You still have 28 attempt(s).
I tried this with my other Amcrest cameras which are different models and do not support PTZ and had no issues. I did make sure to enable ONVIF in the Amcrest camera settings and my username and password are definitely correct.
I am beginning to think its an issue with the camera itself, but I wanted to see if this was something anyone else has encountered. Some preliminary google searches about this camera and ONVIF support returned this thread which seems to indicate there is some issue with how authentication is handled for this camera and is an issue seen with other software. However they did eventually fix the issue although I am not certain as to how exactly the solution was accomplished.
Version
0.13.1
Frigate config file
mqtt:
host: 192.168.86.21
user: mqtt
password: (redacted)
ffmpeg:
hwaccel_args: -hwaccel vaapi
output_args:
record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -c:a aac
#LIBVA_DRIVER_NAME=i965
detectors:
coral:
type: edgetpu
device: usb
objects:
# Optional: list of objects to track from labelmap.txt (default: shown below)
track:
- person
- dog
filters:
dog:
min_score: 0.6
threshold: 0.7
person:
min_score: 0.6
threshold: 0.7
motion:
threshold: 50
improve_contrast: true
record:
enabled: True
retain:
days: 7
mode: motion
events:
retain:
default: 21
mode: active_objects
objects:
dog: 30
person: 30
car: 7
snapshots:
enabled: True
timestamp: False
bounding_box: False
retain:
default: 14
objects:
person: 14
dog: 14
car: 5
# Optional: birdseye configuration
# NOTE: Can (enabled, mode) be overridden at the camera level
birdseye:
# Optional: Enable birdseye view (default: shown below)
enabled: True
# Optional: Width of the output resolution (default: shown below)
width: 1920
# Optional: Height of the output resolution (default: shown below)
height: 1080
# Optional: Encoding quality of the mpeg1 feed (default: shown below)
# 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources.
quality: 8
# Optional: Mode of the view. Available options are: objects, motion, and continuous
# objects - cameras are included if they have had a tracked object within the last 30 seconds
# motion - cameras are included if motion was detected in the last 30 seconds
# continuous - all cameras are included always
mode: objects
cameras:
Garage:
ffmpeg:
inputs:
- path: rtsp://admin:(redacted)@192.168.86.39:554/cam/realmonitor?channel=1&subtype=0&authbasic=64
roles:
- rtmp
detect:
width: 2592
height: 1944
stationary:
# Optional: Frequency for confirming stationary objects (default: shown below)
# When set to 0, object detection will not confirm stationary objects until movement is detected.
# If set to 10, object detection will run to confirm the object still exists on every 10th frame.
#interval: 0
# Optional: Number of frames without a position change for an object to be considered stationary (default: 10x the frame rate or 10s)
threshold: 50
# Optional: Define a maximum number of frames for tracking a stationary object (default: not set, track forever)
# This can help with false positives for objects that should only be stationary for a limited amount of time.
# It can also be used to disable stationary object tracking. For example, you may want to set a value for person, but leave
# car at the default.
# WARNING: Setting these values overrides default behavior and disables stationary object tracking.
# There are very few situations where you would want it disabled. It is NOT recommended to
# copy these values from the example config into your config unless you know they are needed.
max_frames:
# Optional: Default for all object types (default: not set, track forever)
default: 3000
# Optional: Object specific values
objects:
car: 100
objects:
track:
- person
- dog
Back:
ffmpeg:
inputs:
- path: rtsp://admin:(redacted)@192.168.86.63:554/cam/realmonitor?channel=1&subtype=0&authbasic=64
roles:
- rtmp
detect:
width: 2560
height: 1920
stationary:
# Optional: Frequency for confirming stationary objects (default: shown below)
# When set to 0, object detection will not confirm stationary objects until movement is detected.
# If set to 10, object detection will run to confirm the object still exists on every 10th frame.
#interval: 0
# Optional: Number of frames without a position change for an object to be considered stationary (default: 10x the frame rate or 10s)
threshold: 50
# Optional: Define a maximum number of frames for tracking a stationary object (default: not set, track forever)
# This can help with false positives for objects that should only be stationary for a limited amount of time.
# It can also be used to disable stationary object tracking. For example, you may want to set a value for person, but leave
# car at the default.
# WARNING: Setting these values overrides default behavior and disables stationary object tracking.
# There are very few situations where you would want it disabled. It is NOT recommended to
# copy these values from the example config into your config unless you know they are needed.
max_frames:
# Optional: Default for all object types (default: not set, track forever)
default: 3000
# Optional: Object specific values
objects:
car: 100
objects:
track:
- person
- dog
zones:
back_door:
coordinates: 1560,1639,1652,1642,1637,1920,2560,1920,2560,1081,2153,1057,2100,843,1618,793,1601,1057
Front:
ffmpeg:
inputs:
- path: rtsp://admin:(redacted)@192.168.86.45:554/cam/realmonitor?channel=1&subtype=0&authbasic=64
roles:
- rtmp
onvif:
host: 192.168.86.45
port: 80
user: admin
password: (redacted)
detect:
width: 2560
height: 1920
stationary:
# Optional: Frequency for confirming stationary objects (defa>
# When set to 0, object detection will not confirm stationary>
# If set to 10, object detection will run to confirm the obje>
#interval: 0
# Optional: Number of frames without a position change for an>
threshold: 50
# Optional: Define a maximum number of frames for tracking a >
# This can help with false positives for objects that should >
# It can also be used to disable stationary object tracking. >
# car at the default.
# WARNING: Setting these values overrides default behavior an>
# There are very few situations where you would want>
# copy these values from the example config into you>
max_frames:
# Optional: Default for all object types (default: not set,>
default: 3000
# Optional: Object specific values
objects:
car: 100
objects:
track:
- person
- dog
filters:
dog:
mask:
- 1185,1736,1474,1920,2203,1920,2437,1337,1909,1104
person:
mask:
- 1185,1736,1474,1920,2203,1920,2437,1337,1909,1104
- 1931,989,1942,861,2070,943,2002,1032
motion:
mask:
- 1154,1728,1472,1920,2203,1920,2443,1339,1892,1050,1863,896,1776,956,1747,1229
zones:
front_porch:
coordinates: 2433,1364,2560,869,2194,736,2071,850,1963,846,1765,981
Alley:
ffmpeg:
inputs:
- path: rtsp://admin:(redacted)@192.168.86.38:554/cam/realmonitor?channel=1&subtype=0&authbasic=64
roles:
- rtmp
detect:
width: 3840
height: 2160
objects:
track:
- person
- dog
- car
filters:
car:
mask:
- 1805,0,2637,21,2601,307,2128,342,1798,314
- 3015,0,3678,262,3559,594,2920,292,2934,157,2718,95,2718,0
person:
mask:
- 1805,0,2637,21,2601,307,2128,342,1798,314
- 3015,0,3678,262,3559,594,2920,292,2934,157,2718,95,2718,0
dog:
mask:
- 1805,0,2637,21,2601,307,2128,342,1798,314
- 3015,0,3678,262,3559,594,2920,292,2934,157,2718,95,2718,0
Side:
ffmpeg:
inputs:
- path: rtsp://admin:(redacted)@192.168.86.40:554/cam/realmonitor?channel=1&subtype=0&authbasic=64
roles:
- record
- detect
- rtmp
detect:
width: 3840
height: 2160
stationary:
# Optional: Frequency for confirming stationary objects (defa>
# When set to 0, object detection will not confirm stationary>
# If set to 10, object detection will run to confirm the obje>
#interval: 0
# Optional: Number of frames without a position change for an>
threshold: 50
# Optional: Define a maximum number of frames for tracking a >
# This can help with false positives for objects that should >
# It can also be used to disable stationary object tracking. >
# car at the default.
# WARNING: Setting these values overrides default behavior an>
# There are very few situations where you would want>
# copy these values from the example config into you>
max_frames:
# Optional: Default for all object types (default: not set,>
default: 3000
# Optional: Object specific values
objects:
dog: 3000
objects:
track:
- person
- dog
zones:
side_yard:
coordinates: 914,892,1631,745,2467,593,3309,505,3509,487,3406,992,3840,1276,3840,2160,0,2160,0,1160
Relevant log output
2024-02-11 15:28:23.889963896 [2024-02-11 15:28:23] frigate.ptz.onvif ERROR : Unable to connect to camera: Front: Unknown error: Sender not Authorized. Invalid username or password! You still have 28 attempt(s).
FFprobe output from your camera
[{"return_code":0,"stderr":"","stdout":{"programs":[],"streams":[{"avg_frame_rate":"5/1","codec_long_name":"H.264/AVC/MPEG-4AVC/MPEG-4part10","height":1920,"width":2560},{"avg_frame_rate":"0/0","codec_long_name":"AAC(AdvancedAudioCoding)"}]}}]
Frigate stats
No response
Operating system
Debian
Install method
Docker Compose
Coral version
USB
Network connection
Wired
Camera make and model
Amcrest IP5M-1190W
Any other information that may be helpful
No response
About this issue
- Original URL
- State: open
- Created 5 months ago
- Reactions: 1
- Comments: 20
I wrestled with this for a while and finally got PT working. My cameras have no Z, but I’m cool with that.
My specific Amcrest camera models: IP2M-841B IP2M-841W
I was able to login to both cameras with ONVIF Device Manager (Thank you @sdgilvey !!!). I used the same user/pass that works for logging in to the Amcrest interface.
From there, I created a new admin user for each camera.
Then added this to each of the cameras:
Not sure how much, if any, of that was necessary, but it now works great with both cameras!
Side note for RTSP links…try these @sdgilvey
Main Stream: rtsp://USER:PASS@CAMERAIP:554/cam/realmonitor?channel=1&subtype=0
Sub Stream: rtsp://USER:PASS@CAMERAIP:554/cam/realmonitor?channel=1&subtype=1