diff --git a/docs/docs/configuration/camera_specific.md b/docs/docs/configuration/camera_specific.md index 8089f7104..06a7690a9 100644 --- a/docs/docs/configuration/camera_specific.md +++ b/docs/docs/configuration/camera_specific.md @@ -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. ```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: reolink: ffmpeg: - input_args: preset-http-reolink 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: - record - - rtmp - - path: http://reolink_ip/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=username&password=password + - path: rtsp://127.0.0.1:8554/reolink?video=copy + input_args: preset-rtsp-restream roles: - detect detect: diff --git a/docs/docs/configuration/live.md b/docs/docs/configuration/live.md index 6569e9891..9a963748c 100644 --- a/docs/docs/configuration/live.md +++ b/docs/docs/configuration/live.md @@ -17,30 +17,16 @@ Live view options can be selected while viewing the live stream. The options are ### 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 go2rtc: streams: - test_cam: ffmpeg:rtsp://192.168.1.5:554/live0#video=copy#audio=aac#audio=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: - -```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 + 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 ``` ### 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 go2rtc: streams: - 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 + rtsp_cam: + - 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: test_cam: diff --git a/docs/docs/configuration/restream.md b/docs/docs/configuration/restream.md index 76c8444d9..6f24b3199 100644 --- a/docs/docs/configuration/restream.md +++ b/docs/docs/configuration/restream.md @@ -28,42 +28,77 @@ One connection is made to the camera. One for the restream, `detect` and `record ```yaml go2rtc: 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: - test_cam: + rtsp_cam: ffmpeg: output_args: record: preset-record-generic-audio-copy 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 roles: - record - 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. ```yaml go2rtc: streams: - 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 + rtsp_cam: + - 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: - test_cam: + rtsp_cam: ffmpeg: output_args: record: preset-record-generic-audio-copy 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 - - 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 roles: - detect