[Config Support]: Issues using 2 way audio with rebranded dahua/amcrest cameras. #20496
-
Describe the problem you are havingI have 'surevision' cameras, they seem to be rebranded dahua/amcrest cameras, I am specifically trying to enable 2 way audio on the SV-PTZ5X-N (Looks like a rebranded amcrest camera to me, the config screen is nearly identical to an amcrest I tested) camera, I was able to get 2 way audio to work reliably in frigate 0.15.1 however since updating to 0.16.1 it no longer will function. The camera has internal 'alarms' like greetings and trespass warnings, if I use "#backchannel=0" it allows alarms to function but the 'mic' icon in frigate disappears, if I use "#backchannel=1" it prevents alarms from functioning (Gives error "Someone is using this device") but 'mic' icon appears, but upon clicking the 'mic' 2 way audio is claimed enabled in frigate, however it does not actually work. I have enabled both at the same time as an experiment, it allows 'alarms' to work (As well as 2 way audio in the camera's config page) to work, while retaining the 'mic' icon; Issue is not resolved with this method. If I have both RTSP streams set, with 1 set explicitly to "#backchannel=0" and one without the "#backchannel=X" argument, it allows 'alarm' function, but the 'mic' disappears, if I leave the "#backchannel=X" argument out entirely on 1 stream, behavior defaults to that of "#backchannel=0" I apologize if there is anything glaringly wrong with my config, I have been stumbling around with this a lot, I have done my best to look for solutions in documentation and on github. Version0.16.1 Frigate config filedetectors:
onnx:
type: onnx #Onnx is a general detector method, it will automatically switch between Open Vino (Intel GPU) ROCM (AMD GPU) and TensorRT (Nvidia GPU)
birdseye:
enabled: true
mode: objects #Birdseye is used for a swapping camera feed
#model: #Yolonas is a self generated AI model, it is used in cases where Frigate+ models are unavailable or unwanted
# model_type: yolonas
# width: 640 # should match notebook settings
# height: 640 # should match notebook settings
# input_pixel_format: bgr
# path: /config/yolo_nas_s.onnx
# labelmap_path: /labelmap/coco-80.txt
model:
path: <REDACTED> #Frigate+ model.
#logger:
# default: info
#logs:
# frigate.mqtt: debug #Debugging
ffmpeg:
path: '7.0' #Specify the version of FFmpeg, likely reduntant
hwaccel_args: preset-vaapi #Hardware acceleration, for using GPU acceleration for transcoding, VAAPI is used for both intel and AMD
tls:
enabled: true #Used for enabling/disabling TLS, AKA self signed certificates, enable TLS for a self signed cert, disable it for using an external provider (IE Nginx)
mqtt: #Used for Home assistant integration, AKA push notifications for smart home functions.
enabled: true
host: 192.168.99.121 #Host is current PC, I have not tried loopback.
port: 1883
detect: #Enable/disable object detection
enabled: true
motion: #Enable/disable motion detection
enabled: true
record: #Enable/Disable Recording of video.
enabled: true
retain:
days: 200 #Days before it automatically starts culling old footage, however it *will* cull footage earlier than this, if there is no space left.
mode: all #If it will, or will not record, it supports the following modes: all, motion, active_objects
alerts:
retain: #Alerts are High Priority detections, IE a person entering property
days: 400
mode: active_objects
detections:
retain: #Detectons are Low Priority detections, IE a dog entering property
days: 200
mode: motion
objects: #What will be detected
track:
- person
- face
- license_plate # if using Frigate+ model
- bird
#- car Issues with constant detection, likely will require a camera that is set without view of parked cars.
filters: #Global object filters will follow this template, hopefully.
person: #Filter object
min_score: 0.7 # Increase this value to require higher confidence for person detection
threshold: 0.8 # Increase this value to require higher computed score for true positive
min_area: 5000 # Increase to ignore small objects
min_ratio: 0.5
max_ratio: 2.0
max_area: 80000 # Used to measure size of object, larger numbers equal larger objects, decrease to prevent objects such as cows from being detected as people
go2rtc: #Restreaming, it streams 1 time from the camera, and then multiple times from the restreaming server, prevents overload of camera, this restreaming function is known as RTSP
webrtc:
candidates:
- <REDACTED>:8555 #Tailscale IP
- 192.168.99.121:8555 #Static IP
- stun:8555 #I don't know what this does, but it's here
streams: #Asign all cameras RTSP addresses like these, all of these functions are highly important, only change IP address and User/password if required.
FrontGateG:
- rtsp://admin:<PASSWORD>@192.168.99.106/cam/realmonitor?channel=1&subtype=0#rtsp_transport=tcp#backchannel=0 #Backchannel is used to prevent/allow 2 way audio, =0 is disabled, =1 is enabled, currently =0 allows camera alarm to function, but disables 2 way in frigate.
- rtsp://admin:<PASSWORD>@192.168.99.106/cam/realmonitor?channel=1&subtype=0#rtsp_transport=tcp#backchannel=1 #=1 is to enable it, I have a secondary line here to test if having 2 streams will help with 2 way, it seems to be more functional than before, but I have not heard any audio from myself.
- ffmpeg:FrontGateG#audio=opus#audio=aac #FFmpeg transcodes, I transcode into both codecs because opus is for recording(?) and AAC is for streaming(?)
3DPrintG:
- rtsp://admin:<PASSWORD>@192.168.99.233#rtsp_transport=tcp#backchannel=0
- ffmpeg:3DPrintG#audio=opus#audio=aac
cameras: #Where cameras are actually put into service, each camera recieves several function specifiers here, it is important to match levels here.
FrontGate: #Name
ffmpeg: #Recording arguments
output_args:
record: preset-record-generic-audio-aac
inputs:
- path: rtsp://127.0.0.1:8554/FrontGateG #RTSP path (references above)
input_args: preset-rtsp-restream #Stream type
roles: #What it will do
- record
- audio
- detect
onvif: #For PTZ
host: 192.168.99.106
port: 80 #Most cameras seem to use this port
user: PTZ
password: <PASSWORD>
ignore_time_mismatch: true #May not be needed
tls_insecure: false #May not be needed
detect: #If specific camera will detect
enabled: true #Yes/No
fps: 5 #Rate of detection frames per second, 5 is good
# objects: #What it will track as well as filters for it's tracking. When setting objects at camera level, it overrides Global objects, Not sure if an object for this has to be specified at global level. (IE having "Dog" here but not globally)
# filters:
# person: #Filter object at camera level (Overrides Global)
# min_score: 0.6 # Increase this value to require higher confidence for person detection
# threshold: 0.8 # Increase this value to require higher computed score for true positive
# min_area: 5000 # Increase to ignore small objects
# min_ratio: 0.5
# max_ratio: 2.0
# max_area: 80000 # Used to measure size of object, larger numbers equal larger objects, decrease to prevent objects such as cows from being detected as people
#track:
# - person
live: #Used with RTSP
streams:
FrontGateG: FrontGateG #Stream name, referenced in RTSP Config
motion: #Filters for motion tuning, do not set here, set in UI
threshold: 60
contour_area: 10
improve_contrast: true
mask: 0.014,0.023,0.234,0.023,0.234,0.076,0.014,0.074
zones:
Tracking_zone:
coordinates: 0,0,1,0,1,1,0,1
loitering_time: 0
inertia: 3
3DPrinter:
ffmpeg:
output_args:
record: preset-record-generic-audio-aac
inputs:
- path: rtsp://127.0.0.1:8554/3DPrintG
input_args: preset-rtsp-restream
roles:
- record
- audio
detect:
enabled: false
live:
streams:
3DPrintG: 3DPrintG
version: 0.16-0
camera_groups:
Home:
order: 1
icon: LuHouse
cameras:
- birdseye
- FrontGate
- 3DPrinter
Birdseye:
order: 2
icon: LuBird
cameras: birdseye
semantic_search:
enabled: true
model_size: large
face_recognition:
enabled: true # Enable face recognition
model_size: large # Set the model size used face recognition. (Small for CPU, Large for GPU)
unknown_score: 0.8 # Minimum face distance score required to mark as a potential match
# detection_threshold: 0.7 # Minimum face detection score required to detect a face NOTE: This only applies when not running a Frigate+ model
recognition_threshold: 0.9 # Minimum face distance score required to be considered a match
min_area: 500 # Min area of detected face box to consider running face recognition
min_faces: 1 # Min face recognitions for the sub label to be applied to the person object
save_attempts: 100 # Number of images of recognized faces to save for training
lpr:
enabled: true
detection_threshold: 0.7 # Increase this value to require higher confidence for License plate detection
recognition_threshold: 0.9 # Increase this value to require higher computed score for true positive
min_area: 1000 # Increase to ignore small objects
min_plate_length: 4 # Only recognize plates with 4 or more characters
match_distance: 1 # Allow one character variation in plate matching
classification:
bird:
enabled: true
#Frigate+ models support a more relevant set of objects for security cameras. The labels for annotation in Frigate+ are configurable by editing the camera in the Cameras section of Frigate+. Currently, the following objects are supported:
# People: person, face
# Vehicles: car, motorcycle, bicycle, boat, school_bus, license_plate
# Delivery Logos: amazon, usps, ups, fedex, dhl, an_post, purolator, postnl, nzpost, postnord, gls, dpd, canada_post, royal_mail
# Animals: dog, cat, deer, horse, bird, raccoon, fox, bear, cow, squirrel, goat, rabbit, skunk, kangaroo
# Other: package, waste_bin, bbq_grill, robot_lawnmower, umbrella
#Other object types available in the default Frigate model are not available. Additional object types will be added in future releases.Relevant Frigate log outputNothing i can see here is relevant, but here it is anyway; NOTICE: ONVIF for this camera DOES work, auto tracking does not, but PTZ functions in frigate fully function, not sure why the ONVIF retry.
2025-10-15 00:22:17.687293369 [INFO] Preparing Frigate...
2025-10-15 00:22:17.910078945 [INFO] Starting Frigate...
2025-10-15 00:22:18.873800680 [2025-10-15 00:22:18] frigate.util.config INFO : Checking if frigate config needs migration...
2025-10-15 00:22:18.888682435 [2025-10-15 00:22:18] frigate.util.config INFO : frigate config does not need migration...
2025-10-15 00:22:21.281340168 [2025-10-15 00:22:21] frigate.app INFO : Starting Frigate (0.16.1-e664cb2)
2025-10-15 00:22:21.284045415 [2025-10-15 00:22:21] peewee_migrate.logs INFO : Starting migrations
2025-10-15 00:22:21.308176700 [2025-10-15 00:22:21] peewee_migrate.logs INFO : There is nothing to migrate
2025-10-15 00:22:21.314857764 [2025-10-15 00:22:21] frigate.app INFO : Recording process started: 625
2025-10-15 00:22:21.318061541 [2025-10-15 00:22:21] frigate.app INFO : Review process started: 634
2025-10-15 00:22:21.318963260 [2025-10-15 00:22:21] frigate.app INFO : go2rtc process pid: 128
2025-10-15 00:22:21.324089494 [2025-10-15 00:22:21] detector.onnx INFO : Starting detection process: 650
2025-10-15 00:22:21.324741924 [2025-10-15 00:22:21] frigate.detectors.plugins.onnx INFO : ONNX: loaded onnxruntime module
2025-10-15 00:22:21.330098988 [2025-10-15 00:22:21] frigate.detectors.plugins.onnx INFO : ONNX: loading /config/model_cache/<REDACTED?>
2025-10-15 00:22:21.330849557 [2025-10-15 00:22:21] frigate.app INFO : Embedding process started: 653
2025-10-15 00:22:21.344245104 [2025-10-15 00:22:21] frigate.app INFO : Output process started: 705
2025-10-15 00:22:21.371524706 [2025-10-15 00:22:21] frigate.app INFO : Camera processor started for FrontGate: 738
2025-10-15 00:22:21.377649529 [2025-10-15 00:22:21] frigate.app INFO : Camera processor started for 3DPrinter: 740
2025-10-15 00:22:21.383281394 [2025-10-15 00:22:21] frigate.app INFO : Capture process started for FrontGate: 754
2025-10-15 00:22:21.417019429 [2025-10-15 00:22:21] frigate.app INFO : Capture process started for 3DPrinter: 779
2025-10-15 00:22:21.683344047 [2025-10-15 00:22:21] frigate.api.fastapi_app INFO : Starting FastAPI app
2025-10-15 00:22:21.848311018 [2025-10-15 00:22:21] frigate.api.fastapi_app INFO : FastAPI started
2025-10-15 00:22:22.709689971 [2025-10-15 00:22:22] frigate.detectors.plugins.onnx INFO : ONNX: /config/model_cache/<REDACTED?> loaded
2025-10-15 00:22:23.607161932 loading data from : /config/model_cache/facedet/landmarkdet.yaml
2025-10-15 00:22:23.952871702 INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
2025-10-15 00:25:53.320538863 [2025-10-15 00:25:53] frigate.ptz.onvif INFO : Attempting ONVIF initialization for FrontGate (retry 1/5)Relevant go2rtc log output2025-10-15 00:22:17.851586916 [INFO] Preparing new go2rtc config...
2025-10-15 00:22:18.066798981 [INFO] Starting go2rtc...
2025-10-15 00:22:18.114427542 00:22:18.114 INF go2rtc platform=linux/amd64 revision=fa580c5 version=1.9.9
2025-10-15 00:22:18.114432032 00:22:18.114 INF config path=/dev/shm/go2rtc.yaml
2025-10-15 00:22:18.114675801 00:22:18.114 INF [rtsp] listen addr=:8554
2025-10-15 00:22:18.114720071 00:22:18.114 INF [api] listen addr=:1984
2025-10-15 00:22:18.114851991 00:22:18.114 INF [webrtc] listen addr=:8555
2025-10-15 00:22:27.647312311 [INFO] Starting go2rtc healthcheck service...Frigate statsNo response Operating systemOther Linux Install methodDocker Compose docker-compose file or Docker CLI commandservices: #What containers will be created
frigate: #Service name or something idk
container_name: frigate
privileged: true # this may not be necessary for all setups
restart: always #Will the container restart?
stop_grace_period: 30s # allow enough time to shut down the various services
image: ghcr.io/blakeblackshear/frigate:0.16.1-rocm #Image for frigate version (always use version number instead of "latest" tag, to prevent unwanted updates during compose rebuilds)
shm_size: "40960mb" # update for your cameras based on calculation
deploy: #Here because I was having OOM issues from a driver bug, probably wouldn't have helped, probably doesn't do anything now
resources:
limits:
memory: 2048mb
devices:
- /dev/dri #Config for AMD ROCM
- /dev/kfd # For ROCM
volumes: #Directs persistent data, IE used for the stuff like configs, recordings.
- /etc/localtime:/etc/localtime:ro #Time access I guess
- /home/admin/frigatedocker:/config #Config directory
- /mnt/NVRRAID/Recordings:/media/frigate #Recordings directory, in this case kept OFF the main drive on a RAID array of HDDs
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear #Leave as is
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
- "1984:1984" #WebRTC access
- "8971:8971" #Auth port, if using 2 way audio, you must use this port, and have an HTTPS connection (Using TLS or Nginx)
- "5000:5000" # Internal unauthenticated access. Expose carefully.
- "8554:8554" # RTSP feeds
- "8555:8555/tcp" # WebRTC over tcp
- "8555:8555/udp" # WebRTC over udp
environment: #Stuff pertaining to device access
FRIGATE_RTSP_PASSWORD: "password" #Idk
LIBVA_DRIVER_NAME: "radeonsi" # Add this line for AMD
HSA_OVERRIDE_GFX_VERSION: "11.0.0" #Used for some AMD cards to trick ROCM, i think.
PLUS_API_KEY: "<REDACTED>" #How you prove frigate+ membership.Object DetectorOther Screenshots of the Frigate UI's System metrics pagesNo response Any other information that may be helpfulMy original RTSP stream config was as follows: I added "#rtsp_transport=tcp" because I was having issues of FFmpeg crashes, despite being on Cat6 ethernet cables run into gigabit POE switches. Added "/cam/realmonitor?channel=1&subtype=0" at the behest of AI during my initial 2 way audio troubleshooting, because I think these are rebranded amcrest cameras I'm treating them as such. "#backchannel=0" was previously mentioned for grabbing the camera's alarms. Added secondary stream based on solutions found in existing github issues. I have sub streams I can use, I am willing to try them again, however I /did/ already try moving both RTSP streams onto substreams using the "subtype=X" argument. Using wired connections, using AMD 7900XTX GPU. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
|
Based on the documentation and GitHub discussions, your two-way audio issue with rebranded Dahua/Amcrest cameras appears to be related to the backchannel configuration in your go2rtc streams (1)(2). For two-way audio to work properly, you need to configure your go2rtc stream with go2rtc:
streams:
FrontGateG:
- rtsp://admin:<PASSWORD>@192.168.99.106/cam/realmonitor?channel=1&subtype=0#backchannel=1
- ffmpeg:FrontGateG#audio=opus#audio=aacThe key issues identified in similar cases include:
For devices that support two-way talk, you should also ensure you access Frigate via HTTPS and may require opening port 8971 (3). Your Docker configuration already exposes this port correctly. If you need both camera alarms and two-way audio functionality, this appears to be a limitation where the camera's backchannel can only be used for one purpose at a time (1). Try simplifying your go2rtc configuration to use only the 📚 Sources:
Have another question? Just tag @inkeep. |
Beta Was this translation helpful? Give feedback.
Removing "#rtsp_transport=tcp" and changing the stream type to generic, seems to have solved the non-monotonic error, I don't know why the TCP 'argument' seemed to have worked so well, all I can guess is either the strongest placebo effect ever, or it was breaking the go2rtc settings so bad they ended up working again, thank you for the correction on that, I hadn't seen anything about it in docs and didn't know if it was even actually a thing.
I am guessing the 2 way audio issue is one of firmware, it seems to be an inhouse modified version and I'm guessing it has faulty Onvif support, with the problems it's had with timestamps and stream stability I'm guessing it just won't work.
It had …