blakeblackshear / frigate-hass-addons

Frigate hass.io addons
MIT License
229 stars 122 forks source link

Access to clean PNG through api URL #120

Open mathgim opened 1 year ago

mathgim commented 1 year ago

Is it possible to access the clean PNG picture through a URL for a specific event? By the way, it seems that the snapshot is done using the sub stream, the one used for detection, and not the main stream, the one used for recording. So the quality of the snapshot isn't that good. Hopefully, it can be better with the PNG picture.

NickM-27 commented 1 year ago

You can use the /clips/ directory API to get it.

And yes it uses the detect stream, there are many reasons why using the main stream is difficult and won't work as well for event snapshots. In the next version there will be an api to pull a snapshot from the recordings

mathgim commented 1 year ago

Okay, could you please guide me through on which url to use exactly to get the PNG picture?

Mathieu


From: Nicolas Mowen @.> Sent: Saturday, May 27, 2023 1:37:24 PM To: blakeblackshear/frigate-hass-addons @.> Cc: flouck @.>; Author @.> Subject: Re: [blakeblackshear/frigate-hass-addons] Access to clean PNG through api URL (Issue #120)

You can use the /clips/ directory API to get it.

And yes it uses the detect stream, there are many reasons why using the main stream is difficult and won't work as well for event snapshots. In the next version there will be an api to pull a snapshot from the recordings

— Reply to this email directly, view it on GitHubhttps://github.com/blakeblackshear/frigate-hass-addons/issues/120#issuecomment-1565364814, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOK7FD3KOYDT7NQ76PBYNY3XIHRPJANCNFSM6AAAAAAYRBRGX4. You are receiving this because you authored the thread.Message ID: @.***>

NickM-27 commented 1 year ago

It is http://frigate_ip:5000/clips/{camera_name}-{event_id}-clean.png

mathgim commented 1 year ago

What about for external url? I use something like that to get the snapshot.

https://xxx.duckdns.org:8123/api/frigate/notifications/{event-id}/snapshot.jpg


De : Nicolas Mowen @.> Envoyé : samedi 27 mai 2023, 13:56 À : blakeblackshear/frigate-hass-addons @.> Cc : flouck @.>; Author @.> Objet : Re: [blakeblackshear/frigate-hass-addons] Access to clean PNG through api URL (Issue #120)

It is http://frigate_ip:5000/clips/{camera_name}-{event_id}-clean.png

— Reply to this email directly, view it on GitHubhttps://github.com/blakeblackshear/frigate-hass-addons/issues/120#issuecomment-1565370802, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOK7FD5GNTVRQ3B5MGZIDIDXIHTWJANCNFSM6AAAAAAYRBRGX4. You are receiving this because you authored the thread.Message ID: @.***>

NickM-27 commented 1 year ago

That is the home assistant api with the frigate integration, I don't think it exposes the clip path

gudszent commented 5 months ago

Did you find a proper way to get png like this way: GET /api//latest.jpg[?h=300] Sadly my other device can use only png :(