It's possible to setup authentication for readers too:
```yml
paths:
all:
publishUser: myuser
publishPass: mypass
readUser: user
readPass: userpass
pathDefaults:
readUser: user
readPass: userpass
```
If storing plain credentials in the configuration file is a security problem, username and passwords can be stored as sha256-hashed strings; a string must be hashed with sha256 and encoded with base64:
**WARNING**: enable encryption or use a VPN to ensure that no one is intercepting the credentials in transit.
@ -1133,7 +1127,7 @@ To change the format, codec or compression of a stream, use _FFmpeg_ or _GStream
@@ -1133,7 +1127,7 @@ To change the format, codec or compression of a stream, use _FFmpeg_ or _GStream
All available recording parameters are listed in the [sample configuration file](/mediamtx.yml).
Be aware that not all tracks can be saved. A compatibility matrix is available at the beginning of the README.
Be aware that not all codecs can be saved with all formats, as described in the compatibility matrix at the beginning of the README.
To upload recordings to a remote location, you can use _MediaMTX_ together with [rclone](https://github.com/rclone/rclone), a command line tool that provides file synchronization capabilities with a huge variety of services (including S3, FTP, SMB, Google Drive):
@ -1172,17 +1167,14 @@ To upload recordings to a remote location, you can use _MediaMTX_ together with
@@ -1172,17 +1167,14 @@ To upload recordings to a remote location, you can use _MediaMTX_ together with
3. Place `rclone` into the `runOnInit` and `runOnRecordSegmentComplete` hooks:
```yml
record: yes
paths:
mypath:
# this is needed to sync segments after a crash.
# replace myconfig with the name of the rclone config.
If you want to delete local segments after they are uploaded, replace `rclone sync` with `rclone move`.
@ -1192,13 +1184,12 @@ To upload recordings to a remote location, you can use _MediaMTX_ together with
@@ -1192,13 +1184,12 @@ To upload recordings to a remote location, you can use _MediaMTX_ together with
To forward incoming streams to another server, use _FFmpeg_ inside the `runOnReady` parameter: