diff --git a/README.md b/README.md index c1e9ecabd9df..453b9b3eef7d 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,7 @@ And can be recorded with: * Streams are automatically converted from a protocol to another * Serve multiple streams at once in separate paths * Record streams to disk +* Playback recordings * Authenticate users; use internal or external authentication * Redirect readers to other RTSP servers (load balancing) * Query and control the server through the API @@ -115,6 +116,7 @@ _rtsp-simple-server_ has been rebranded as _MediaMTX_. The reason is pretty obvi * [Encrypt the configuration](#encrypt-the-configuration) * [Remuxing, re-encoding, compression](#remuxing-re-encoding-compression) * [Record streams to disk](#record-streams-to-disk) + * [Playback recordings](#playback-recordings) * [Forward streams to other servers](#forward-streams-to-other-servers) * [Proxy requests to other servers](#proxy-requests-to-other-servers) * [On-demand publishing](#on-demand-publishing) @@ -1183,6 +1185,44 @@ To upload recordings to a remote location, you can use _MediaMTX_ together with If you want to delete local segments after they are uploaded, replace `rclone sync` with `rclone move`. +### Playback recordings + +Recordings can be served to users through a dedicated HTTP server, that can be enabled inside the configuration: + +```yml +playback: yes +playbackAddress: :9996 +``` + +The server can be queried for recordings by using the URL: + +``` +http://localhost:9996/get?path=[mypath]&start=[start_date]&duration=[duration]&format=[format] +``` + +Where: + +* [mypath] is the path name +* [start_date] is the start date in RFC3339 format +* [duration] is the maximum duration of the recording in Golang format (example: 20s, 20h) +* [format] must be fmp4 + +All parameters must be [url-encoded](https://www.urlencoder.org/). + +For instance: + +``` +http://localhost:9996/get?path=stream2&start=2024-01-14T16%3A33%3A17%2B00%3A00&duration=200s&format=fmp4 +``` + +The produced video is natively compatible with any browser, therefore its URL can be directly inserted into a \