WebRTC icon indicating copy to clipboard operation
WebRTC copied to clipboard

[Feature request] Support for Frigate cameras

Open Ulrar opened this issue 4 years ago • 10 comments
trafficstars

Hi,

This works very well (appart from some stuttering / rubberbanding sometimes), especially with a TURN server, thanks for your work ! One improvement though would be support for Frigate's camera entities, as they don't seem to work currently. I had to add my camera a second time as RTSP using the generic platform under a separate name, not a huge deal but since Frigate is already streaming it constantly it would be great to just re-use the stream from there instead of connecting to the cameras twice. Might not be possible, not sure how Frigate re-exposes the camera to HA in practice though.

Thanks !

Ulrar avatar May 24 '21 20:05 Ulrar

As I can see, frigate integration uses RTMP stream

https://github.com/blakeblackshear/frigate-hass-integration/blob/master/custom_components/frigate/camera.py#L53

AlexxIT avatar May 25 '21 06:05 AlexxIT

Yes, frigate restreams via rtmp. But this would be a nice feature, because frigate is able to keep only one connection to the camera, and restream it multiple times via rtmp without any cpu load.

Se7enair avatar Jun 10 '21 07:06 Se7enair

personally i just exposed the direct stream from the camera to HA.. sure i have 2 camera streams but only 1 is used for webRTC (the direct one). working perfectly with UniFi cameras.

stripeyhorse avatar Jun 19 '21 11:06 stripeyhorse

@AlexxIT - came here looking for exactly this. The ticket could be

"[Feature request] Support for RTMP cameras"

this would enable those using Frigate NVR to use your component in HA without additional connections to each camera. This is particularly useful in my setup where my cameras are isolated with Frigate being the "gateway".

I'll have to hack something else up to try your component out, which I'm super keen to do!

UmbraMalison avatar Jul 07 '21 17:07 UmbraMalison

Very intrested on this as well!

quenthal avatar Aug 08 '21 19:08 quenthal

Would be interested in this as well!

mshamash avatar Aug 19 '21 13:08 mshamash

I found this linked from the Frigate integration's GitHub today: https://github.com/dermotduffy/frigate-hass-card

Working well so far 😁

drinfernoo avatar Aug 22 '21 00:08 drinfernoo

@drinfernoo - That's a good hint, but the webrtc support in frigate-hass-card requires webrtc entity (this component) which as it does not support RTMP, only RTSP, means you need still need to be talking directly to the cameras instead of using frigate.

in my network setup, this would significantly reduce routing intervlan vlan traffic, and also reduce the load on each camera.

UmbraMalison avatar Aug 22 '21 07:08 UmbraMalison

Yeah, what is the point of claiming WebRTC support on those Frigate cards? They imply that it works, and it simply does not :/

EDIT: Nevermind, their docs are unclear - you need to use the URL parameter just like when using the WebRTC card.

oramirite avatar Sep 09 '21 21:09 oramirite

Does this give any help for rtmp and frigate camera support?

https://pkg.go.dev/github.com/pion/example-webrtc-applications/v3/rtmp-to-webrtc

quenthal avatar Jan 10 '22 11:01 quenthal

Check my new project. It has support RTMP https://github.com/AlexxIT/go2rtc

AlexxIT avatar Aug 21 '22 11:08 AlexxIT