Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use snapshot image from the mqqt message instead of fetching from the api #18

Closed
erikarenhill opened this issue Mar 29, 2021 · 4 comments

Comments

@erikarenhill
Copy link
Contributor

Currently the snapshot is fetched from frigate by posting to 0.0.0.0:PORT/recognize from the mqtt client, but since frigate publishes the snapshots binary image with the mqtt message maybe we could get better performance by just using the data that we already got with the message?

Or are there any other reasons why to fetch the image again with axios, maybe I'm missing something.

@erikarenhill
Copy link
Contributor Author

erikarenhill commented Mar 29, 2021

this would require to fetch FRIGATE/api/config to see which cameras that's available at start/some polling interval, and then subscribe to the frigate/{CAMERA}/person event which is the event which contains the snapshot data.

Maybe this would help reduce the load on frigate to avoid crashing frigate with too many api requests (blakeblackshear/frigate#920) even though an older version of frigate works without crashing so I consider this to be a frigate-bug introduced with newer versions, it should still be less load on the system at whole if using the snapshots from the mqtt message right away I believe.

Maybe we need to use the snapshots in combination with the frigate/events subscription to get the boundingbox coordinates...

Just some thoughts :)

@jakowenko
Copy link
Owner

jakowenko commented May 21, 2021

Hey @erikarenhill, I got this into the latest beta build. Let me know what you think. You can configure the Frigate snapshot MQTT image as well, the default is pretty small.

I'm using this currently.

mqtt:
  timestamp: False
  bounding_box: False
  crop: True
  height: 500

https://blakeblackshear.github.io/frigate/configuration/cameras/#full-example

@Raphael909
Copy link

Hey @jakowenko , I was wondering what are your thoughts or plan to get this feature into master branch or cut a new release.
Thank you for this fantastic software!

@jakowenko
Copy link
Owner

jakowenko commented Jun 4, 2021

Hey @Raphael909, thank you for the compliments. I just published v0.6.0 which has this feature along with a few other changes. If you have any other feedback or feature suggestions feel free to open up a new ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants