mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
Optimize restream docs (#5132)
* Update live.md * Update restream.md * Update live.md * Update camera_specific.md * Update restream.md * Update live.md * Update live.md * Update restream.md * Typo Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>
This commit is contained in:
parent
b2a2a9d6c7
commit
fb85c8ca54
@ -106,16 +106,20 @@ If available, recommended settings are:
|
|||||||
According to [this discussion](https://github.com/blakeblackshear/frigate/issues/3235#issuecomment-1135876973), the http video streams seem to be the most reliable for Reolink.
|
According to [this discussion](https://github.com/blakeblackshear/frigate/issues/3235#issuecomment-1135876973), the http video streams seem to be the most reliable for Reolink.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
go2rtc:
|
||||||
|
reolink: ffmpeg:http://reolink_ip/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=username&password=password#video=copy#audio=copy#audio=opus
|
||||||
|
reolink_sub: ffmpeg:http://reolink_ip/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=username&password=password
|
||||||
|
|
||||||
cameras:
|
cameras:
|
||||||
reolink:
|
reolink:
|
||||||
ffmpeg:
|
ffmpeg:
|
||||||
input_args: preset-http-reolink
|
|
||||||
inputs:
|
inputs:
|
||||||
- path: http://reolink_ip/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=username&password=password
|
- path: rtsp://127.0.0.1:8554/reolink?video=copy&audio=aac
|
||||||
|
input_args: preset-rtsp-restream
|
||||||
roles:
|
roles:
|
||||||
- record
|
- record
|
||||||
- rtmp
|
- path: rtsp://127.0.0.1:8554/reolink?video=copy
|
||||||
- path: http://reolink_ip/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=username&password=password
|
input_args: preset-rtsp-restream
|
||||||
roles:
|
roles:
|
||||||
- detect
|
- detect
|
||||||
detect:
|
detect:
|
||||||
|
@ -17,30 +17,16 @@ Live view options can be selected while viewing the live stream. The options are
|
|||||||
|
|
||||||
### Audio Support
|
### Audio Support
|
||||||
|
|
||||||
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 make sure both are enabled.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
go2rtc:
|
go2rtc:
|
||||||
streams:
|
streams:
|
||||||
test_cam: ffmpeg:rtsp://192.168.1.5:554/live0#video=copy#audio=aac#audio=opus
|
rtsp_cam: # <- for RTSP streams
|
||||||
```
|
- rtsp://192.168.1.5:554/live0 # <- stream which supports video & aac audio
|
||||||
|
- ffmpeg:rtsp_cam#audio=opus # <- copy of the stream which transcodes audio to the missing codec (usually will be opus)
|
||||||
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:
|
http_cam: # <- for http streams
|
||||||
|
- "ffmpeg:http://192.168.50.155/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=user&password=password#video=copy#audio=copy#audio=opus" # <- http streams must use ffmpeg to set all types
|
||||||
```yaml
|
|
||||||
go2rtc:
|
|
||||||
streams:
|
|
||||||
test_cam: ffmpeg:rtsp://192.168.1.5:554/live0#video=copy#audio=copy#audio=opus
|
|
||||||
```
|
|
||||||
|
|
||||||
Which will reuse your camera AAC audio, while also adding one track in OPUS format.
|
|
||||||
|
|
||||||
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
|
|
||||||
go2rtc:
|
|
||||||
streams:
|
|
||||||
test_cam: rtsp://192.168.1.5:554/live0
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Setting Stream For Live UI
|
### Setting Stream For Live UI
|
||||||
@ -50,8 +36,12 @@ There may be some cameras that you would prefer to use the sub stream for live v
|
|||||||
```yaml
|
```yaml
|
||||||
go2rtc:
|
go2rtc:
|
||||||
streams:
|
streams:
|
||||||
test_cam: ffmpeg:rtsp://192.168.1.5:554/live0#video=copy#audio=aac#audio=opus
|
rtsp_cam:
|
||||||
test_cam_sub: ffmpeg:rtsp://192.168.1.5:554/substream#video=copy#audio=aac#audio=opus
|
- rtsp://192.168.1.5:554/live0 # <- stream which supports video & aac audio. This is only supported for rtsp streams, http must use ffmpeg
|
||||||
|
- ffmpeg:rtsp_cam#audio=opus # <- copy of the stream which transcodes audio to opus
|
||||||
|
rtsp_cam_sub:
|
||||||
|
- rtsp://192.168.1.5:554/substream # <- stream which supports video & aac audio. This is only supported for rtsp streams, http must use ffmpeg
|
||||||
|
- ffmpeg:rtsp_cam_sub#audio=opus # <- copy of the stream which transcodes audio to opus
|
||||||
|
|
||||||
cameras:
|
cameras:
|
||||||
test_cam:
|
test_cam:
|
||||||
|
@ -28,42 +28,77 @@ One connection is made to the camera. One for the restream, `detect` and `record
|
|||||||
```yaml
|
```yaml
|
||||||
go2rtc:
|
go2rtc:
|
||||||
streams:
|
streams:
|
||||||
test_cam: ffmpeg:rtsp://192.168.1.5:554/live0#video=copy#audio=aac#audio=opus
|
rtsp_cam: # <- for RTSP streams
|
||||||
|
- rtsp://192.168.1.5:554/live0 # <- stream which supports video & aac audio
|
||||||
|
- ffmpeg:rtsp_cam#audio=opus # <- copy of the stream which transcodes audio to the missing codec (usually will be opus)
|
||||||
|
http_cam: # <- for http streams
|
||||||
|
- "ffmpeg:http://192.168.50.155/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=user&password=password#video=copy#audio=copy#audio=opus" # <- http streams must use ffmpeg to set all types
|
||||||
|
|
||||||
cameras:
|
cameras:
|
||||||
test_cam:
|
rtsp_cam:
|
||||||
ffmpeg:
|
ffmpeg:
|
||||||
output_args:
|
output_args:
|
||||||
record: preset-record-generic-audio-copy
|
record: preset-record-generic-audio-copy
|
||||||
inputs:
|
inputs:
|
||||||
- path: rtsp://127.0.0.1:8554/test_cam?video=copy&audio=aac # <--- the name here must match the name of the camera in restream
|
- path: rtsp://127.0.0.1:8554/rtsp_cam?video=copy&audio=aac # <--- the name here must match the name of the camera in restream
|
||||||
|
input_args: preset-rtsp-restream
|
||||||
|
roles:
|
||||||
|
- record
|
||||||
|
- detect
|
||||||
|
http_cam:
|
||||||
|
ffmpeg:
|
||||||
|
output_args:
|
||||||
|
record: preset-record-generic-audio-copy
|
||||||
|
inputs:
|
||||||
|
- path: rtsp://127.0.0.1:8554/http_cam?video=copy&audio=aac # <--- the name here must match the name of the camera in restream
|
||||||
input_args: preset-rtsp-restream
|
input_args: preset-rtsp-restream
|
||||||
roles:
|
roles:
|
||||||
- record
|
- record
|
||||||
- detect
|
- detect
|
||||||
```
|
```
|
||||||
|
|
||||||
### With Sub Stream
|
#### With Sub Stream
|
||||||
|
|
||||||
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
|
||||||
go2rtc:
|
go2rtc:
|
||||||
streams:
|
streams:
|
||||||
test_cam: ffmpeg:rtsp://192.168.1.5:554/live0#video=copy#audio=aac#audio=opus
|
rtsp_cam:
|
||||||
test_cam_sub: ffmpeg:rtsp://192.168.1.5:554/substream#video=copy#audio=aac#audio=opus
|
- rtsp://192.168.1.5:554/live0 # <- stream which supports video & aac audio. This is only supported for rtsp streams, http must use ffmpeg
|
||||||
|
- ffmpeg:rtsp_cam#audio=opus # <- copy of the stream which transcodes audio to opus
|
||||||
|
rtsp_cam_sub:
|
||||||
|
- rtsp://192.168.1.5:554/substream # <- stream which supports video & aac audio. This is only supported for rtsp streams, http must use ffmpeg
|
||||||
|
- ffmpeg:rtsp_cam_sub#audio=opus # <- copy of the stream which transcodes audio to opus
|
||||||
|
http_cam:
|
||||||
|
- "ffmpeg:http://192.168.50.155/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=user&password=password#video=copy#audio=copy#audio=opus" # <- http streams must use ffmpeg to set all types
|
||||||
|
http_cam_sub:
|
||||||
|
- "ffmpeg:http://192.168.50.155/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=user&password=password#video=copy#audio=copy#audio=opus" # <- http streams must use ffmpeg to set all types
|
||||||
|
|
||||||
cameras:
|
cameras:
|
||||||
test_cam:
|
rtsp_cam:
|
||||||
ffmpeg:
|
ffmpeg:
|
||||||
output_args:
|
output_args:
|
||||||
record: preset-record-generic-audio-copy
|
record: preset-record-generic-audio-copy
|
||||||
inputs:
|
inputs:
|
||||||
- path: rtsp://127.0.0.1:8554/test_cam?video=copy&audio=aac # <--- the name here must match the name of the camera in restream
|
- path: rtsp://127.0.0.1:8554/rtsp_cam?video=copy&audio=aac # <--- the name here must match the name of the camera in restream
|
||||||
input_args: preset-rtsp-restream
|
input_args: preset-rtsp-restream
|
||||||
roles:
|
roles:
|
||||||
- record
|
- record
|
||||||
- path: rtsp://127.0.0.1:8554/test_cam_sub?video=copy&audio=aac # <--- the name here must match the name of the camera_sub in restream
|
- path: rtsp://127.0.0.1:8554/rtsp_cam_sub?video=copy&audio=aac # <--- the name here must match the name of the camera_sub in restream
|
||||||
|
input_args: preset-rtsp-restream
|
||||||
|
roles:
|
||||||
|
- detect
|
||||||
|
http_cam:
|
||||||
|
ffmpeg:
|
||||||
|
output_args:
|
||||||
|
record: preset-record-generic-audio-copy
|
||||||
|
inputs:
|
||||||
|
- path: rtsp://127.0.0.1:8554/http_cam?video=copy&audio=aac # <--- the name here must match the name of the camera in restream
|
||||||
|
input_args: preset-rtsp-restream
|
||||||
|
roles:
|
||||||
|
- record
|
||||||
|
- path: rtsp://127.0.0.1:8554/http_cam_sub?video=copy&audio=aac # <--- the name here must match the name of the camera_sub in restream
|
||||||
input_args: preset-rtsp-restream
|
input_args: preset-rtsp-restream
|
||||||
roles:
|
roles:
|
||||||
- detect
|
- detect
|
||||||
|
Loading…
Reference in New Issue
Block a user