Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MediaMTX #1224

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

Update MediaMTX #1224

wants to merge 16 commits into from

Conversation

mrlt8
Copy link
Owner

@mrlt8 mrlt8 commented May 22, 2024

Update MediaMTX which offers an updated authentication system for streams and recording.

NEW: STREAM_AUTH option to specify multiple users and paths:

  • Username and password should be separated by a :
  • An additional : can be used to specify the allowed IP address for the user.
    • This does NOT work with docker desktop
    • Specify multiple IPs using a comma
  • Use the @ to specify paths accessible to the user.
    • Paths are optional for each user.
    • Multiple paths can be specified by using a comma. If none are provided, the user will have access to all paths/streams
  • Multiple users can be specified by using | as a separator

EXAMPLES:

STREAM_AUTH=user:pass@cam-1,other-cam|second-user:password@just-one-cam|user3:pass
  • user:pass has access to cam-1 and other-cam
  • second-user:password has access to just-one-cam
  • user3:pass has access to all paths/cameras
STREAM_AUTH= user:pass:192.168.0.7|::192.168.0.10|::192.168.0.15,192.168.0.20@just-one-cam
  • user:pass has access to all paths/cameras when streaming from 192.168.0.7
  • No authentication required for all paths/cameras when streaming from 192.168.0.10
  • No authentication required for just-one-cam when streaming from 192.168.0.15 or from 192.168.0.20
STREAM_AUTH=user:pass|:@public-cam|::192.168.0.17
  • user:pass has access to all paths/cameras
  • No authentication required for public-cam
  • No authentication required for all paths/cameras when streaming from 192.168.0.17

Recording via MediaMTX:

RECORD_PATH Available variables are %path (path name), %Y %m %d %H %M %S %f %s (time in strftime format)
RECORD_LENGTH Length of each clip. Must use s for seconds , h for hours. Defaults to 60s
RECORD_KEEP Delete older clips. Set to 0s to disable automatic deletion. Defaults to 24h

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant