[Config Support]: How to set up WebRTC correctly? #15161
-
Describe the problem you are havingI'm trying to get a good live image in the Frigate UI and in Home Assistant and wanted to switch to WebRTC. I think I understand that go2rtc is required for this and that this is included in Frigate from version 0.12. I added the go2rtc section to the configuration and changed the camera path. Unfortunately, the live image in the UI remains pixelated and has a latency of about 3 seconds. What am I doing wrong? Version0.14.1 Frigate config filemqtt:
enabled: true
host: 192.168.2.30
port: 1883
user: mqtt
password: 8dgPhFWE4b8BvvhTLz9MtpuVuKg6sUsx
ffmpeg:
hwaccel_args: preset-vaapi
detectors:
coral:
type: edgetpu
device: usb
objects:
track:
- person
- car
- cat
- dog
filters:
person:
threshold: 0.8
car:
threshold: 0.7
cat:
threshold: 0.7
dog:
threshold: 0.8
go2rtc:
streams:
carport_main:
- rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0
carport_sub:
- rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=2
terrasse_main:
- rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0
terrasse_sub:
- rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=2
freisitz_main:
- rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0
freisitz_sub:
- rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=2
cameras:
Carport_Kamera:
enabled: true
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/carport_main
input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://127.0.0.1:8554/carport_sub
input_args: preset-rtsp-restream
roles:
- detect
motion:
mask:
0.998,0.004,1,0.515,0.802,0.518,0.752,0.451,0.772,0.322,0.666,0.266,0.567,0.21,0.595,0.256,0.499,0.29,0.402,0.222,0.51,0.183,0.508,0.001
zones:
Carport_Zone_Parkplatz:
coordinates: 429,146,35,331,109,506,248,720,950,720,1024,365,968,326,984,281,708,193,608,177
objects:
- person
- cat
- dog
Carport_Zone_Auffahrt:
coordinates: 704,188,984,281,992,250,982,233,728,155,750,180
objects:
- person
- car
- cat
- dog
objects:
filters:
car:
mask:
- 1280,0,1280,299
record:
enabled: true
retain:
days: 7
mode: motion
events:
retain:
default: 30
mode: motion
snapshots:
enabled: true
retain:
default: 30
required_zones:
- Carport_Zone_Parkplatz
- Carport_Zone_Auffahrt
review:
alerts:
required_zones:
- Carport_Zone_Parkplatz
- Carport_Zone_Auffahrt
Terrasse_Kamera:
enabled: true
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/terrasse_main
input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://127.0.0.1:8554/terrasse_sub
input_args: preset-rtsp-restream
roles:
- detect
motion:
mask:
- 0.854,0,1,0.068,1,0.332,0.972,0.512,0.812,0.397
- 0.616,0.267,0.756,0.369,0.787,0,0.624,0
- 0.689,0.087,0.969,0.099,0.967,0.028,0.688,0.026
- 0,0,0.572,0,0.561,0.238,0,0.486
zones:
Terrasse_Zone_Flaeche:
coordinates: 1183,720,105,720,67,326,688,168,975,273,1280,403,1280,485
objects:
- person
- cat
- dog
record:
enabled: true
retain:
days: 7
mode: motion
events:
retain:
default: 30
mode: motion
snapshots:
enabled: true
retain:
default: 30
required_zones:
- Terrasse_Zone_Flaeche
review:
alerts:
required_zones:
- Terrasse_Zone_Flaeche
Freisitz_Kamera:
enabled: true
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/freisitz_main
input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://127.0.0.1:8554/freisitz_sub
input_args: preset-rtsp-restream
roles:
- detect
motion:
mask:
- 0,0,0.484,0,0.487,0.309,0,0.684
- 0.585,0.314,0.577,0.575,0.444,0.553,0.433,0.349,0.49,0.309
- 0.487,0.308,0.484,0,0.684,0,0.67,0.321
- 0.962,0.101,0.961,0.029,0.677,0.029,0.675,0.096
zones:
Freisitz_Zone_Flaeche:
coordinates: 0,0.815,0.198,1,0.658,1,0.665,0.448,0.618,0.317,0.487,0.309,0,0.579
objects:
- person
- cat
- dog
inertia: 3
loitering_time: 0
record:
enabled: true
retain:
days: 7
mode: motion
events:
retain:
default: 30
mode: motion
snapshots:
enabled: true
retain:
default: 30
required_zones:
- Freisitz_Zone_Flaeche
review:
alerts:
required_zones:
- Freisitz_Zone_Flaeche
version: 0.14 Relevant Frigate log output2024-11-24 17:04:28.170812247 [INFO] Preparing Frigate...
2024-11-24 17:04:28.190872546 [INFO] Starting Frigate...
2024-11-24 17:04:29.511613146 [2024-11-24 17:04:29] frigate.app INFO : Starting Frigate (0.14.1-f4f3cfa)
2024-11-24 17:04:29.511801921 [2024-11-24 17:04:29] frigate.util.config INFO : Checking if frigate config needs migration...
2024-11-24 17:04:29.551725162 [2024-11-24 17:04:29] frigate.util.config INFO : frigate config does not need migration...
2024-11-24 17:04:47.516608526 [2024-11-24 17:04:47] peewee_migrate.logs INFO : Starting migrations
2024-11-24 17:04:47.517238569 [2024-11-24 17:04:47] peewee_migrate.logs INFO : There is nothing to migrate
2024-11-24 17:04:47.532877905 [2024-11-24 17:04:47] frigate.app INFO : Recording process started: 376
2024-11-24 17:04:47.532883185 [2024-11-24 17:04:47] frigate.app INFO : Recording process started: 382
2024-11-24 17:04:47.535700941 [2024-11-24 17:04:47] frigate.app INFO : go2rtc process pid: 102
2024-11-24 17:04:47.558486483 [2024-11-24 17:04:47] detector.coral INFO : Starting detection process: 405
2024-11-24 17:04:50.206439696 [2024-11-24 17:04:47] frigate.app INFO : Output process started: 410
2024-11-24 17:04:50.206763815 [2024-11-24 17:04:47] frigate.app INFO : Camera processor started for Carport_Kamera: 434
2024-11-24 17:04:50.206949277 [2024-11-24 17:04:47] frigate.app INFO : Camera processor started for Terrasse_Kamera: 436
2024-11-24 17:04:50.207086683 [2024-11-24 17:04:47] frigate.app INFO : Camera processor started for Freisitz_Kamera: 444
2024-11-24 17:04:50.207201341 [2024-11-24 17:04:47] frigate.app INFO : Capture process started for Carport_Kamera: 451
2024-11-24 17:04:50.207320690 [2024-11-24 17:04:47] frigate.app INFO : Capture process started for Terrasse_Kamera: 457
2024-11-24 17:04:50.207472749 [2024-11-24 17:04:47] frigate.app INFO : Capture process started for Freisitz_Kamera: 466
2024-11-24 17:04:50.212271161 [2024-11-24 17:04:47] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as usb
2024-11-24 17:04:50.212445834 [2024-11-24 17:04:50] frigate.detectors.plugins.edgetpu_tfl INFO : TPU found Relevant go2rtc log output2024-11-24 17:04:28.172404031 [INFO] Preparing new go2rtc config...
2024-11-24 17:04:28.655471237 [INFO] Starting go2rtc...
2024-11-24 17:04:28.857249675 17:04:28.857 INF go2rtc platform=linux/amd64 revision=b2399f3 version=1.9.2
2024-11-24 17:04:28.857433546 17:04:28.857 INF config path=/dev/shm/go2rtc.yaml
2024-11-24 17:04:28.857948966 17:04:28.857 INF [rtsp] listen addr=:8554
2024-11-24 17:04:28.858202076 17:04:28.858 INF [webrtc] listen addr=:8555/tcp
2024-11-24 17:04:28.859875234 17:04:28.859 INF [api] listen addr=:1984
2024-11-24 17:04:38.174852108 [INFO] Starting go2rtc healthcheck service... Frigate statsNo response Operating systemDebian Install methodDocker Compose docker-compose file or Docker CLI commandservices:
frigate:
container_name: frigate
privileged: true # this may not be necessary for all setups
restart: unless-stopped
image: ghcr.io/blakeblackshear/frigate:stable
shm_size: "128mb" # update for your cameras based on calculation above
devices:
- /dev/bus/usb:/dev/bus/usb # Passes the USB Coral, needs to be modified for other versions
- /dev/dri/renderD128:/dev/dri/renderD128 # For intel hwaccel, needs to be updated for your hardware
volumes:
- /etc/localtime:/etc/localtime:ro
- /home/frank/frigate/config:/config
- /home/frank/frigate/media:/media/frigate
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
- "5000:5000"
- "8554:8554" # RTSP feeds
- "8555:8555/tcp" # WebRTC over tcp
- "8555:8555/udp" # WebRTC over udp
environment:
FRIGATE_RTSP_PASSWORD: "xxx" Object DetectorCoral Screenshots of the Frigate UI's System metrics pagesNo response Any other information that may be helpfulNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You have not configured webrtc https://docs.frigate.video/configuration/live#webrtc-extra-configuration You also haven't named the streams the same as the cameras so that is also causing issues |
Beta Was this translation helpful? Give feedback.
You have not configured webrtc https://docs.frigate.video/configuration/live#webrtc-extra-configuration
You also haven't named the streams the same as the cameras so that is also causing issues