Skip to content

Instantly share code, notes, and snippets.

@half2me
Created Apr 23, 2020
Embed
What would you like to do?
RTSP authentication with python and gst-rtsp-server
server = GstRtspServer.RTSPServer()
auth = GstRtspServer.RTSPAuth()
token = GstRtspServer.RTSPToken()
token.set_string('media.factory.role', "user")
basic = GstRtspServer.RTSPAuth.make_basic("user", "password")
auth.add_basic(basic, token)
server.set_auth(auth)
factory = RtspFactory()
permissions = GstRtspServer.RTSPPermissions()
permissions.add_permission_for_role("user", "media.factory.access", True)
permissions.add_permission_for_role("user", "media.factory.construct", True)
factory.set_permissions(permissions)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment