question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Support]: Help with config syntax/indentation

See original GitHub issue

Describe the problem you are having

Upgraded from very old Frigate build, all attempts to correct old frigate.yaml with new yaml scheme fail.

Version

2.3

Frigate config file

detectors:
  coral:
    type: edgetpu
    device: usb
mqtt:
  host: 192.168.1.30
  port: 1883
  topic_prefix: frigate
  client_id: frigate
  user: mqtt
  password: password
  stats_interval: 60
cameras:
  lorexobs:
    ffmpeg:
      hwaccel_args:
        - -c:v
        - h264_v4l2m2m
      input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000
      inputs:
        - path: rtsp://viewer:password@192.168.1.96:554/live
          roles:
            - detect
            - rtmp
    objects:
      track:
        - person
        - car
        - truck
        - cat
  detect:
        width: 1024
        height: 768
        fps: 5
      snapshots:
        enabled: true
        bounding_box: true
    zones:
      backyard:
        coordinates: 346,506,680,505,679,269,347,264
      backyard_2:
        coordinates: 689,506,1024,506,1024,267,686,266
      driveway:
        coordinates: 684,251,1024,253,1024,0,686,0
      front_door:
        coordinates: 0,768,341,768,340,528,0,526
      garage:
        coordinates: 346,250,679,252,679,0,347,0
      patio:
        coordinates: 0,506,342,506,340,263,0,262
      side_door:
        coordinates: 344,0,344,251,0,247,0,0

    motion:
      mask:
        - 264,35,275,50,258,56,87,57,85,40,91,23,92,48,57,48,58,25
        - 605,0,681,0,682,32,682,66,641,78,567,56,343,58,341,0
        - 686,94,1024,84,1024,0,684,0
        - 0,334,338,319,344,265,0,264
        - 610,290,603,306,434,307,429,292
        - 688,509,770,393,883,345,997,268,982,512,1024,508,1024,320,1024,165,1024,260,921,263,689,264
        - 95,547,264,546,269,562,95,561
        - 340,524,340,768,255,768,303,534
        - 39,628,85,622,93,588,43,596
        - 689,365,685,324,680,268,592,257,552,255,507,265,636,321,634,368,575,418,578,501,683,502
        - 0,267,123,278,74,74,96,46,103,0,56,0,29,0,0,0,0,0
        - 347,768,1024,768,1024,514,346,512
        - 149,398,209,385,211,331,140,328
        - 206,497,268,499,286,460,222,455

Relevant log output

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[2022-01-19 01:04:07] frigate.app                    INFO    : Starting Frigate (0.9.4-26ae608)
*************************************************************
*************************************************************
***    Your config file is not valid!                     ***
***    Please check the docs at                           ***
***    https://docs.frigate.video/configuration/index     ***
*************************************************************
*************************************************************
***    Config Validation Errors                           ***
*************************************************************
while parsing a block mapping
  in "<unicode string>", line 14, column 3:
      lorexobs:
      ^
expected <block end>, but found '<block mapping start>'
  in "<unicode string>", line 35, column 7:
          snapshots:
          ^
*************************************************************
***    End Config Validation Errors                       ***
*************************************************************

FFprobe output from your camera

C:\Users\SFF\Downloads\ffprobe-4.4.1-win-64>ffprobe rtsp://viewer:password@192.168.1.96:554/live
ffprobe version 4.4.1-full_build-www.gyan.dev Copyright (c) 2007-2021 the FFmpeg developers
  built with gcc 11.2.0 (Rev1, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
[h264 @ 000001c453544000] Truncated VUI (0)
    Last message repeated 1 times
Input #0, rtsp, from 'rtsp://viewer:password@192.168.1.96:554/live':
  Duration: N/A, start: 0.050000, bitrate: N/A
  Stream #0:0: Video: h264 (High), yuv420p(progressive), 1024x768 [SAR 1:1 DAR 4:3], 20 fps, 20 tbr, 90k tbn, 40 tbc
[h264 @ 000001c45387f500] Truncated VUI (0)

Frigate stats

No response

Operating system

HassOS

Install method

HassOS Addon

Coral version

USB

Network connection

Wired

Camera make and model

OBS stream

Any other information that may be helpful

Previously working config:

detectors:
  coral:
    type: edgetpu
    device: usb
mqtt:
  host: 192.168.1.30
  port: 1883
  topic_prefix: frigate
  client_id: frigate
  user: mqtt
  password: password
  stats_interval: 60
cameras:
  lorexobs:
    ffmpeg:
      hwaccel_args:
        - -c:v
        - h264_v4l2m2m
      inputs:
        - path: rtsp://viewer:password@192.168.1.96:554/live
          roles:
            - detect
            - rtmp
      input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000
    objects:
      track:
        - person
        - car
        - truck
        - cat
    width: 1024
    height: 768
    fps: 5
    snapshots:
      enabled: true
      bounding_box: true
    zones:
      backyard:
        coordinates: 346,506,680,505,679,269,347,264
      backyard_2:
        coordinates: 689,506,1024,506,1024,267,686,266
      driveway:
        coordinates: 684,251,1024,253,1024,0,686,0
      front_door:
        coordinates: 0,768,341,768,340,528,0,526
      garage:
        coordinates: 346,250,679,252,679,0,347,0
      patio:
        coordinates: 0,506,342,506,340,263,0,262
      side_door:
        coordinates: 344,0,344,251,0,247,0,0

    motion:
      mask:
        - 264,35,275,50,258,56,87,57,85,40,91,23,92,48,57,48,58,25
        - 605,0,681,0,682,32,682,66,641,78,567,56,343,58,341,0
        - 686,94,1024,84,1024,0,684,0
        - 0,334,338,319,344,265,0,264
        - 610,290,603,306,434,307,429,292
        - 688,509,770,393,883,345,997,268,982,512,1024,508,1024,320,1024,165,1024,260,921,263,689,264
        - 95,547,264,546,269,562,95,561
        - 340,524,340,768,255,768,303,534
        - 39,628,85,622,93,588,43,596
        - 689,365,685,324,680,268,592,257,552,255,507,265,636,321,634,368,575,418,578,501,683,502
        - 0,267,123,278,74,74,96,46,103,0,56,0,29,0,0,0,0,0
        - 347,768,1024,768,1024,514,346,512
        - 149,398,209,385,211,331,140,328
        - 206,497,268,499,286,460,222,455

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
NickM-27commented, Jan 20, 2022

@lucifudge It looks like your detect, snapshots, zones all need 2 more spaces. They only have 2 spaces of indent which puts them at the same level of camera (so it is probably treating them like cameras and not finding ffmpeg.

0reactions
lucifudgecommented, Jan 20, 2022

Adjusted that, but still not working.

The ‘ffmpeg’ area of my config file reported not valid per logs. Attempting to access the web UI doesn’t work/crashes Home Assistant.

Frigate Log:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[2022-01-19 21:20:10] frigate.app                    INFO    : Starting Frigate (0.9.4-26ae608)
*************************************************************
*************************************************************
***    Your config file is not valid!                     ***
***    Please check the docs at                           ***
***    https://docs.frigate.video/configuration/index     ***
*************************************************************
*************************************************************
***    Config Validation Errors                           ***
*************************************************************
'ffmpeg'
*************************************************************
***    End Config Validation Errors                       ***
*************************************************************
[cmd] python3 exited 1
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.

frigate.yml

detectors:
  coral:
    type: edgetpu
    device: usb
mqtt:
  host: 192.168.1.30
  port: 1883
  topic_prefix: frigate
  client_id: frigate
  user: mqtt
  password: password
  stats_interval: 60
cameras:
  lorexobs:
    ffmpeg:
      hwaccel_args:
        - -c:v
        - h264_v4l2m2m
      input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000
      inputs:
        - path: rtsp://viewer:password@192.168.1.96:554/live
          roles:
            - detect
            - rtmp
    objects:
      track:
        - person
        - car
        - truck
        - cat
  detect:
    width: 1024
    height: 768
    fps: 5
  snapshots:
    enabled: true
    bounding_box: true
  zones:
    backyard:
      coordinates: 346,506,680,505,679,269,347,264
    backyard_2:
      coordinates: 689,506,1024,506,1024,267,686,266
    driveway:
      coordinates: 684,251,1024,253,1024,0,686,0
    front_door:
      coordinates: 0,768,341,768,340,528,0,526
    garage:
      coordinates: 346,250,679,252,679,0,347,0
    patio:
      coordinates: 0,506,342,506,340,263,0,262
    side_door:
      coordinates: 344,0,344,251,0,247,0,0

  motion:
    mask:
      - 264,35,275,50,258,56,87,57,85,40,91,23,92,48,57,48,58,25
      - 605,0,681,0,682,32,682,66,641,78,567,56,343,58,341,0
      - 686,94,1024,84,1024,0,684,0
      - 0,334,338,319,344,265,0,264
      - 610,290,603,306,434,307,429,292
      - 688,509,770,393,883,345,997,268,982,512,1024,508,1024,320,1024,165,1024,260,921,263,689,264
      - 95,547,264,546,269,562,95,561
      - 340,524,340,768,255,768,303,534
      - 39,628,85,622,93,588,43,596
      - 689,365,685,324,680,268,592,257,552,255,507,265,636,321,634,368,575,418,578,501,683,502
      - 0,267,123,278,74,74,96,46,103,0,56,0,29,0,0,0,0,0
      - 347,768,1024,768,1024,514,346,512
      - 149,398,209,385,211,331,140,328
      - 206,497,268,499,286,460,222,455
Read more comments on GitHub >

github_iconTop Results From Across the Web

EditorConfig properties for C++: Indentation and Alignment
EditorConfig properties for C++: Indentation and Alignment · Indentation · Align multiline construct · Align similar code in columns.
Read more >
Avoid YAML formatting problems | Heartbeat Reference [8.5]
Indentation is meaningful in YAML. Make sure that you use spaces, rather than tab characters, to indent sections. In the default configuration files...
Read more >
EditorConfig settings - Visual Studio (Windows) - Microsoft Learn
Create portable, custom editor settings with EditorConfig · Code consistency · Supported settings · Add and remove EditorConfig files · File ...
Read more >
EditorConfig
EditorConfig helps maintain consistent coding styles for multiple ... Below is an example .editorconfig file setting end-of-line and indentation styles for ...
Read more >
Why You Should Use EditorConfig to Standardize Code Styles
EditorConfig on its own is just a vendor-agnostic configuration file. It relies on third-party tools or integrations to implement support ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found