From bd012fbf1a88551ec3dbb65c72b5c7049281c27b Mon Sep 17 00:00:00 2001 From: aler9 <46489434+aler9@users.noreply.github.com> Date: Thu, 30 Jul 2020 15:36:41 +0200 Subject: [PATCH] update readme --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index d8b17757..9ea56853 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,17 @@ ffmpeg -f v4l2 -i /dev/video0 -f rtsp rtsp://localhost:8554/mystream The last command works only on Linux; for Windows and Mac equivalents, read the [ffmpeg wiki](https://trac.ffmpeg.org/wiki/Capture/Webcam). +#### On-demand publishing + +Edit `rtsp-simple-server.yml` and replace everything inside section `paths` with the following content: +```yaml +paths: + ondemand: + runOnDemand: ffmpeg -re -stream_loop -1 -i file.ts -c copy -f rtsp rtsp://localhost:8554/ondemand +``` + +The command inserted into `runOnDemand` will start only when a client requests the path `ondemand`, therefore the file will start streaming only when requested. + #### Remuxing, re-encoding, compression _rtsp-simple-server_ is an RTSP server: it publishes existing streams and does not touch them. It is not a media server, that is a far more complex and heavy software that can receive existing streams, re-encode them and publish them.