Update live.md

This commit is contained in:
Nicolas Mowen 2023-01-18 07:58:06 -07:00 committed by GitHub
parent b022120627
commit 7083f413b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,46 +17,18 @@ 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.
#### RTSP Streams
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
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
```
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:
- 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:test_cam#audio=opus # <- copy of the stream which transcodes audio to opus
```
Which will reuse your camera AAC audio, while also adding one track in OPUS format.
#### HTTP Streams
```yaml
go2rtc:
streams:
test_cam: ffmpeg:http://reolink_ip/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=username&password=password#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:http://reolink_ip/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=username&password=password#video=copy#audio=copy#audio=opus
```
Which will reuse your camera AAC audio, while also adding one track in OPUS format.
### Setting Stream For Live UI
There may be some cameras that you would prefer to use the sub stream for live view, but the main stream for recording. This can be done via `live -> stream_name`.
@ -64,12 +36,12 @@ There may be some cameras that you would prefer to use the sub stream for live v
```yaml
go2rtc:
streams:
test_cam:
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:test_cam#audio=opus # <- copy of the stream which transcodes audio to opus
test_cam_sub:
- 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:test_cam_sub#audio=opus # <- copy of the stream which transcodes audio to opus
- ffmpeg:rtsp_cam_sub#audio=opus # <- copy of the stream which transcodes audio to opus
cameras:
test_cam: