RTSP authentication issue.

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
Balaraj adappa
New Cone
New Cone
Posts: 5
Joined: 21 Dec 2018 10:02

RTSP authentication issue.

Postby Balaraj adappa » 03 Jan 2019 06:39

Hi forum,

i have rtsp server which has support for Digest authentication system, i want to use VLC as client to communicate with my camera RTSP server, when i send request from vlc client. but Camera server sends 401 Unauthrized error message with WWW-Authenticate header with valid realm and nonce ,but VLC is not sending any authorization header to server,it keep asking username and password. even if i enter valid username,password its not sending any Authorization header.
please your help would appreciated,

thanks
Balaraj

chubinou
Developer
Developer
Posts: 521
Joined: 23 Jul 2015 15:19

Re: RTSP authentication issue.

Postby chubinou » 03 Jan 2019 10:13

Hi,

Could you provide logs ? make sure that nothing to sensitive is not published publicly
To help you, we need messages, to completely understand what your problems is.
To fix this, please be sure before you start the playback to:
  1. Open: Tools -> Messages.
  2. Set Verbosity to 2
  3. Start playback to reproduce your issue
  4. Save text in a file or copy into clipboard
  5. Then paste the full resulting log here between [​code]and[​/code] (or use Pastebin.com if it's too long)
Also don't forget to name your Operating System and provide the VLC media player version.

Balaraj adappa
New Cone
New Cone
Posts: 5
Joined: 21 Dec 2018 10:02

Re: RTSP authentication issue.

Postby Balaraj adappa » 03 Jan 2019 12:49

Hi @chubinou , thanks for your quick response. please find the log file here what i got when i tried to playback RTSP stream with digest authentication.

Code: Select all

main debug: adding item `rtsp://192.168.1.30:554/' ( rtsp://192.168.1.30:554/ ) qt4 debug: Adding a new MRL to recent ones: rtsp://192.168.1.30:554/ main debug: processing request item: rtsp://192.168.1.30:554/, node: null, skip: 0 main debug: rebuilding array of current - root Playlist main debug: rebuild done - 1 items, index 0 main debug: starting playback of the new playlist item main debug: resyncing on rtsp://192.168.1.30:554/ main debug: rtsp://192.168.1.30:554/ is at 0 main debug: creating new input thread main debug: Creating an input for 'rtsp://192.168.1.30:554/' main debug: no fetch required for (null) (art currently (null)) main debug: using timeshift granularity of 50 MiB, in path 'C:\Users\Tesla\AppData\Local\Temp' main debug: `rtsp://192.168.1.30:554/' gives access `rtsp' demux `' path `192.168.1.30:554/' main debug: creating demux: access='rtsp' demux='' location='192.168.1.30:554/' file='\\192.168.1.30:554\' main debug: looking for access_demux module matching "rtsp": 12 candidates live555 debug: version 2014.05.27 qt4 debug: IM: Setting an input live555 debug: authentication failed live555 debug: retrying with user=Mustafa live555 debug: authentication failed live555 error: Failed to connect with rtsp://192.168.1.30:554/ main debug: no access_demux modules matched main debug: creating access 'rtsp' location='192.168.1.30:554/', path='\\192.168.1.30:554\' main debug: looking for access module matching "rtsp": 20 candidates
thanks
Balaraj

chubinou
Developer
Developer
Posts: 521
Joined: 23 Jul 2015 15:19

Re: RTSP authentication issue.

Postby chubinou » 03 Jan 2019 18:15

Hi,

Are you sure you are using the right URL. for instance, some axis camera require a path like axis-media/media.amp after the URL (you may look at https://www.soleratec.com/support/rtsp/)

Could you try with VLC 3.0.x ?

You can check with wireshark that the password is actually transmitted
you should see something like "Authorization: Basic dXNlcjpwYXNzCg==" in RTSP stream

Rémi Denis-Courmont
Developer
Developer
Posts: 15312
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: RTSP authentication issue.

Postby Rémi Denis-Courmont » 03 Jan 2019 18:27

Don't use Digest authentication. It's insecure. For RTSP, the only way realistic way to achieve security is to run it over a VPN and with Basic authentication.

live555 does not seem to support Digest authentication. And frankly, if I were the live555 developer, I would not care.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Balaraj adappa
New Cone
New Cone
Posts: 5
Joined: 21 Dec 2018 10:02

Re: RTSP authentication issue.

Postby Balaraj adappa » 04 Jan 2019 05:49

Hello @chubinou ,
Are you sure you are using the right URL.
Yes i am using Right URL if i use wrong URL , i wont grt any requests from Client, Iam getting request and sending responses as server.
Could you try with VLC 3.0.x ?
Hi tried using all possible VLC Versions for Windows and Android.
You can check with wireshark that the password is actually transmitted
you should see something like "Authorization: Basic dXNlcjpwYXNzCg==" in RTSP stream
i am watching trffic in wireshark itself, but i can see request response till WWW-Authentication header sent from RTSP server, after that i can't see Authorization request sending from VLC client, And i don't want to use Basic since it sends Password username in Clear Text.

Rémi Denis-Courmont
Developer
Developer
Posts: 15312
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: RTSP authentication issue.

Postby Rémi Denis-Courmont » 05 Jan 2019 10:25

VLC/live555 does not support RTSP with Digest and there are no plans to add support for that obsolete authentication scheme.

Digest-MD5 does not protect the integrity of the password either. MD5 has been broken for many years. And to make matters worse, Digest authentication requires the password (or A1) is stored permanently on the server side.

If you want RTSP with security, you need a VPN + Basic authentication. Alternatively don't use RTSP.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Balaraj adappa
New Cone
New Cone
Posts: 5
Joined: 21 Dec 2018 10:02

Re: RTSP authentication issue.

Postby Balaraj adappa » 21 Jan 2019 05:07

VLC/live555 does not support RTSP with Digest and there are no plans to add support for that obsolete authentication scheme.

Digest-MD5 does not protect the integrity of the password either. MD5 has been broken for many years. And to make matters worse, Digest authentication requires the password (or A1) is stored permanently on the server side.

If you want RTSP with security, you need a VPN + Basic authentication. Alternatively don't use RTSP.
Vlc not supporting even RTSP Basic authentication also.
i am receiving Rtsp describe request from VLC Client to my rtsp server and replying with RTSP/1.0 401 Unauthorized but for this VLC should send Describe request with valid Authorization header ,hence i am giving valid username and password.
but i am not receiving any request from vlc rtsp client to my rtsp server.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 43 guests