mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 17:55:21 +03:00
Move restream to go2rtc
This commit is contained in:
parent
46271980f3
commit
b5d2fa69c5
@ -21,7 +21,7 @@ if config_file.endswith((".yaml", ".yml")):
|
|||||||
elif config_file.endswith(".json"):
|
elif config_file.endswith(".json"):
|
||||||
config = json.loads(raw_config)
|
config = json.loads(raw_config)
|
||||||
|
|
||||||
go2rtc_config: dict[str, any] = config["restream"]
|
go2rtc_config: dict[str, any] = config["go2rtc"]
|
||||||
|
|
||||||
if not go2rtc_config.get("log", {}).get("format"):
|
if not go2rtc_config.get("log", {}).get("format"):
|
||||||
go2rtc_config["log"] = {"format": "text"}
|
go2rtc_config["log"] = {"format": "text"}
|
||||||
|
|||||||
@ -20,7 +20,7 @@ Live view options can be selected while viewing the live stream. The options are
|
|||||||
MSE Requires AAC audio, WebRTC requires PCMU/PCMA, or opus audio. If you want to support both MSE and WebRTC then your restream config needs to use ffmpeg to set both.
|
MSE Requires AAC audio, WebRTC requires PCMU/PCMA, or opus audio. If you want to support both MSE and WebRTC then your restream config needs to use ffmpeg to set both.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
restream:
|
go2rtc:
|
||||||
streams:
|
streams:
|
||||||
test_cam: ffmpeg:rtsp://192.168.1.5:554/live0#video=copy#audio=aac#audio=opus
|
test_cam: ffmpeg:rtsp://192.168.1.5:554/live0#video=copy#audio=aac#audio=opus
|
||||||
```
|
```
|
||||||
@ -28,7 +28,7 @@ restream:
|
|||||||
However, chances are that your camera already provides at least one usable audio type, so you just need restream to add the missing one. For example, if your camera outputs audio in AAC format:
|
However, chances are that your camera already provides at least one usable audio type, so you just need restream to add the missing one. For example, if your camera outputs audio in AAC format:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
restream:
|
go2rtc:
|
||||||
streams:
|
streams:
|
||||||
test_cam: ffmpeg:rtsp://192.168.1.5:554/live0#video=copy#audio=copy#audio=opus
|
test_cam: ffmpeg:rtsp://192.168.1.5:554/live0#video=copy#audio=copy#audio=opus
|
||||||
```
|
```
|
||||||
@ -38,7 +38,7 @@ Which will reuse your camera AAC audio, while also adding one track in OPUS form
|
|||||||
If your camera uses RTSP and supports the audio type for the live view you want to use, then you can pass the camera stream to go2rtc without ffmpeg.
|
If your camera uses RTSP and supports the audio type for the live view you want to use, then you can pass the camera stream to go2rtc without ffmpeg.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
restream:
|
go2rtc:
|
||||||
streams:
|
streams:
|
||||||
test_cam: rtsp://192.168.1.5:554/live0
|
test_cam: rtsp://192.168.1.5:554/live0
|
||||||
```
|
```
|
||||||
@ -53,7 +53,7 @@ WebRTC works by creating a TCP or UDP connection on port `8555`. However, it req
|
|||||||
1. Add your internal IP to the list of `candidates`. Here is an example, assuming that `192.168.1.10` is the local IP of the device running Frigate:
|
1. Add your internal IP to the list of `candidates`. Here is an example, assuming that `192.168.1.10` is the local IP of the device running Frigate:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
restream:
|
go2rtc:
|
||||||
streams:
|
streams:
|
||||||
test_cam: ...
|
test_cam: ...
|
||||||
webrtc:
|
webrtc:
|
||||||
|
|||||||
@ -7,7 +7,7 @@ title: Restream
|
|||||||
|
|
||||||
Frigate can restream your video feed as an RTSP feed for other applications such as Home Assistant to utilize it at `rtsp://<frigate_host>:8554/<camera_name>`. 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 can restream your video feed as an RTSP feed for other applications such as Home Assistant to utilize it at `rtsp://<frigate_host>:8554/<camera_name>`. 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 Restream uses [go2rtc](https://github.com/AlexxIT/go2rtc) to provide its restream and MSE/WebRTC capabilities. The go2rtc config is hosted at the `restream` config, see [go2rtc docs](https://github.com/AlexxIT/go2rtc#configuration) for more advanced configurations and features.
|
Frigate Restream 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
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ Some cameras only support one active connection or you may just want to have a s
|
|||||||
One connection is made to the camera. One for the restream, `detect` and `record` connect to the restream.
|
One connection is made to the camera. One for the restream, `detect` and `record` connect to the restream.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
restream:
|
go2rtc:
|
||||||
streams:
|
streams:
|
||||||
test_cam: ffmpeg:rtsp://192.168.1.5:554/live0#video=copy#audio=aac#audio=opus
|
test_cam: ffmpeg:rtsp://192.168.1.5:554/live0#video=copy#audio=aac#audio=opus
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ cameras:
|
|||||||
Two connections are made to the camera. One for the sub stream, one for the restream, `record` connects to the restream.
|
Two connections are made to the camera. One for the sub stream, one for the restream, `record` connects to the restream.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
restream:
|
go2rtc:
|
||||||
streams:
|
streams:
|
||||||
test_cam: ffmpeg:rtsp://192.168.1.5:554/live0#video=copy#audio=aac#audio=opus
|
test_cam: ffmpeg:rtsp://192.168.1.5:554/live0#video=copy#audio=aac#audio=opus
|
||||||
test_cam_sub: ffmpeg:rtsp://192.168.1.5:554/substream#video=copy#audio=aac#audio=opus
|
test_cam_sub: ffmpeg:rtsp://192.168.1.5:554/substream#video=copy#audio=aac#audio=opus
|
||||||
|
|||||||
@ -826,7 +826,7 @@ class FrigateConfig(FrigateBaseModel):
|
|||||||
live: CameraLiveConfig = Field(
|
live: CameraLiveConfig = Field(
|
||||||
default_factory=CameraLiveConfig, title="Live playback settings."
|
default_factory=CameraLiveConfig, title="Live playback settings."
|
||||||
)
|
)
|
||||||
restream: RestreamConfig = Field(
|
go2rtc: RestreamConfig = Field(
|
||||||
default_factory=RestreamConfig, title="Global restream configuration."
|
default_factory=RestreamConfig, title="Global restream configuration."
|
||||||
)
|
)
|
||||||
birdseye: BirdseyeConfig = Field(
|
birdseye: BirdseyeConfig = Field(
|
||||||
|
|||||||
@ -23,7 +23,7 @@ export default function Camera({ camera }) {
|
|||||||
const apiHost = useApiHost();
|
const apiHost = useApiHost();
|
||||||
const [showSettings, setShowSettings] = useState(false);
|
const [showSettings, setShowSettings] = useState(false);
|
||||||
const [viewMode, setViewMode] = useState('live');
|
const [viewMode, setViewMode] = useState('live');
|
||||||
const restreamEnabled = config?.restream?.streams && Object.keys(config.restream.streams).includes(camera);
|
const restreamEnabled = config?.go2rtc?.streams && Object.keys(config.go2rtc.streams).includes(camera);
|
||||||
|
|
||||||
const cameraConfig = config?.cameras[camera];
|
const cameraConfig = config?.cameras[camera];
|
||||||
const jsmpegWidth = cameraConfig
|
const jsmpegWidth = cameraConfig
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user