frigate-hass-addons icon indicating copy to clipboard operation
frigate-hass-addons copied to clipboard

Access to clean PNG through api URL

Open mathgim opened this issue 1 year ago • 6 comments

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.

mathgim avatar May 27 '23 08:05 mathgim

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

NickM-27 avatar May 27 '23 11:05 NickM-27

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: @.***>

mathgim avatar May 27 '23 11:05 mathgim

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

NickM-27 avatar May 27 '23 11:05 NickM-27

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: @.***>

mathgim avatar May 27 '23 13:05 mathgim

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

NickM-27 avatar May 27 '23 14:05 NickM-27

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

gudszent avatar May 01 '24 16:05 gudszent