Jump to content

[SUPPORT] blakeblackshear - Frigate


Recommended Posts

Is there an “idiots guide” to setting this up?  It took me about a month of troubleshooting and reading the docs on the older version and, I eventually got it up and running.  I saw that an upgrade was available and there was no way I was going to attempt it after reading the docs as far as what was required to get the new version running.  So, I left it alone.  Unfortunately for me, I had to stop my Docker service to do some maintenance and the old version of Frigate, for whatever reason, would no longer launch.  I made a backup of my config.yml file and attempted to install the new version to no avail.  The docs aren't exactly idiot/user-friendly.  There has got to be a better “how to” video/webpage out there that I can't find to assist in getting this new version back up and running?

  • Upvote 1
Link to comment

Need some help, when trying to generate models using the tensorrt-models docker

 

 

When trying to grab tensorrt_models.sh using the link in the template I get a "404: Not Found" error

https://raw.githubusercontent.com/blakeblackshear/frigate/dev/docker/tensorrt_models.sh

 

Using the link in the documentation https://docs.frigate.video/configuration/detectors

https://github.com/blakeblackshear/frigate/raw/master/docker/tensorrt_models.sh

 

open console and run the following

chmod +x /mnt/user/appdata/trt-models/tensorrt_models.sh

 

I can't execute or start the docker it gives me

Execution error

Bad parameter

 

I get the following error in the logs

text  error  warn  system  array  login  

/opt/nvidia/nvidia_entrypoint.sh: /tensorrt_models.sh: /bin/bash^M: bad interpreter: No such file or directory
/opt/nvidia/nvidia_entrypoint.sh: line 49: /tensorrt_models.sh: Success
/opt/nvidia/nvidia_entrypoint.sh: /tensorrt_models.sh: /bin/bash^M: bad interpreter: No such file or directory
/opt/nvidia/nvidia_entrypoint.sh: line 49: /tensorrt_models.sh: Success

 

image.thumb.png.af5c9fdd267686f5e7302ba96e12efdf.png

 

Edited by Pure
Link to comment

Thanks so much for this container.

 

Have it set up pretty well so far (ignore stationary objects & set threshold for object detection) Am using i9 11-900t 35w chip and a corel usb. As an example it averages around 40-60% cpu vs plex doing video thumbnails is using 130% cpu usage.

 

Running full res detection on front of house and reduced on others. So that snapshots are better quality where needed.

 

Once I have MQQT set up I might investigate using low res motion to take a still from the full res stream. Do any of you guys do this?

 

mqtt:
  enabled: false
  host: 192.168.22.212
  port: 1883
   # Optional: topic prefix (default: shown below)
  # WARNING: must be unique if you are running multiple instances
  topic_prefix: frigate
  # Optional: client id (default: shown below)
  # WARNING: must be unique if you are running multiple instances
  client_id: frigate
  # Optional: user
  user: homeassistant
  # Optional: password
  # NOTE: Environment variables that begin with 'FRIGATE_' may be referenced in {}.
  #       eg. password: '{FRIGATE_MQTT_PASSWORD}'
  password: x
  # Optional: interval in seconds for publishing stats (default: shown below)
  stats_interval: 60

go2rtc:
  streams:
    barn_inside:
      - rtsp://pSrUq7TZ:[email protected]:554/live/ch0
    house_front_door:
      - rtsp://EWLHSHKY:[email protected]:554/live/ch0


ffmpeg:
  output_args:
    record: preset-record-generic-audio-aac
  hwaccel_args: 
    - -hwaccel
    - qsv 
    - -qsv_device 
    - /dev/dri/renderD128 
    - -hwaccel_output_format
    - yuv420p  
  
detectors:
  coral:
    type: edgetpu
    device: usb   

cameras:
  barn_inside:
    snapshots:
      enabled: true
    ffmpeg:
      output_args:
        record: preset-record-generic-audio-aac
      hwaccel_args: preset-intel-qsv-h264

      inputs:
        - path: rtsp://pSrUq7TZ:[email protected]:554/live/ch1
          roles:
            - detect
        - path: rtsp://192.168.22.2:8554/barn_inside?mp4
          roles:
            - record
    detect:
      width: 768
      height: 432
      fps: 5
      stationary:
        interval: 0
        threshold: 70
    objects:
      track:
        - person
        - cat
        - bird
        - cell phone
        - banana
        - wine glass
        - backpack  
    record:
      enabled: True
      retain:
        days: 7
        mode: motion
      events:
        retain:
          default: 14
          mode: active_objects  
    
  house_front_door:
    snapshots:
      enabled: true
    ffmpeg:
      output_args:
        record: preset-record-generic-audio-aac 
      hwaccel_args: preset-intel-qsv-h264
      inputs:
        - path: rtsp://EWLHSHKY:[email protected]:554/live/ch0
          roles:
            - detect
        - path: rtsp://192.168.22.2:8554/house_front_door?mp4
          roles:
            - record
    detect:
      width: 1920  
      height: 1080
      fps: 5
      stationary:
        interval: 0
        threshold: 70
    motion:
      mask:
        - 956,720,1280,720,1280,409,1174,363,1036,419,956,527
        - 891,200,985,229,1140,204,1189,117,1137,59,916,46,782,122
        - 1280,0,1280,37,874,40,872,0
        - 690,146,690,212,513,216,514,150
        - 268,399,333,497,523,480,515,359,403,275
        - 412,720,637,699,474,604,363,518,275,533,223,570,311,656      
    objects:
      track:
        - person
        - car
        - dog
        - cat
        - bird
        - bicycle
        - motorcycle
        - cell phone
        - backpack
        - horse
      filters:
        car:
          threshold: 0.7
          min_area: 1000
          max_area: 100000
        person:
          threshold: 0.7
          min_area: 1000
          max_area: 100000
    record:
      enabled: True
      retain:
        days: 7
        mode: motion
      events:
        retain:
          default: 14
          mode: active_objects 

 

Edited by dopeytree
Link to comment
On 7/14/2023 at 3:38 PM, MothyTim said:

Hi, I had a frustrating day yesterday trying to upgrade to v0.12 gave up in the end and rolled back to v0.11.1! I went through the release notes and changed the things I thought and while the docker image was running I had no acces the the gui and the logs wouldn't even open! It was like the log window would crash as soon as it opened! So without a log to see what the errors were I was stuck! Please if someone has time to look at my current config file and point out the bits I need to change, then I'll have another go at it! Cheers Tim

config.yml 9.03 kB · 4 downloads

Please you should read the docs, you should change a lot of thing so I can't tell you every single thing if you don't at least read the documentation that is pretty complete.

Link to comment
On 7/14/2023 at 9:13 PM, CoZ said:

Is there an “idiots guide” to setting this up?  It took me about a month of troubleshooting and reading the docs on the older version and, I eventually got it up and running.  I saw that an upgrade was available and there was no way I was going to attempt it after reading the docs as far as what was required to get the new version running.  So, I left it alone.  Unfortunately for me, I had to stop my Docker service to do some maintenance and the old version of Frigate, for whatever reason, would no longer launch.  I made a backup of my config.yml file and attempted to install the new version to no avail.  The docs aren't exactly idiot/user-friendly.  There has got to be a better “how to” video/webpage out there that I can't find to assist in getting this new version back up and running?

Blame/ask for help in the correct place if you have doubts about the container config itself: https://github.com/blakeblackshear/frigate/discussions

Link to comment
On 7/15/2023 at 12:11 PM, Pure said:

Need some help, when trying to generate models using the tensorrt-models docker

 

 

When trying to grab tensorrt_models.sh using the link in the template I get a "404: Not Found" error

https://raw.githubusercontent.com/blakeblackshear/frigate/dev/docker/tensorrt_models.sh

 

Using the link in the documentation https://docs.frigate.video/configuration/detectors

https://github.com/blakeblackshear/frigate/raw/master/docker/tensorrt_models.sh

 

open console and run the following

chmod +x /mnt/user/appdata/trt-models/tensorrt_models.sh

 

I can't execute or start the docker it gives me

Execution error

Bad parameter

 

I get the following error in the logs

text  error  warn  system  array  login  

/opt/nvidia/nvidia_entrypoint.sh: /tensorrt_models.sh: /bin/bash^M: bad interpreter: No such file or directory
/opt/nvidia/nvidia_entrypoint.sh: line 49: /tensorrt_models.sh: Success
/opt/nvidia/nvidia_entrypoint.sh: /tensorrt_models.sh: /bin/bash^M: bad interpreter: No such file or directory
/opt/nvidia/nvidia_entrypoint.sh: line 49: /tensorrt_models.sh: Success

 

image.thumb.png.af5c9fdd267686f5e7302ba96e12efdf.png

 

Does "chmod +x /mnt/user/appdata/trt-models/tensorrt_models.sh" give you some output?

 

Do you have the /mnt/user/appdata/trt-models folder mapped already to frigate and frigate running?

Link to comment
21 hours ago, dopeytree said:

Thanks so much for this container.

 

Have it set up pretty well so far (ignore stationary objects & set threshold for object detection) Am using i9 11-900t 35w chip and a corel usb. As an example it averages around 40-60% cpu vs plex doing video thumbnails is using 130% cpu usage.

 

Running full res detection on front of house and reduced on others. So that snapshots are better quality where needed.

 

Once I have MQQT set up I might investigate using low res motion to take a still from the full res stream. Do any of you guys do this?

 

mqtt:
  enabled: false
  host: 192.168.22.212
  port: 1883
   # Optional: topic prefix (default: shown below)
  # WARNING: must be unique if you are running multiple instances
  topic_prefix: frigate
  # Optional: client id (default: shown below)
  # WARNING: must be unique if you are running multiple instances
  client_id: frigate
  # Optional: user
  user: homeassistant
  # Optional: password
  # NOTE: Environment variables that begin with 'FRIGATE_' may be referenced in {}.
  #       eg. password: '{FRIGATE_MQTT_PASSWORD}'
  password: x
  # Optional: interval in seconds for publishing stats (default: shown below)
  stats_interval: 60

go2rtc:
  streams:
    barn_inside:
      - rtsp://pSrUq7TZ:[email protected]:554/live/ch0
    house_front_door:
      - rtsp://EWLHSHKY:[email protected]:554/live/ch0


ffmpeg:
  output_args:
    record: preset-record-generic-audio-aac
  hwaccel_args: 
    - -hwaccel
    - qsv 
    - -qsv_device 
    - /dev/dri/renderD128 
    - -hwaccel_output_format
    - yuv420p  
  
detectors:
  coral:
    type: edgetpu
    device: usb   

cameras:
  barn_inside:
    snapshots:
      enabled: true
    ffmpeg:
      output_args:
        record: preset-record-generic-audio-aac
      hwaccel_args: preset-intel-qsv-h264

      inputs:
        - path: rtsp://pSrUq7TZ:[email protected]:554/live/ch1
          roles:
            - detect
        - path: rtsp://192.168.22.2:8554/barn_inside?mp4
          roles:
            - record
    detect:
      width: 768
      height: 432
      fps: 5
      stationary:
        interval: 0
        threshold: 70
    objects:
      track:
        - person
        - cat
        - bird
        - cell phone
        - banana
        - wine glass
        - backpack  
    record:
      enabled: True
      retain:
        days: 7
        mode: motion
      events:
        retain:
          default: 14
          mode: active_objects  
    
  house_front_door:
    snapshots:
      enabled: true
    ffmpeg:
      output_args:
        record: preset-record-generic-audio-aac 
      hwaccel_args: preset-intel-qsv-h264
      inputs:
        - path: rtsp://EWLHSHKY:[email protected]:554/live/ch0
          roles:
            - detect
        - path: rtsp://192.168.22.2:8554/house_front_door?mp4
          roles:
            - record
    detect:
      width: 1920  
      height: 1080
      fps: 5
      stationary:
        interval: 0
        threshold: 70
    motion:
      mask:
        - 956,720,1280,720,1280,409,1174,363,1036,419,956,527
        - 891,200,985,229,1140,204,1189,117,1137,59,916,46,782,122
        - 1280,0,1280,37,874,40,872,0
        - 690,146,690,212,513,216,514,150
        - 268,399,333,497,523,480,515,359,403,275
        - 412,720,637,699,474,604,363,518,275,533,223,570,311,656      
    objects:
      track:
        - person
        - car
        - dog
        - cat
        - bird
        - bicycle
        - motorcycle
        - cell phone
        - backpack
        - horse
      filters:
        car:
          threshold: 0.7
          min_area: 1000
          max_area: 100000
        person:
          threshold: 0.7
          min_area: 1000
          max_area: 100000
    record:
      enabled: True
      retain:
        days: 7
        mode: motion
      events:
        retain:
          default: 14
          mode: active_objects 

 

I think you can't but you can open a discussion here: https://github.com/blakeblackshear/frigate/discussions

Link to comment
3 hours ago, yayitazale said:

Please you should read the docs, you should change a lot of thing so I can't tell you every single thing if you don't at least read the documentation that is pretty complete.

Ok, did that for hours! I'll stick with v11 as it works! Whilst I appreciate all the work people put into these programs, I find the breaking changes very frustrating, especially when there are so many to work out at once! So I'll move to Unifi Protect as soon as I can afford the cameras, as it has a GUI. Thanks again for your efforts bringing this to Unraid! 

  • Upvote 1
Link to comment
9 hours ago, yayitazale said:

Blame/ask for help in the correct place if you have doubts about the container config itself: https://github.com/blakeblackshear/frigate/discussions

So, I've been messing with it because I am too stubborn to call it quits.  I seem to have it up and running.  However, picking the Nvidia Branch when selecting which version to install from CA and then trying to enter into the config.yml:

 

hwaccel_args: preset-nvidia-h264

 

Which, causes an error about FFMPEG crashing.  If I remove the hwaccel_args: preset-nvidia-h264 and restart frigate docker, I can see the stream.  I did enter my GPUID and clicked advancded tab and entered the --runtime=nvidia at the end of all the other text that was already pre-populated.

 

--shm-size=256mb --mount type=tmpfs,target=/tmp/cache,tmpfs-size=100000000 --restart unless-stopped --runtime=nvidia

 

Running the command nvidia-smi without the hwaccel_args tells me that there are no running processes. 

 

I'm using a Geforce GTX 1050 on a Reolink RLC-410W

 

You DID tell me to ask for help.  So, this is pretty much your fault now ;)

Edited by CoZ
left out some info
Link to comment
10 hours ago, MothyTim said:

Ok, did that for hours! I'll stick with v11 as it works! Whilst I appreciate all the work people put into these programs, I find the breaking changes very frustrating, especially when there are so many to work out at once! So I'll move to Unifi Protect as soon as I can afford the cameras, as it has a GUI. Thanks again for your efforts bringing this to Unraid! 

Watching your config file, thing you should change:

 

I suggest you to star from scratch with a new config file with a minimal configuration as it's recommended here: https://docs.frigate.video/configuration/

 

Then start adding or changing specific things one by one to avoid multiple errors at the same time that are harder to tackle.

  • Upvote 1
Link to comment
5 hours ago, CoZ said:

So, I've been messing with it because I am too stubborn to call it quits.  I seem to have it up and running.  However, picking the Nvidia Branch when selecting which version to install from CA and then trying to enter into the config.yml:

 

hwaccel_args: preset-nvidia-h264

 

Which, causes an error about FFMPEG crashing.  If I remove the hwaccel_args: preset-nvidia-h264 and restart frigate docker, I can see the stream.  I did enter my GPUID and clicked advancded tab and entered the --runtime=nvidia at the end of all the other text that was already pre-populated.

 

--shm-size=256mb --mount type=tmpfs,target=/tmp/cache,tmpfs-size=100000000 --restart unless-stopped --runtime=nvidia

 

Running the command nvidia-smi without the hwaccel_args tells me that there are no running processes. 

 

I'm using a Geforce GTX 1050 on a Reolink RLC-410W

 

You DID tell me to ask for help.  So, this is pretty much your fault now ;)

  1. Are you going to use Nvidia GPU as a detector? If it is not the case, you should use the default branch. 
  2. You should add "--runtime=nvidia" as first extra parameter, not last.
  3. Can you post the error of the FFMPEG?
  4. Where are you running the nvidia-smi command? You have to run it in the unraid OS console, you will not see anything inside the container.
Edited by yayitazale
Link to comment
17 hours ago, yayitazale said:

Does "chmod +x /mnt/user/appdata/trt-models/tensorrt_models.sh" give you some output?

 

Do you have the /mnt/user/appdata/trt-models folder mapped already to frigate and frigate running?

 

Chmod +c gave no output

 

Had the folder mapped and frigate running

Link to comment
16 hours ago, yayitazale said:
  1. Are you going to use Nvidia GPU as a detector? If it is not the case, you should use the default branch. 
  2. You should add "--runtime=nvidia" as first extra parameter, not last.
  3. Can you post the error of the FFMPEG?
  4. Where are you running the nvidia-smi command? You have to run it in the unraid OS console, you will not see anything inside the container.

 

1. Eventually – I guess?  I have one camera and I only use it to detect when my family of wild raccoons show up at night so I can go out and feed them and hang with them.  Please, don't judge. lol   I know I have to download another docker image Tensor (something or other) to utilize it.  I'm just concentrating on getting this back up and running.

 

2.  Done.  They didn't specify if it should be before or after.  Again, the DOCS leave a lot to be desired for amateurs such as I.

 

3.

2023-07-17 14:28:52.680503315 [2023-07-17 14:28:52] frigate.video ERROR : Rear_Deck: Unable to read frames from ffmpeg process. 2023-07-17 14:28:52.680790112 [2023-07-17 14:28:52] frigate.video ERROR : Rear_Deck: ffmpeg process is not running. exiting capture thread... 2023-07-17 14:28:55.961193412 [2023-07-17 14:28:55] watchdog.Rear_Deck ERROR : Ffmpeg process crashed unexpectedly for Rear_Deck. 2023-07-17 14:28:55.961446594 [2023-07-17 14:28:55] watchdog.Rear_Deck ERROR : The following ffmpeg logs include the last 100 lines prior to exit. 2023-07-17 14:28:55.961725123 [2023-07-17 14:28:55] ffmpeg.Rear_Deck.detect ERROR : [segment @ 0x55dfd77aff40] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly 2023-07-17 14:28:55.961920823 [2023-07-17 14:28:55] ffmpeg.Rear_Deck.detect ERROR : [rtsp @ 0x55dfd7793200] CSeq 6 expected, 0 received. 2023-07-17 14:28:55.962207303 [2023-07-17 14:28:55] ffmpeg.Rear_Deck.detect ERROR : Last message repeated 4 times 2023-07-17 14:28:55.962494096 [2023-07-17 14:28:55] ffmpeg.Rear_Deck.detect ERROR : rtsp://*:*@192.168.1.18:554/h264Preview_01_main: Connection timed out 2023-07-17 14:28:55.962704420 [2023-07-17 14:28:55] ffmpeg.Rear_Deck.detect ERROR : Last message repeated 1 times

 

4. I know enough to run it from the CLI in UInraid (Plex and Jellyfin and Unimanic user).  Otherwise, that piece of information would have been useful.  ;)

 

New information:

 

After switching the runtime=nvidia to the front of the extra parameter line and placing back in the hwaccel_args: preset-nvidia-h264 back into my config.yml.  Even though it explodes and I get all those FFMPEG error messages I can now actually VIEW the camera stream and typing in nvidia-smi into the CLI shows that a FFMPEG running process is ... running.

 

So, no idea why or how?  I leave that up to you good Sir.

 

Update 19:46HRS: Tried messing with the Tensor docker.  It filled my docker memory usage to 90% once it extracted almost 4GB worth of files.  Almost crashed my entire system.  Not good.

Edited by CoZ
Link to comment
12 hours ago, CoZ said:

 

1. Eventually – I guess?  I have one camera and I only use it to detect when my family of wild raccoons show up at night so I can go out and feed them and hang with them.  Please, don't judge. lol   I know I have to download another docker image Tensor (something or other) to utilize it.  I'm just concentrating on getting this back up and running.

 

2.  Done.  They didn't specify if it should be before or after.  Again, the DOCS leave a lot to be desired for amateurs such as I.

 

3.

2023-07-17 14:28:52.680503315 [2023-07-17 14:28:52] frigate.video ERROR : Rear_Deck: Unable to read frames from ffmpeg process. 2023-07-17 14:28:52.680790112 [2023-07-17 14:28:52] frigate.video ERROR : Rear_Deck: ffmpeg process is not running. exiting capture thread... 2023-07-17 14:28:55.961193412 [2023-07-17 14:28:55] watchdog.Rear_Deck ERROR : Ffmpeg process crashed unexpectedly for Rear_Deck. 2023-07-17 14:28:55.961446594 [2023-07-17 14:28:55] watchdog.Rear_Deck ERROR : The following ffmpeg logs include the last 100 lines prior to exit. 2023-07-17 14:28:55.961725123 [2023-07-17 14:28:55] ffmpeg.Rear_Deck.detect ERROR : [segment @ 0x55dfd77aff40] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly 2023-07-17 14:28:55.961920823 [2023-07-17 14:28:55] ffmpeg.Rear_Deck.detect ERROR : [rtsp @ 0x55dfd7793200] CSeq 6 expected, 0 received. 2023-07-17 14:28:55.962207303 [2023-07-17 14:28:55] ffmpeg.Rear_Deck.detect ERROR : Last message repeated 4 times 2023-07-17 14:28:55.962494096 [2023-07-17 14:28:55] ffmpeg.Rear_Deck.detect ERROR : rtsp://*:*@192.168.1.18:554/h264Preview_01_main: Connection timed out 2023-07-17 14:28:55.962704420 [2023-07-17 14:28:55] ffmpeg.Rear_Deck.detect ERROR : Last message repeated 1 times

 

4. I know enough to run it from the CLI in UInraid (Plex and Jellyfin and Unimanic user).  Otherwise, that piece of information would have been useful.  ;)

 

New information:

 

After switching the runtime=nvidia to the front of the extra parameter line and placing back in the hwaccel_args: preset-nvidia-h264 back into my config.yml.  Even though it explodes and I get all those FFMPEG error messages I can now actually VIEW the camera stream and typing in nvidia-smi into the CLI shows that a FFMPEG running process is ... running.

 

So, no idea why or how?  I leave that up to you good Sir.

 

Update 19:46HRS: Tried messing with the Tensor docker.  It filled my docker memory usage to 90% once it extracted almost 4GB worth of files.  Almost crashed my entire system.  Not good.

1. I wasn't judging, only pointing out something that some people doesn't understand or even read.

2. This is something basic of docker, not something exclusive from frigate. In any case, if you have complains about the docs you are welcome to send a PR with the suggested changes to the template: https://gitlab.com/yayitazale/unraid-templates/-/blob/main/yayitazale/frigate.xml

or to the docs of the project: https://github.com/blakeblackshear/frigate/tree/dev/docs

3. Can you attach a screenshot of the template config you are using and the config file?

 

You can expand the docker image from unraid if you are out of space, this is something that I can't expect from every user. You are the responsible of your system not me. If you don't like this just buy any commercial software.

Link to comment
6 hours ago, yayitazale said:

1. I wasn't judging, only pointing out something that some people doesn't understand or even read.

2. This is something basic of docker, not something exclusive from frigate. In any case, if you have complains about the docs you are welcome to send a PR with the suggested changes to the template: https://gitlab.com/yayitazale/unraid-templates/-/blob/main/yayitazale/frigate.xml

or to the docs of the project: https://github.com/blakeblackshear/frigate/tree/dev/docs

3. Can you attach a screenshot of the template config you are using and the config file?

 

You can expand the docker image from unraid if you are out of space, this is something that I can't expect from every user. You are the responsible of your system not me. If you don't like this just buy any commercial software.

 

I've expanded my docker.img a few times now.  I am also partially to blame.  Pulling down your container the first time and then going back in again and changing the repo (after actually digesting your instructions) to the newest Nvidia one and then pulling all that data again became far too much.

 

I never did get it working.  I saved your script and tried to place it in to the appdata/trt-models/tensorrt_models.sh folder.  It would not let me because the folder is the same as the filename.  So then I tried to change the name of the script and then change the whole chmod stuff to the new name of the script - still didn't work. 

 

I know you wren't judging.  I was trying to bring some levity into the discussion.

 

You want me to post my config.yml or, you want a screenshot of how I have your container setup with all the paths and etc...etc..? 

 

Remember, talk to me as if you were talking to a small child trying to explain how the universe was created.  (again, levity)

Link to comment
5 minutes ago, CoZ said:

 

I've expanded my docker.img a few times now.  I am also partially to blame.  Pulling down your container the first time and then going back in again and changing the repo (after actually digesting your instructions) to the newest Nvidia one and then pulling all that data again became far too much.

 

I never did get it working.  I saved your script and tried to place it in to the appdata/trt-models/tensorrt_models.sh folder.  It would not let me because the folder is the same as the filename.  So then I tried to change the name of the script and then change the whole chmod stuff to the new name of the script - still didn't work. 

 

I know you wren't judging.  I was trying to bring some levity into the discussion.

 

You want me to post my config.yml or, you want a screenshot of how I have your container setup with all the paths and etc...etc..? 

 

Remember, talk to me as if you were talking to a small child trying to explain how the universe was created.  (again, levity)

First of all, to your info, I only maintain the template for unraid. I'm not a developer of frigate so the script is not mine, and I only translated the deploying instruction from pure docker of the frigate docs to a unraid app template.

 

I would like to have both, the screenshot and the file, to see if there is something to fix in the way you are launching the container or in the config file.

  • Like 1
Link to comment
14 hours ago, CoZ said:

As requested.  I am sure you are going to have a field day with this one and just rip apart what I've done.  I'm ready.  Go for it. ;)

Screenshot 2023-07-18 at 15-06-10 CozsNAS_UpdateContainer.png

config.yml 863 B · 2 downloads

 I think you should add a input arg:

 

input_args: preset-rtsp-generic

 

And for output, you should use a preset too:

 

output_args: preset-record-generic

 

In any case, http video streams seem to be the most reliable for Reolink, there you have some info about how to setup the got2rtc restreaming:

 

https://docs.frigate.video/configuration/camera_specific#reolink-cameras

 

For more doubts about your config, please see https://github.com/blakeblackshear/frigate/issues/3235#issuecomment-1135876973

and you can ask there.

Link to comment
3 hours ago, yayitazale said:

In any case, http video streams seem to be the most reliable for Reolink, there you have some info about how to setup the got2rtc restreaming:

 

https://docs.frigate.video/configuration/camera_specific#reolink-cameras

 

 

 

That was part of the initial docker pull - the got2rtc streaming you're speaking of?  I deleted all those entries on the docker because (A) had no clue what it was for (B) it told me to remove them if they weren't going to be used.

 

Putting in the output_args caused Frigate to crash with the following error:

 

2023-07-19 09:31:52.056562168  pydantic.error_wrappers.ValidationError: 1 validation error for FrigateConfig
2023-07-19 09:31:52.056566211  cameras -> Rear_Deck -> ffmpeg -> output_args -> output_args
2023-07-19 09:31:52.056569915    extra fields not permitted (type=value_error.extra)

 

Link to comment
23 hours ago, CoZ said:

 

That was part of the initial docker pull - the got2rtc streaming you're speaking of?  I deleted all those entries on the docker because (A) had no clue what it was for (B) it told me to remove them if they weren't going to be used.

 

Putting in the output_args caused Frigate to crash with the following error:

 

2023-07-19 09:31:52.056562168  pydantic.error_wrappers.ValidationError: 1 validation error for FrigateConfig
2023-07-19 09:31:52.056566211  cameras -> Rear_Deck -> ffmpeg -> output_args -> output_args
2023-07-19 09:31:52.056569915    extra fields not permitted (type=value_error.extra)

No, I'm talking about the config file. You didn't read the docs properly:

https://docs.frigate.video/configuration/restream

 

The log points clearly that you are not nesting the config file correctly.

 

It should be cameras -> Rear_Deck -> ffmpeg -> output_args: preset-record-generic

Link to comment
On 7/20/2023 at 8:55 AM, yayitazale said:

No, I'm talking about the config file. You didn't read the docs properly:

https://docs.frigate.video/configuration/restream

 

Sorry for the delay in replying.  Some severe weather rolled through, and I was stuck at various airports forever.

 

My friend, if I could UNDERSTAND the Docs and read them properly, I wouldn't be here asking for help.  That is my main complaint with this.  It's by no means 'user/idiot friendly'.  There are too many variables listed in those docs.  Hence, why I was looking for a “If you have this model of camera, your config file needs to look like this” type of website earlier.   You have my gratitude for helping me get this far.  You also have my sympathies for constantly trying to help others on here.

 

Home Assistant has better docs / wiki and support forum.  I didn't really have any issues setting all that up and the associated containers (NodeRed, MQTT, Zwave, etc) since it was easy to follow along.  For some reason, I can't wrap my head around Frigate.

Edited by CoZ
Link to comment
On 7/17/2023 at 7:50 AM, yayitazale said:

Watching your config file, thing you should change:

 

I suggest you to star from scratch with a new config file with a minimal configuration as it's recommended here: https://docs.frigate.video/configuration/

 

Then start adding or changing specific things one by one to avoid multiple errors at the same time that are harder to tackle.

Thanks for the tips! I put my calm head on and had another go yesterday while watching the Grand Prix! All worked straight away! 

 

I copied the newer Reolink config over and switched off RTMP and left everthing else mostly the same!

 

One question! Do you think its better to change the FFMEG settings to one of the presets?

 

Cheers,

Timconfig.yml

Link to comment
On 7/24/2023 at 1:02 PM, MothyTim said:

Thanks for the tips! I put my calm head on and had another go yesterday while watching the Grand Prix! All worked straight away! 

 

I copied the newer Reolink config over and switched off RTMP and left everthing else mostly the same!

 

One question! Do you think its better to change the FFMEG settings to one of the presets?

 

Cheers,

Timconfig.yml

Yes, presets will simplify your life. In your case you should delete the ffmpeg part and add only:

 

ffmpeg:
  hwaccel_args: preset-intel-qsv-h264

 

Or this, if qsv doesn't work:

ffmpeg:
  hwaccel_args: preset-vaapi

 

In my case, I also add this to the ffmpeg part to work with webrtc in low latency and to record with the transcoded audio:

  input_args: preset-rtsp-restream-low-latency
  output_args: 
    record: preset-record-generic-audio-copy

 

And this in the go2rtc part in order to be able to connect from Home Assistant:

  webrtc:
    candidates:
      - 192.168.X.XX:8555
      - stun:8555

 

 

I see that you should also simplify the definition of cameras. You defined the substream that you are not using, and also, you are transcoding to opus and then to acc. I think you shoud only transocde once and keep that, so you should have something like this (chnage the opus to aac if needed):

 

go2rtc:
  streams:
    garden_camera: 
      - http://10.19.64.220/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password={FRIGATE_RTSP_PASSWORD}
      - "ffmpeg:garden_camera#audio=opus"
cameras:
  garden:
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/garden_camera
          input_args: preset-rtsp-restream
          roles:
            - record
            - detect

 

For this last part, you should have defined the ffpmeg > output_args > records as I told you to preset-record-generic-audio-copy to record with the opus/aac (whatever you keep with) audio.

 

In any case, you can also maintain the flv stream to detection and only restream for recording, you have the specific example for reolink config to do that here:

https://docs.frigate.video/configuration/ffmpeg_presets#input-args-presets

  • Upvote 1
Link to comment
2 hours ago, yayitazale said:

Yes, presets will simplify your life. In your case you should delete the ffmpeg part and add only:

 

ffmpeg:
  hwaccel_args: preset-intel-qsv-h264

 

Or this, if qsv doesn't work:

ffmpeg:
  hwaccel_args: preset-vaapi

 

In my case, I also add this to the ffmpeg part to work with webrtc in low latency and to record with the transcoded audio:

  input_args: preset-rtsp-restream-low-latency
  output_args: 
    record: preset-record-generic-audio-copy

 

And this in the go2rtc part in order to be able to connect from Home Assistant:

  webrtc:
    candidates:
      - 192.168.X.XX:8555
      - stun:8555

 

 

I see that you should also simplify the definition of cameras. You defined the substream that you are not using, and also, you are transcoding to opus and then to acc. I think you shoud only transocde once and keep that, so you should have something like this (chnage the opus to aac if needed):

 

go2rtc:
  streams:
    garden_camera: 
      - http://10.19.64.220/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password={FRIGATE_RTSP_PASSWORD}
      - "ffmpeg:garden_camera#audio=opus"
cameras:
  garden:
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/garden_camera
          input_args: preset-rtsp-restream
          roles:
            - record
            - detect

 

For this last part, you should have defined the ffpmeg > output_args > records as I told you to preset-record-generic-audio-copy to record with the opus/aac (whatever you keep with) audio.

 

In any case, you can also maintain the flv stream to detection and only restream for recording, you have the specific example for reolink config to do that here:

https://docs.frigate.video/configuration/ffmpeg_presets#input-args-presets

Hi, thanks for all that. I've changed the things that you've suggested, but unfortunatly it doesn't work? Here is the log and new config.

text  error  warn  system  array  login  

Traceback (most recent call last):
  File "/usr/local/go2rtc/create_config.py", line 27, in <module>
    config: dict[str, any] = yaml.safe_load(raw_config)
  File "/usr/local/lib/python3.9/dist-packages/yaml/__init__.py", line 125, in safe_load
    return load(stream, SafeLoader)
  File "/usr/local/lib/python3.9/dist-packages/yaml/__init__.py", line 81, in load
    return loader.get_single_data()
  File "/usr/local/lib/python3.9/dist-packages/yaml/constructor.py", line 49, in get_single_data
    node = self.get_single_node()
  File "/usr/local/lib/python3.9/dist-packages/yaml/composer.py", line 36, in get_single_node
    document = self.compose_document()
  File "/usr/local/lib/python3.9/dist-packages/yaml/composer.py", line 55, in compose_document
    node = self.compose_node(None, None)
  File "/usr/local/lib/python3.9/dist-packages/yaml/composer.py", line 84, in compose_node
    node = self.compose_mapping_node(anchor)
  File "/usr/local/lib/python3.9/dist-packages/yaml/composer.py", line 133, in compose_mapping_node
    item_value = self.compose_node(node, item_key)
  File "/usr/local/lib/python3.9/dist-packages/yaml/composer.py", line 84, in compose_node
    node = self.compose_mapping_node(anchor)
  File "/usr/local/lib/python3.9/dist-packages/yaml/composer.py", line 127, in compose_mapping_node
    while not self.check_event(MappingEndEvent):
  File "/usr/local/lib/python3.9/dist-packages/yaml/parser.py", line 98, in check_event
    self.current_event = self.state()
  File "/usr/local/lib/python3.9/dist-packages/yaml/parser.py", line 428, in parse_block_mapping_key
    if self.check_token(KeyToken):
  File "/usr/local/lib/python3.9/dist-packages/yaml/scanner.py", line 116, in check_token
    self.fetch_more_tokens()
  File "/usr/local/lib/python3.9/dist-packages/yaml/scanner.py", line 223, in fetch_more_tokens
    return self.fetch_value()
  File "/usr/local/lib/python3.9/dist-packages/yaml/scanner.py", line 577, in fetch_value
    raise ScannerError(None, None,
yaml.scanner.ScannerError: mapping values are not allowed here
  in "<unicode string>", line 180, column 15:
        input_args: preset-rtsp-restream-low-latency
                  ^
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service nginx: stopping
s6-rc: info: service go2rtc-healthcheck: stopping
s6-rc: info: service go2rtc-healthcheck successfully stopped
s6-rc: info: service nginx successfully stopped
s6-rc: info: service nginx-log: stopping
s6-rc: info: service frigate: stopping
s6-rc: info: service frigate successfully stopped
s6-rc: info: service go2rtc: stopping
s6-rc: info: service frigate-log: stopping
s6-rc: info: service nginx-log successfully stopped
s6-rc: info: service go2rtc successfully stopped
s6-rc: info: service go2rtc-log: stopping
s6-rc: info: service frigate-log successfully stopped
s6-rc: info: service go2rtc-log successfully stopped
s6-rc: info: service log-prepare: stopping
s6-rc: info: service s6rc-fdholder: stopping
s6-rc: info: service log-prepare successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service s6rc-fdholder successfully stopped
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
2023-07-26 12:15:22.225758077    File "/usr/local/lib/python3.9/dist-packages/yaml/composer.py", line 84, in compose_node
2023-07-26 12:15:22.225759078      node = self.compose_mapping_node(anchor)
2023-07-26 12:15:22.225760116    File "/usr/local/lib/python3.9/dist-packages/yaml/composer.py", line 127, in compose_mapping_node
2023-07-26 12:15:22.225761077      while not self.check_event(MappingEndEvent):
2023-07-26 12:15:22.225762094    File "/usr/local/lib/python3.9/dist-packages/yaml/parser.py", line 98, in check_event
2023-07-26 12:15:22.225762944      self.current_event = self.state()
2023-07-26 12:15:22.225763977    File "/usr/local/lib/python3.9/dist-packages/yaml/parser.py", line 428, in parse_block_mapping_key
2023-07-26 12:15:22.225781265      if self.check_token(KeyToken):
2023-07-26 12:15:22.225782421    File "/usr/local/lib/python3.9/dist-packages/yaml/scanner.py", line 116, in check_token
2023-07-26 12:15:22.225783244      self.fetch_more_tokens()
2023-07-26 12:15:22.225784245    File "/usr/local/lib/python3.9/dist-packages/yaml/scanner.py", line 223, in fetch_more_tokens
2023-07-26 12:15:22.225785210      return self.fetch_value()
2023-07-26 12:15:22.225786212    File "/usr/local/lib/python3.9/dist-packages/yaml/scanner.py", line 577, in fetch_value
2023-07-26 12:15:22.225787070      raise ScannerError(None, None,
2023-07-26 12:15:22.225788017  yaml.scanner.ScannerError: mapping values are not allowed here
2023-07-26 12:15:22.225788879    in "<unicode string>", line 180, column 15:
2023-07-26 12:15:22.225789793          input_args: preset-rtsp-restream-low-latency
2023-07-26 12:15:22.225790624                    ^
2023-07-26 12:15:22.225791363  
2023-07-26 12:15:22.225792311  *************************************************************
2023-07-26 12:15:22.225807173  ***    End Config Validation Errors                       ***
2023-07-26 12:15:22.225808212  *************************************************************
2023-07-26 12:15:22.233284544  2023/07/26 12:15:22 [error] 134#134: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 10.19.64.2, server: , request: "GET /api/stats HTTP/1.1", upstream: "http://127.0.0.1:5001/stats", host: "10.19.64.2:5000"
2023-07-26 12:15:22.233334360  10.19.64.2 - - [26/Jul/2023:12:15:22 +0100] "GET /api/stats HTTP/1.1" 502 157 "-" "HomeAssistant/2023.7.3 aiohttp/3.8.5 Python/3.11" "-"
2023-07-26 12:15:22.527162273  [INFO] Preparing go2rtc config...
2023-07-26 12:15:22.727177322  [INFO] The go2rtc service exited with code 1 (by signal 0)
2023-07-26 12:15:23.348278290  [INFO] Service Frigate exited with code 1 (by signal 0)
2023-07-26 12:15:23.360410949  [INFO] The go2rtc-healthcheck service exited with code 256 (by signal 15)
2023-07-26 12:15:23.395323650  [INFO] Service NGINX exited with code 0 (by signal 0)

config.yml

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...