mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
Fix internal restream error and add docs for reducing camera connections (#4431)
* Start restream before detection * Add docs explaining how to reduce connections to the camera * Fix typos for consistency * Add link to other part of doc for readability
This commit is contained in:
parent
ad3f6fc551
commit
a04fa105ef
@ -5,8 +5,50 @@ 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://<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. 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.
|
||||||
|
|
||||||
### RTMP (Deprecated)
|
### 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.
|
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.
|
||||||
|
|
||||||
|
## Reduce Connections To Camera
|
||||||
|
|
||||||
|
Some cameras only support one active connection or you may just want to have a single connection open to the camera. The RTSP restream allows this to be possible.
|
||||||
|
|
||||||
|
### With Single Stream
|
||||||
|
|
||||||
|
One connection is made to the camera. One for the restream, `detect` and `record` connect to the restream.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
cameras:
|
||||||
|
test_cam:
|
||||||
|
ffmpeg:
|
||||||
|
inputs:
|
||||||
|
- path: rtsp://localhost:8554/test_cam # <--- the name here must match the name of the camera
|
||||||
|
roles:
|
||||||
|
- record
|
||||||
|
- detect
|
||||||
|
- path: rtsp://192.168.1.5:554/live0 # <--- 1 connection to camera stream
|
||||||
|
roles:
|
||||||
|
- restream
|
||||||
|
```
|
||||||
|
|
||||||
|
### With Sub Stream
|
||||||
|
|
||||||
|
Two connections are made to the camera. One for the sub stream, one for the restream, `record` connects to the restream.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
cameras:
|
||||||
|
test_cam:
|
||||||
|
ffmpeg:
|
||||||
|
inputs:
|
||||||
|
- path: rtsp://localhost:8554/test_cam # <--- the name here must match the name of the camera
|
||||||
|
roles:
|
||||||
|
- record
|
||||||
|
- path: rtsp://192.168.1.5:554/stream # <--- camera high res stream
|
||||||
|
roles:
|
||||||
|
- restream
|
||||||
|
- path: rtsp://192.168.1.5:554/substream # <--- camera sub stream
|
||||||
|
roles:
|
||||||
|
- detect
|
||||||
|
```
|
||||||
|
@ -355,6 +355,7 @@ class FrigateApp:
|
|||||||
print(e)
|
print(e)
|
||||||
self.log_process.terminate()
|
self.log_process.terminate()
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
self.init_restream()
|
||||||
self.start_detectors()
|
self.start_detectors()
|
||||||
self.start_video_output_processor()
|
self.start_video_output_processor()
|
||||||
self.start_detected_frames_processor()
|
self.start_detected_frames_processor()
|
||||||
@ -362,7 +363,6 @@ class FrigateApp:
|
|||||||
self.start_camera_capture_processes()
|
self.start_camera_capture_processes()
|
||||||
self.init_stats()
|
self.init_stats()
|
||||||
self.init_web_server()
|
self.init_web_server()
|
||||||
self.init_restream()
|
|
||||||
self.start_mqtt_relay()
|
self.start_mqtt_relay()
|
||||||
self.start_event_processor()
|
self.start_event_processor()
|
||||||
self.start_event_cleanup()
|
self.start_event_cleanup()
|
||||||
|
Loading…
Reference in New Issue
Block a user