#!/usr/bin/env python3 """URL-encode a camera password for use in an RTSP URL. Runs entirely locally. The password is read without echoing via getpass — never written to disk, never sent anywhere. """ import getpass import urllib.parse password = getpass.getpass("Password (not echoed): ") encoded = urllib.parse.quote(password, safe="") print(f"\nURL-encoded: {encoded}") print( "\nPaste into .env like:") print(f" CAM_RTSP_='rtsp://admin:{encoded}@192.168.1.XXX:554/stream1'")