It is now possible to define forward destinations for each path configuration. For each destination, the server will create a client that will forward the stream to the intended destination. Supported protocols are RTSP, RTMP, SRT. API and metrics have also been improved to allow monitoring the new forwarding system. --------- Co-authored-by: aler9 <46489434+aler9@users.noreply.github.com>
56 lines
1.0 KiB
Markdown
56 lines
1.0 KiB
Markdown
# Forward streams
|
|
|
|
Incoming streams can be natively forwarded to other servers with the following protocols:
|
|
|
|
- [RTSP](#rtsp)
|
|
- [RTMP](#rtmp)
|
|
- [SRT](#srt)
|
|
|
|
It is also possible to use [FFmpeg](#ffmpeg) to perform the forwarding.
|
|
|
|
## RTSP
|
|
|
|
Add the target URL inside `dest` of a `forward` entry:
|
|
|
|
```yml
|
|
paths:
|
|
mypath:
|
|
forward:
|
|
- dest: rtsp://user:pass@host:port/path
|
|
```
|
|
|
|
## RTMP
|
|
|
|
Add the target URL inside `dest` of a `forward` entry:
|
|
|
|
```yml
|
|
paths:
|
|
mypath:
|
|
forward:
|
|
- dest: rtmp://user:pass@host:port/path#streamKey
|
|
```
|
|
|
|
## SRT
|
|
|
|
Add the target URL inside `dest` of a `forward` entry:
|
|
|
|
```yml
|
|
paths:
|
|
mypath:
|
|
forward:
|
|
- dest: srt://host:port?streamid=streamid
|
|
```
|
|
|
|
## FFmpeg
|
|
|
|
When the destination requires transcoding, filtering or a protocol that is not supported by `forward`, use _FFmpeg_ inside the `runOnAvailable` parameter instead:
|
|
|
|
```yml
|
|
pathDefaults:
|
|
runOnAvailable: >
|
|
ffmpeg -i rtsp://localhost:$RTSP_PORT/$MTX_PATH
|
|
-c copy
|
|
-f rtsp rtsp://other-server:8554/another-path
|
|
runOnAvailableRestart: yes
|
|
```
|