Duplicate-key error when saving config.yaml #15620
-
Describe the problem you are havingGreetings, I have 5 cameras and all are working fine. Although I’m having trouble with the last one on my list. It is a Reolink Doorbell WIFI. FrontDoorMain and FrontDoorSub Versionfrigate:0.15.0-beta3-tensorrt Frigate config filemqtt:
host: 192.168.xx.10
port: 1883
user: homeassistant
password: xxxxxxxxxxxxxxxxxxxx
ffmpeg:
hwaccel_args: preset-nvidia-h264
go2rtc:
streams:
DrivewayCam:
ffmpeg:rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0
DrivewayCamSub:
ffmpeg:rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=1
YardCam:
ffmpeg:rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0
YardCamSub:
ffmpeg:rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=1
PatioCam:
ffmpeg:rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0
PatioCamSub:
ffmpeg:rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=1
FrontCam:
ffmpeg:rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0
FrontCamSub:
ffmpeg:rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=1
FrontDoorMain:
ffmpeg:rtsp://admin:[email protected]:554/h265Preview_01_main
FrontDoorSub:
ffmpeg:rtsp://admin:[email protected]:554/h265Preview_01_sub
cameras:
FrontDoorBell:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/FrontDoorMain
input_args: preset-rtsp-restream
roles:
- record
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/FrontDoorSub
input_args: preset-rtsp-restream
roles:
- detect Relevant Frigate log outputConfig Error:
Traceback (most recent call last):
File "/opt/frigate/frigate/api/app.py", line 187, in config_save
FrigateConfig.parse_yaml(new_config)
File "/opt/frigate/frigate/config/config.py", line 700, in parse_yaml
return cls.parse(config_yaml, is_json=False, **context)
File "/opt/frigate/frigate/config/config.py", line 693, in parse
config = yaml.load(config)
File "/usr/local/lib/python3.9/dist-packages/ruamel/yaml/main.py", line 451, in load
return constructor.get_single_data()
File "/usr/local/lib/python3.9/dist-packages/ruamel/yaml/constructor.py", line 116, in get_single_data
return self.construct_document(node)
File "/usr/local/lib/python3.9/dist-packages/ruamel/yaml/constructor.py", line 125, in construct_document
for _dummy in generator:
File "/usr/local/lib/python3.9/dist-packages/ruamel/yaml/constructor.py", line 1476, in construct_yaml_map
self.construct_mapping(node, data, deep=True)
File "/usr/local/lib/python3.9/dist-packages/ruamel/yaml/constructor.py", line 1365, in construct_mapping
value = self.construct_object(value_node, deep=deep)
File "/usr/local/lib/python3.9/dist-packages/ruamel/yaml/constructor.py", line 147, in construct_object
data = self.construct_non_recursive_object(node)
File "/usr/local/lib/python3.9/dist-packages/ruamel/yaml/constructor.py", line 188, in construct_non_recursive_object
for _dummy in generator:
File "/usr/local/lib/python3.9/dist-packages/ruamel/yaml/constructor.py", line 1476, in construct_yaml_map
self.construct_mapping(node, data, deep=True)
File "/usr/local/lib/python3.9/dist-packages/ruamel/yaml/constructor.py", line 1365, in construct_mapping
value = self.construct_object(value_node, deep=deep)
File "/usr/local/lib/python3.9/dist-packages/ruamel/yaml/constructor.py", line 147, in construct_object
data = self.construct_non_recursive_object(node)
File "/usr/local/lib/python3.9/dist-packages/ruamel/yaml/constructor.py", line 188, in construct_non_recursive_object
for _dummy in generator:
File "/usr/local/lib/python3.9/dist-packages/ruamel/yaml/constructor.py", line 1476, in construct_yaml_map
self.construct_mapping(node, data, deep=True)
File "/usr/local/lib/python3.9/dist-packages/ruamel/yaml/constructor.py", line 1366, in construct_mapping
if self.check_mapping_key(node, key_node, maptyp, key, value):
File "/usr/local/lib/python3.9/dist-packages/ruamel/yaml/constructor.py", line 278, in check_mapping_key
raise DuplicateKeyError(*args)
ruamel.yaml.constructor.DuplicateKeyError: while constructing a mapping
in "<unicode string>", line 37, column 5:
ffmpeg:
^ (line: 37)
found duplicate key "ffmpeg" with value "{'inputs': [{'path': 'rtsp://127.0.0.1:8554/FrontDoorSub', 'input_args': 'preset-rtsp-restream', 'roles': ['detect']}]}" (original value: "{'inputs': [{'path': 'rtsp://127.0.0.1:8554/FrontDoorMain', 'input_args': 'preset-rtsp-restream', 'roles': ['record']}]}")
in "<unicode string>", line 43, column 5:
ffmpeg:
^ (line: 43)
To suppress this check see:
http://yaml.readthedocs.io/en/latest/api.html#duplicate-keys Relevant go2rtc log outputn/a Frigate statsNo response Operating systemDebian Install methodDocker Compose docker-compose file or Docker CLI commandservices:
frigate:
container_name: frigate
privileged: true
restart: unless-stopped
image: ghcr.io/blakeblackshear/frigate:0.15.0-beta3-tensorrt
shm_size: "2g"
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
volumes:
- /etc/localtime:/etc/localtime:ro
- /home/peter/frigate/config:/config
- /home/peter/frigate/:/media/frigate
- type: tmpfs # 1GB of memory
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
- "5000:5000" # Port used by the Web UI
- "8554:8554" # RTSP feeds
- "8555:8555/tcp" # WebRTC over tcp
- "8555:8555/udp" # WebRTC over udp
- "8971:8971"
environment:
FRIGATE_RTSP_PASSWORD: xxxxxxx
YOLO_MODELS: yolov7x-640 Object DetectorTensorRT 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: 3 comments 2 replies
-
You are not defining the streams correctly, please see the docs https://docs.frigate.video/configuration/camera_specific#reolink-cameras |
Beta Was this translation helpful? Give feedback.
-
Greetings. Thanks for the reply. I really don't have a problem streaming from the ReoLink using the above go2rtc statements. Frigate works fine using channel 1, main or sub. I can stream to VLC (and Frigate) using the above streams and they both work with the correct pixel resolution. |
Beta Was this translation helpful? Give feedback.
-
I shall hence forth refer to myself as "King Dope" , "Prince of Stupidity" |
Beta Was this translation helpful? Give feedback.
Because you are not entering a valid config. You are duplicating the ffmpeg key which is wrong. If you look at the example I linked you can see that two streams are configured but of course there is only one ffmpeg key