From 77876bd6631ec256a3490e783da0c92949f8e3f6 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Sun, 29 Jan 2023 16:22:40 -0700 Subject: [PATCH] Add docs for adding authentication to rtsp restream (#5289) * Add docs for adding authentication to rtsp restream * Update restream.md * Update restream.md * Remove duplicate docs --- docs/docs/configuration/restream.md | 33 ++++++++++++++++------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/docs/docs/configuration/restream.md b/docs/docs/configuration/restream.md index 9f7e54eb4..cbe7706a1 100644 --- a/docs/docs/configuration/restream.md +++ b/docs/docs/configuration/restream.md @@ -3,17 +3,32 @@ id: restream title: Restream --- -### RTSP +## RTSP Frigate can restream your video feed as an RTSP feed for other applications such as Home Assistant to utilize it at `rtsp://:8554/`. Port 8554 must be open. [This allows you to use a video feed for detection in Frigate and Home Assistant live view at the same time without having to make two separate connections to the camera](#reduce-connections-to-camera). The video feed is copied from the original video feed directly to avoid re-encoding. This feed does not include any annotation by Frigate. Frigate uses [go2rtc](https://github.com/AlexxIT/go2rtc) to provide its restream and MSE/WebRTC capabilities. The go2rtc config is hosted at the `go2rtc` in the config, see [go2rtc docs](https://github.com/AlexxIT/go2rtc#configuration) for more advanced configurations and features. -#### Birdseye Restream +### Birdseye Restream Birdseye RTSP restream can be enabled at `birdseye -> restream` and accessed at `rtsp://:8554/birdseye`. Enabling the restream will cause birdseye to run 24/7 which may increase CPU usage somewhat. -### RTMP (Deprecated) +### Securing Restream With Authentication + +The go2rtc restream can be secured with RTSP based username / password authentication. Ex: + +```yaml +go2rtc: + rtsp: + username: "admin" + password: "pass" + streams: + ... +``` + +**NOTE:** This does not apply to localhost requests, there is no need to provide credentials when using the restream as a source for frigate cameras. + +## RTMP (Deprecated) In previous Frigate versions RTMP was used for re-streaming. RTMP has disadvantages however including being incompatible with H.265, high bitrates, and certain audio codecs. RTMP is deprecated and it is recommended to move to the new restream role. @@ -118,15 +133,3 @@ go2rtc: streams: stream1: exec:ffmpeg -hide_banner -re -stream_loop -1 -i /media/BigBuckBunny.mp4 -c copy -rtsp_transport tcp -f rtsp {{output}} ``` - -## Go2rtc Exec - -Go2rtc offers the ability to [run a full command with exec](https://github.com/AlexxIT/go2rtc#source-exec) and calls for `{output}` at the end of the stream. Due to frigate's handling of templates, the output will need to be passed as `{{output}}`. - -ex: - -```yaml -go2rtc: - streams: - test: exec:ffmpeg -hide_banner -re -stream_loop -1 -i /media/BigBuckBunny.mp4 -c copy -rtsp_transport tcp -f rtsp {{output}} -```