I am retrieving video from an IP-Camera using rtsp using a java web application; The rtsp url has embedded username/password in the url itself which seems to be quite insecure. e.g. rtsp://user:password@ip/...
Is there a way to to prevent sending the username/password in the URL.
What will be the best possible way to secure the URL?
Username/password in the URL is a way to write url. Rtsp agent will use it to authenticate with basic or digest authentication. So your password will be encoded and transported as a rtsp header.
Given a username and password, you can set them using environment variables like this:
USER=myusername
PASSWD=mypassword
For example, if your camera's IP address is 192.168.0.101, then you can access the camera via its RTSP URL:
rtsp://"${USER}":"${PASSWD}"@192.168.0.101:554
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With