Page 1 of 1

Including credentials in an M3U8 file for VLC using RTSP

Posted: 01 Feb 2025 20:32
by calande
Hello,

I'm creating an M3U8 file containing RTSP streams of my IP cameras. Their accesses are restricted with credentials. I can successfully access them using VLC manually, opening a network stream (a popup asks for my username and password, and then I can see my live video). The problem is when I open an M3U8 file that has the stream and the credentials. VLC still asks for the password. This is my M3U8 file:

Code: Select all

#EXTM3U #EXTVLCOPT:network-caching=1000 #EXTVLCOPT:rtsp-user=myusernamegoeshere #EXTVLCOPT:rtsp-pwd=mypasswordgoeshere rtsp://192.168.1.10:554
I tried changing the stream URL to

Code: Select all

rtsp://myusernamegoeshere:mypasswordgoeshere@192.168.1.10:554
and also to

Code: Select all

http://myusernamegoeshere:mypasswordgoeshere@192.168.1.10:554
...to no avail... Do you know how to store the password in my M3U8 file so that VLC doesn't keep asking for it?

Thank you.

Re: Including credentials in an M3U8 file for VLC using RTSP

Posted: 05 Feb 2025 14:09
by calande
Does anyone know?

Re: Including credentials in an M3U8 file for VLC using RTSP

Posted: 19 Feb 2025 08:11
by JanB1
Interestingly enough, I also currently have problems when trying to connect to an RTSP stream and providing the username and password in the URL.
When I try to connect to the stream using "rtsp://myusernamegoeshere:mypasswordgoeshere@192.168.1.10" for example, in the debug output I get the info that "live555 error: Failed to connect with rtsp://myusernamegoeshere:554" and then "access_realrtsp error: cannot connect to myusernamegoeshere:0".

In the Log I can clearly see that VLC Player tries to connect to the wrong host. Maybe this problem is related to yours?