Local realtime person detection for RTSP cameras

thanks! just a waiting game then :smiley:

As I mentioned on another thread - I talked to a friend at Google who told me the Coral products have been killed off by Google. Not enough profits. :slight_smile: And the lead engineer on the chip left to work for another company.

Is there a plan to use jetson or another co-processor if Coral is dead?

1 Like

Will see if that actually happens and components sold on the retail side instead of only to OEMā€™s. I hope it works out.

For those using Reolink 8MP cameras thereā€™s finally a fix to use high resolution in frigate.
I came across this post reolink
Basically if you set the high res stream to 2560*1440 it changes to h264 and frigate works.

1 Like

Yay! :partying_face:
Iā€™ve just tested it and it really works! Iā€™ve uploaded the latest firmware v3.1.0.956_22041503 to my RLC-810A, updated the Configuration (which did reset to factory defaults), set the main stream to 2560*1440 and it changed the codec from h.265 to h.264.

The field of view is now much broader and also Iā€™m able to set the Fixed Frame Rate to ā€œOn, fluency firstā€ and Interframe Space to ā€œ1xā€ which should be better for the motion detection and object detection. Also according to Rob from The Hookup it should fix some night IR ghosting (source: Reolink and Blue Iris Updates: Fixed RTSP, ONVIF, FPS, and iFrame! - YouTube).

Thanks so much for sharing this amazing info Juan!

Iā€™ve set an automation to trigger with frigate events like it was shown in the example in the docs. Too often it happens that there is no image attached in the email it generates. I suspected that it was trying to read the image too quickly, so I added a 30 sec delay between the trigger and the email sending. It didnā€™t solve it. If I later look the trace it shows everything right: the event id is there, it builds the file paths and filename correctly, the files exist on the disks and can be accessed and look good.

Also, Iā€™m wondering, is there a way to view the mqtt event messages afterwards? Iā€™d like to tweak some settings. If they arenā€™t saved by Frigate, what would be a smart way to log them? I could save the data every time the notification automation sends the email and possibly learn something. I might also find a way to weed out the false positives.

PS. Iā€™d like to see the event id listed in the event details in the Frigate UI. It would make it easier if you need to go look for the actual files. Also, itā€™d be nice to have direct access in the UI to the full image incase you have snapshot cropping enabled like do. The file is already there on the disk.

Iā€™ve finally managed to work out how to mount an external drive under Media in HAOS (or whatever itā€™s called now :joy:) - it mounts as a folder which is the same as itā€™s volume/partition name
Looking at the Frigate docs, thereā€™s no way to specify a different folder for storing recordings?
Can I just delete the Frigate-created ā€œfrigateā€ folder under Media, rename my USB drive volume ā€œfrigateā€ and then reboot? Will Frigate see the USB drive and just use that instead of trying to create itā€™s own folder?
I guess the answer is ā€œjust try itā€ but I donā€™t want to screw up my whole setup!!
Plan B is just to get a 2nd computer to use as a Docker host for Frigate & other stuff, may be the best idea in the long runā€¦

As long as storage exists at expected path the application will not care if it is Hdd, usb or sdcard.

1 Like

Whats everyones thoughts on 4k vs 1080p for cameras? worth spending more and having 4k or is it okay to just stick with 1080?

Just got a coral so looking to get this setup and my current cameras (Reolink 520 and anke c800) do not seem to work with frigate.

I donā€™t use them, but I think the Reolinks recently received an update to allow choosing 2 different streams. This is useful since its recommended to use a low quality stream for object detection and the high quality stream for recording and event captures

Does anyone know what I need to do to make my RTSP camera feeds show up quicker in Lovelace dashboards? Can take a good 5s sometimes.
Iā€™ve seen people talk about using the ā€œpreload_streamā€ option with the camera integration, but Iā€™m not sure how that would be applied using Frigate (if at all possible)?

Hi eveyone :slight_smile:

I am successfully using Frigate addon on HAOS inside a VM in TrueNAS Core 12.0-U8for the last few months. The information found here has helped a lot.
Number of cameras: 11
CPU detection is used for Frigate - an Intel I9-11900.
Inference speeds are between 27 and 35.

Now i managed to get my hands on a USB Coral.
I searched hi and low but could not find a sort of tutorial that my old brain cells could follow. I get that the general idea would be to passthrough the USB Coral to the VM and do something there.

As it happens I also have a 4 port External USB 3.0 PCI Express card i could use if neccessary, It is a Rosewill RC-508.

Can anyone help with a sort of tutorial on how to set this up so i donā€™t mess up my HAOS installation please ?

Thank you !

This is HA issue not frigate and bit certain it is issue or just normal

All streams have delay to live view but not sure where it from

So a little update after many hours of fiddling.

I installed the PCIe USB controller and i think i have managed to passthrough the entire controller to HA with the help of TrueNAS Core PCI passthrough to VM - USB to Windows 10 - YouTube

The controller has 4 USB ports.

Did i do it correctly ?

Next i plugged in the Coral USB and rebooted. But the TPU doesnā€™t seem to show anywhere.

Do i need some drivers or what do i need to do next please ?

New update:

Seems that it works and no drivers or anything else was needed. I just modified the frigate.yaml to use the TPU and:

My current ffmpeg config is:

ffmpeg:
  global_args:
    - -hide_banner
    - -loglevel
    - info
  input_args:
    -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1
  output_args:
    detect: -f rawvideo -pix_fmt yuv420p
# encode audio to aac
#    record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an
#    rtmp: -c copy -f flv -c:v copy -c:a aac
  
# disable audio   
    record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an
    rtmp: -c copy -an -f flv
  hwaccel_args:
    - -hwaccel
    - qsv
    - -qsv_device
    - /dev/dri/renderD128
detectors:
  coral:
    type: edgetpu

Do i need to change something here or is it good like this ?

Try The WebRTC integration , zero delay on stream , and with audioā€¦

So you are saying to stop using the rtmp role in Frigate and switch to WebRTC for live view ?

In rest, all the ffmpeg settings are ok for Coral ? they seemed ok for the CPU , but do they need any modification now that the TPU is installed ?

Thanks

@Momo - I believe Tyrian81 was trying to respond to zil0g, for the question on how to load camera feeds faster in Lovelace.

So nothing to do with your Coral + Frigate discussion.

Ha true:) Still would appreciate if someone could look over what i did and tell me if i need to change something.