diff --git a/README.md b/README.md index 424ae2c2..f23a1121 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,7 @@ Plus: * [Publish a webcam](#publish-a-webcam) * [Publish a Raspberry Pi Camera](#publish-a-raspberry-pi-camera) * [Remuxing, re-encoding, compression](#remuxing-re-encoding-compression) + * [Save published videos to disk](#save-published-videos-to-disk) * [On-demand publishing](#on-demand-publishing) * [Redirect to another server](#redirect-to-another-server) * [Fallback stream](#fallback-stream) @@ -413,6 +414,18 @@ paths: runOnPublishRestart: yes ``` +### Save published videos to disk + +To Save published videos to disk, it's enough to put _FFmpeg_ inside `runOnPublish`: + +```yml +paths: + all: + original: + runOnPublish: ffmpeg -i rtsp://localhost:$RTSP_PORT/$RTSP_PATH -c copy -f segment -strftime 1 -segment_time 60 -segment_format mp4 saved_%Y-%m-%d_%H-%M-%S.mp4 + runOnPublishRestart: yes +``` + ### On-demand publishing Edit `rtsp-simple-server.yml` and replace everything inside section `paths` with the following content: