Local realtime person detection for RTSP cameras

More info, its not the transpose arg that blasts the processor, it goes to 150% with the defaults:

output_args:
        record: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v libx264 -an
        clips: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v libx264 -an
        rtmp: -c:v libx264 -an -f flv   

Any suggestions?

Many thanks

Bad interpretation of the docs from me. Those are the settings for mjpeg cams.

Tried the following but get errors:

  fri_side_door:
    ffmpeg:
      inputs:
        - path: rtsp://viewer:[email protected]:554/user=admin_password=redacted_channel=1_stream=0
          roles:
            - detect
            - rtmp
            - clips
      output_args:
#        record: -vf transpose=1 -f rawvideo -pix_fmt -yuv420p
#        clips: -vf transpose=1 -f -rawvideo -pix_fmt yuv420p
        rtmp: -vf transpose=1 -f -rawvideo -pix_fmt yuv420p

Here are the errors:

frigate    | frigate.edgetpu                INFO    : TPU found
frigate    | frigate.video                  INFO    : fri_side_door: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | frigate.video                  INFO    : fri_side_door: ffmpeg process is not running. exiting capture thread...
frigate    | ffmpeg.fri_side_door.detect    ERROR   : [NULL @ 0x5555c848b640] Unable to find a suitable output format for 'rtmp://127.0.0.1/live/fri_side_door'
frigate    | ffmpeg.fri_side_door.detect    ERROR   : rtmp://127.0.0.1/live/fri_side_door: Invalid argument
frigate    | frigate.video                  INFO    : fri_side_door: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | frigate.video                  INFO    : fri_side_door: ffmpeg process is not running. exiting capture thread...
frigate    | ffmpeg.fri_side_door.detect    ERROR   : [NULL @ 0x555c7db0f040] Unable to find a suitable output format for 'rtmp://127.0.0.1/live/fri_side_door'
frigate    | ffmpeg.fri_side_door.detect    ERROR   : rtmp://127.0.0.1/live/fri_side_door: Invalid argument
frigate    | frigate.video                  INFO    : fri_side_door: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | frigate.video                  INFO    : fri_side_door: ffmpeg process is not running. exiting capture thread...
frigate    | ffmpeg.fri_side_door.detect    ERROR   : [NULL @ 0x561fd01cf040] Unable to find a suitable output format for 'rtmp://127.0.0.1/live/fri_side_door'
frigate    | ffmpeg.fri_side_door.detect    ERROR   : rtmp://127.0.0.1/live/fri_side_door: Invalid argument

Thanks

Stupid/noob question butā€¦

How the heck do I save a MQTT image instead of using http://frigateā€¦/snapshot.jpg ?

My Frigate instance is crashing several times a day. Iā€™ve now 10 cams enabled and pulling snapshots from 3-5 of them at the same time makes Frigate go scuba diving.

Iā€™m using the downloader.download_file service to grab a snapshot from frigate, but as I understand the MQTT way is better.

MQTT is not better. There is no way to connect that snapshot with an event id for notifications. Is this the database connection already opened issue?

1 Like

I know that the mqtt image is not the ideal solution for notifications. But had some time over to mess with my automations. :smiley:

And yes. Database conn issue.

Dear all,

I dunno if already discussed here but I use a blueprint

to send notifications to my Android app. When trying to acces the clips sometimes I get an 404 not found error for this clip. Anyone else facing this issue?

Perhaps the clip is not saved yet. I saw an addition coming in version 9.0, which adds clip_ready to the events endpoint. Then it will be possible to send the notification, when the clip is ready.

any chance that we also get hwaccel support for NVIDIA jetson?
just moved my HA to jetson due performance issues. totatlly fine and stable but would like to get

cameras:
  cam_wz:
    ffmpeg:
      hwaccel_args:
        - h264_nvv4l2dec

h264_nvv4l2dec should be correct.
thanks

sounds fair but even when i wait a bit the 404 error persists :frowning: well will wait then for next release ā€¦ thanks for the info :slight_smile: Some clips are well shown

This is a pain.
Check this link to verify the board is accessible
Coral
On another site I read comments about a faulty cable.

I had a similar problem with zoneminder in docker. I have a pcie coral and the problem was permissions for /dev/apex_0 it needs full privileges.

Does the data for things like inference, motion, fps, last detected object, etc come from the Frigate integration or MQTT? Iā€™ve got frigate running as a pod in my kubernetes cluster, and occasionally get into this state where I see inference, but a lot of the other values are ā€œUnavailableā€. Trying to figure out where itā€™s pulling from and where I can try to debug where itā€™s failing.

Whooopss PLEASE HELP !!!
I bought coral mini pcie and it doesnt fit to my mother board. Please help. Can i put it to my GPU PCI express slot? it fits but empty spaces both side obvious.Cant find any videos/tutorialsā€¦ As per all google search it seems obviouse how to do itā€¦ oO

I got this: https://www.amazon.com/gp/product/B07JBCL1CJ which takes mPCIe card and goes into 1x/2x/4x/8x/16x PCIe 3.0 slot. Needs to be PCIe 3.0 to work correctly.

1 Like

Thank you man! god bless !

I cant find anything like it on amazon.es :(((((( if i know i would just bought the m2 oneā€¦ Damn datasheetsā€¦ It says standart half pcie connectorā€¦And its far from STANDART ;((((

Do you think this one is the chosen one?

Return and buy correct one

https://www.mouser.es/ProductDetail/Coral/G950-06809-01?qs=u16ybLDytRbcxxqFKdbhgQ==

I think that would be costly. Better to just buy an adapter as i want PCI not usb

I see pci as it is inside the case more suitable. But thx