Page 1 of 1
passing rtsp authentication informations
Posted: 03 Mar 2008 12:09
by yvesb
Hello, at all
I have installed the "Darwin Streaming Server" on my machine and am able to access my video streams with a second one.
With QuickTime Player I even can gain access to the videos that need authentication.
But with VLC it neither works under Linux or Windows.
The commands i tried where the followings:
Code: Select all
rtsp://username:password@IP-Address/subfolder/sample.mp4
Code: Select all
rtsp://IP-Address/subfolder/sample.mp4 --rtsp-user=username --rtsp-pwd=password
Code: Select all
rtsp://IP-Address/subfolder/sample.mp4
With the last command it just keeps asking me to reenter the user name and the password.
Any suggestions to solve this?
Thanks in advance.
Re: passing rtsp authentication informations
Posted: 03 Mar 2008 14:05
by yvesb
Here you get that i can capture from the conversation between the Client
VLC 8.6e and the Server.
Code: Select all
OPTIONS rtsp://192.168.102.58/streaming_media/sample_100kbit.mp4 RTSP/1.0
CSeq: 1
User-Agent: VLC media player (LIVE555 Streaming Media v2007.02.20)
RTSP/1.0 200 OK
Server: DSS/5.5.5 (Build/489.16; Platform/Linux; Release/Darwin; state/beta; )
Cseq: 1
Public: DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, OPTIONS, ANNOUNCE, RECORD
DESCRIBE rtsp://192.168.102.58/streaming_media/sample_100kbit.mp4 RTSP/1.0
CSeq: 2
Accept: application/sdp
User-Agent: VLC media player (LIVE555 Streaming Media v2007.02.20)
RTSP/1.0 401 Unauthorized
Server: DSS/5.5.5 (Build/489.16; Platform/Linux; Release/Darwin; state/beta; )
Cseq: 2
WWW-Authenticate: Digest realm="Streaming Server", nonce="59dd520e1f9132c04ea6a45b80c4e4ed"
This is a capture of the conversation between the client
QuickTime and the Server:
Code: Select all
DESCRIBE rtsp://192.168.102.58/streaming_media/sample_100kbit.mp4 RTSP/1.0
CSeq: 1
Accept: application/sdp
Bandwidth: 384000
Accept-Language: en-US
User-Agent: QuickTime/7.4.1 (qtver=7.4.1;os=Windows NT 5.1Service Pack 2)
RTSP/1.0 401 Unauthorized
Server: DSS/5.5.5 (Build/489.16; Platform/Linux; Release/Darwin; state/beta; )
Cseq: 1
WWW-Authenticate: Digest realm="Streaming Server", nonce="e539951941e259b7e69f7642cb5ea498"
DESCRIBE rtsp://192.168.102.58/streaming_media/sample_100kbit.mp4 RTSP/1.0
CSeq: 2
Accept: application/sdp
Bandwidth: 384000
Accept-Language: en-US
User-Agent: QuickTime/7.4.1 (qtver=7.4.1;os=Windows NT 5.1Service Pack 2)
Authorization: Digest username="admin", realm="Streaming Server", nonce="e539951941e259b7e69f7642cb5ea498", uri="/streaming_media/sample_100kbit.mp4", response="e68bd443e12e95e91f06225f3dfefe93"
RTSP/1.0 200 OK
Server: DSS/5.5.5 (Build/489.16; Platform/Linux; Release/Darwin; state/beta; )
Cseq: 2
Last-Modified: Thu, 28 Feb 2008 07:24:23 GMT
Cache-Control: must-revalidate
Content-length: 1224
Date: Mon, 03 Mar 2008 12:55:15 GMT
Expires: Mon, 03 Mar 2008 12:55:15 GMT
Content-Type: application/sdp
x-Accept-Retransmit: our-retransmit
x-Accept-Dynamic-Rate: 1
Content-Base: rtsp://192.168.102.58/streaming_media/sample_100kbit.mp4/
v=0
o=StreamingServer 3413537756 1204183463000 IN IP4 192.168.102.58
s=/streaming_media/sample_100kbit.mp4
u=http:///
e=admin@
c=IN IP4 0.0.0.0
b=AS:96
t=0 0
a=control:*
a=mpeg4-iod:"data:application/mpeg4-iod;base64,AoJrAE///w/z/wOBdgABQNhkYXRhOmFwcGxpY2F0aW9uL21wZWc0LW9kLWF1O2Jhc2U2NCxBWUVDQVV3Rkh3TklBTWtnQUdVRUx5QVJBRzNkQUFFaytBQUJKUGdGSUFBQUFiRHpBQUFCdFE3Z1FNRFBBQUFCQUFBQUFTQUFoRUQ2S0RBZzhxSWZCaEFBUkFBQUFsZ0FBQUFBSUFBQUFBQURBVElDbndNdUFHVUFCSUNBZ0JSQUZRQVlBQUFBVGlBQUFFNGdCWUNBZ0FJVmtBWVFBRVFBQUI5QUFBQWZRQ0FnQUFBQUF3PT0EDQEFAADIAAAAAAAAAAAGCQEAAAAAAAAAAANpAAJARmRhdGE6YXBwbGljYXRpb24vbXBlZzQtYmlmcy1hdTtiYXNlNjQsd0JBU2daTUNvRmNtRUVIOEFBQUIvQUFBQkVLQ0tDbjQEEgINAABkAAAAAAAAAAAFAwAAYAYJAQAAAAAAAAAA"
a=isma-compliance:1,1.0,1
a=range:npt=0- 70.00000
m=video 0 RTP/AVP 96
b=AS:76
a=rtpmap:96 MP4V-ES/90000
a=control:trackID=3
a=cliprect:0,0,242,192
a=framesize:96 192-242
a=fmtp:96 profile-level-id=1;config=000001B0F3000001B50EE040C0CF0000010000000120008440FA283020F2A21F
a=mpeg4-esid:201
m=audio 0 RTP/AVP 97
b=AS:20
a=rtpmap:97 mpeg4-generic/8000/2
a=control:trackID=4
a=fmtp:97 profile-level-id=15;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1590
a=mpeg4-esid:101
SETUP rtsp://192.168.102.58/streaming_media/sample_100kbit.mp4/trackID=3 RTSP/1.0
CSeq: 3
Transport: RTP/AVP;unicast;client_port=6970-6971
x-retransmit: our-retransmit
x-dynamic-rate: 1
x-transport-options: late-tolerance=1.400000
User-Agent: QuickTime/7.4.1 (qtver=7.4.1;os=Windows NT 5.1Service Pack 2)
Authorization: Digest username="admin", realm="Streaming Server", nonce="e539951941e259b7e69f7642cb5ea498", uri="/streaming_media/sample_100kbit.mp4", response="effaf7605bbffc4a877b57a98653badc"
Accept-Language: en-US
OPTIONS * RTSP/1.0
Content-Type: application/x-random-data
Content-Length: 1400
.(.`QoD9 ..cM..,@%.k..M.#..P.....-.4-....GuR..|Atc..&.de`..G.#./..T....j...lF....}d..a=6...l...v.>..n..rdt..DH.zD5.T....;..:.].45F&;[t...W.auk.'.g.<..s2ML.-...q;.]J..x..b.3..Gg...dr..z9.T..12h..Ne....3..h.-.f`$59.[.U. .]bb.8<n.H..L^...3.....k.`..Cn..dQ2.T.<....Y.2..WB3z.I.XYe.iZo..+;S../...n.q:n.......S=n.i<.S-...;4.QN..J0...$.K.5a..i.._z.l...K5"([.B...pj..U..{_.m"QK..D...0..wl...P.X.cz=... t....Io.(.s0.U<..xT...=..C?...Q4.`z..,{.'=;.....-{|KrmX.@A.z10.4.VDs.;...B..'yl..~...3
w.N...^UV..V.
.....)vfq...c.%.r..4 ..\~...;.[]>...S.t.4g.YKI.....rD.4.,...D.....).Hs..?...oK....^.p...E.#uE.F.2..&?...C...f......."...k..,!...09..].......#..@}[.q.,.Z_...;g.mW....V
.../Co..kX.?.2u..3.u.Z.i.{...s.@.IM.e..(.c.@...<.J.n....8N.......}..W\...0.")iw..}.y.a..5F:p..k+T...uC.......d......w]...x..
....L...Q. .9#...6..+...4.a.t.\-tk..9..gXS.?.H.....4oX^xQ ...r..l...-...D$..Ub.S+.uL&.....B.-F..+..._2:.3.TO..z.^/.m.q....[.d.m(^..
Z.{.....^F.$...JR.f[S.%RyF.F....+m..|.........
N...$9....7.{..Vi]8.].
.'....m..y.L.U..C;F.5Y.......K.-.7.C~.&..Tu......x7...1.4:..~W}v.3.
~....*...-R......V.^.).7.)...q.~.w...N.sEyy..sD].8J..V.....c.G...P:
.o.....n.)...xc..N...a+.X..
.#J&.~.......Q{+B8.>~c>/W..5.D.YX...b2...].e.d.(.\..g..Z.V...SG..V...O.^)G.H...z.&...aa..U.6(w.+.Q...X... ..}Jq..'aBk.(..]..7J.hy.@..i....&..8F]TM..,!..{}C..[.}.S...[...@.../A.gb.w,.IN7...}8YF.fd.`J...F0..
..9,u.\........}.g.uK..%..ZH.';....(.N1&RTSP/1.0 501 Not Implemented
RTSP/1.0 200 OK
Server: DSS/5.5.5 (Build/489.16; Platform/Linux; Release/Darwin; state/beta; )
Cseq: 3
Last-Modified: Thu, 28 Feb 2008 07:24:23 GMT
Cache-Control: must-revalidate
Session: 4769576503670100804
Date: Mon, 03 Mar 2008 12:55:15 GMT
Expires: Mon, 03 Mar 2008 12:55:15 GMT
Transport: RTP/AVP;unicast;source=192.168.102.58;client_port=6970-6971;server_port=6970-6971;ssrc=228DC2FC
x-Transport-Options: late-tolerance=1.400000
x-Retransmit: our-retransmit
x-Dynamic-Rate: 1;rtt=24
SETUP rtsp://192.168.102.58/streaming_media/sample_100kbit.mp4/trackID=4 RTSP/1.0
CSeq: 4
Transport: RTP/AVP;unicast;client_port=6972-6973
x-retransmit: our-retransmit
x-dynamic-rate: 1
x-transport-options: late-tolerance=1.400000
Session: 4769576503670100804
User-Agent: QuickTime/7.4.1 (qtver=7.4.1;os=Windows NT 5.1Service Pack 2)
Authorization: Digest username="admin", realm="Streaming Server", nonce="e539951941e259b7e69f7642cb5ea498", uri="/streaming_media/sample_100kbit.mp4", response="effaf7605bbffc4a877b57a98653badc"
Accept-Language: en-US
RTSP/1.0 200 OK
Server: DSS/5.5.5 (Build/489.16; Platform/Linux; Release/Darwin; state/beta; )
Cseq: 4
Session: 4769576503670100804
Last-Modified: Thu, 28 Feb 2008 07:24:23 GMT
Cache-Control: must-revalidate
Date: Mon, 03 Mar 2008 12:55:15 GMT
Expires: Mon, 03 Mar 2008 12:55:15 GMT
Transport: RTP/AVP;unicast;source=192.168.102.58;client_port=6972-6973;server_port=6970-6971;ssrc=1BA7B988
x-Transport-Options: late-tolerance=1.400000
x-Retransmit: our-retransmit
x-Dynamic-Rate: 1
PLAY rtsp://192.168.102.58/streaming_media/sample_100kbit.mp4 RTSP/1.0
CSeq: 5
Range: npt=0.000000-70.000000
x-prebuffer: maxtime=2.000000
x-transport-options: late-tolerance=10
Session: 4769576503670100804
User-Agent: QuickTime/7.4.1 (qtver=7.4.1;os=Windows NT 5.1Service Pack 2)
Authorization: Digest username="admin", realm="Streaming Server", nonce="e539951941e259b7e69f7642cb5ea498", uri="/streaming_media/sample_100kbit.mp4", response="6730eece10cd8ada298f94a374b64af7"
RTSP/1.0 200 OK
Server: DSS/5.5.5 (Build/489.16; Platform/Linux; Release/Darwin; state/beta; )
Cseq: 5
Session: 4769576503670100804
Range: npt=0.00000-70.00000
RTP-Info: url=rtsp://192.168.102.58/streaming_media/sample_100kbit.mp4/trackID=3;seq=18913;rtptime=819772400,url=rtsp://192.168.102.58/streaming_media/sample_100kbit.mp4/trackID=4;seq=15387;rtptime=1984292689
SET_PARAMETER rtsp://192.168.102.58/streaming_media/sample_100kbit.mp4 RTSP/1.0
CSeq: 6
x-transport-options: late-tolerance=1.400000
Session: 4769576503670100804
User-Agent: QuickTime/7.4.1 (qtver=7.4.1;os=Windows NT 5.1Service Pack 2)
Authorization: Digest username="admin", realm="Streaming Server", nonce="e539951941e259b7e69f7642cb5ea498", uri="/streaming_media/sample_100kbit.mp4", response="d53bb5aab0cb69558602ff6e9aea0d46"
RTSP/1.0 200 OK
Server: DSS/5.5.5 (Build/489.16; Platform/Linux; Release/Darwin; state/beta; )
Cseq: 6
Session: 4769576503670100804
PAUSE rtsp://192.168.102.58/streaming_media/sample_100kbit.mp4 RTSP/1.0
CSeq: 7
Session: 4769576503670100804
User-Agent: QuickTime/7.4.1 (qtver=7.4.1;os=Windows NT 5.1Service Pack 2)
Authorization: Digest username="admin", realm="Streaming Server", nonce="e539951941e259b7e69f7642cb5ea498", uri="/streaming_media/sample_100kbit.mp4", response="33ca711047ec941bd73b9133c43bde7f"
RTSP/1.0 200 OK
Server: DSS/5.5.5 (Build/489.16; Platform/Linux; Release/Darwin; state/beta; )
Cseq: 7
Session: 4769576503670100804
TEARDOWN rtsp://192.168.102.58/streaming_media/sample_100kbit.mp4 RTSP/1.0
CSeq: 8
Session: 4769576503670100804
User-Agent: QuickTime/7.4.1 (qtver=7.4.1;os=Windows NT 5.1Service Pack 2)
Authorization: Digest username="admin", realm="Streaming Server", nonce="e539951941e259b7e69f7642cb5ea498", uri="/streaming_media/sample_100kbit.mp4", response="84f71a7fd7c2fa487e72bdcc25310e36"
RTSP/1.0 200 OK
Server: DSS/5.5.5 (Build/489.16; Platform/Linux; Release/Darwin; state/beta; )
Cseq: 8
Session: 4769576503670100804
Connection: Close
I hope this information is useful.
Re: passing rtsp authentication informations
Posted: 07 Mar 2008 08:11
by yvesb
Push.
Re: passing rtsp authentication informations
Posted: 07 Mar 2008 15:46
by RĂ©mi Denis-Courmont
I think we don't support Digest authentication.
Re: passing rtsp authentication informations
Posted: 08 Mar 2008 20:12
by yvesb
Thx, for your reply Remi.
Well i tried it now with
Basic Authentication and got the same results as before with Digest Authentication.
Still get 401Unauthorized.
Commands i tried.
Code: Select all
rtsp://127.0.0.1/video/sample_100kbit.mp4
and entering the parameters trough the input window.
Code: Select all
rtsp://admin:admin@127.0.0.1/video/sample_100kbit.mp4
Here is a capture with wireshark.
Code: Select all
OPTIONS rtsp://127.0.0.1/video/sample_100kbit.mp4 RTSP/1.0
CSeq: 3
Authorization: Basic YWRtaW46YWRtaW4=
User-Agent: VLC media player (LIVE555 Streaming Media v2008.02.08)
RTSP/1.0 200 OK
Server: DSS/5.5.5 (Build/489.16; Platform/Linux; Release/Darwin; state/beta; )
Cseq: 3
Public: DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, OPTIONS, ANNOUNCE, RECORD
DESCRIBE rtsp://127.0.0.1/video/sample_100kbit.mp4 RTSP/1.0
CSeq: 4
Accept: application/sdp
Authorization: Basic YWRtaW46YWRtaW4=
User-Agent: VLC media player (LIVE555 Streaming Media v2008.02.08)
RTSP/1.0 200 OK
Server: DSS/5.5.5 (Build/489.16; Platform/Linux; Release/Darwin; state/beta; )
Cseq: 4
Last-Modified: Wed, 05 Mar 2008 13:11:26 GMT
Cache-Control: must-revalidate
Content-length: 1209
Date: Sat, 08 Mar 2008 19:00:19 GMT
Expires: Sat, 08 Mar 2008 19:00:19 GMT
Content-Type: application/sdp
x-Accept-Retransmit: our-retransmit
x-Accept-Dynamic-Rate: 1
Content-Base: rtsp://127.0.0.1/video/sample_100kbit.mp4/
v=0
o=StreamingServer 3413991619 1204722686000 IN IP4 127.0.0.1
s=/video/sample_100kbit.mp4
u=http:///
e=admin@
c=IN IP4 0.0.0.0
b=AS:96
t=0 0
a=control:*
a=mpeg4-iod:"data:application/mpeg4-iod;base64,AoJrAE///w/z/wOBdgABQNhkYXRhOmFwcGxpY2F0aW9uL21wZWc0LW9kLWF1O2Jhc2U2NCxBWUVDQVV3Rkh3TklBTWtnQUdVRUx5QVJBRzNkQUFFaytBQUJKUGdGSUFBQUFiRHpBQUFCdFE3Z1FNRFBBQUFCQUFBQUFTQUFoRUQ2S0RBZzhxSWZCaEFBUkFBQUFsZ0FBQUFBSUFBQUFBQURBVElDbndNdUFHVUFCSUNBZ0JSQUZRQVlBQUFBVGlBQUFFNGdCWUNBZ0FJVmtBWVFBRVFBQUI5QUFBQWZRQ0FnQUFBQUF3PT0EDQEFAADIAAAAAAAAAAAGCQEAAAAAAAAAAANpAAJARmRhdGE6YXBwbGljYXRpb24vbXBlZzQtYmlmcy1hdTtiYXNlNjQsd0JBU2daTUNvRmNtRUVIOEFBQUIvQUFBQkVLQ0tDbjQEEgINAABkAAAAAAAAAAAFAwAAYAYJAQAAAAAAAAAA"
a=isma-compliance:1,1.0,1
a=range:npt=0- 70.00000
m=video 0 RTP/AVP 96
b=AS:76
a=rtpmap:96 MP4V-ES/90000
a=control:trackID=3
a=cliprect:0,0,242,192
a=framesize:96 192-242
a=fmtp:96 profile-level-id=1;config=000001B0F3000001B50EE040C0CF0000010000000120008440FA283020F2A21F
a=mpeg4-esid:201
m=audio 0 RTP/AVP 97
b=AS:20
a=rtpmap:97 mpeg4-generic/8000/2
a=control:trackID=4
a=fmtp:97 profile-level-id=15;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1590
a=mpeg4-esid:101
SETUP rtsp://127.0.0.1/video/sample_100kbit.mp4/trackID=3 RTSP/1.0
CSeq: 5
Transport: RTP/AVP;unicast;client_port=32778-32779
User-Agent: VLC media player (LIVE555 Streaming Media v2008.02.08)
RTSP/1.0 401 Unauthorized
Server: DSS/5.5.5 (Build/489.16; Platform/Linux; Release/Darwin; state/beta; )
Cseq: 5
WWW-Authenticate: Basic realm="Streaming Server"
SETUP rtsp://127.0.0.1/video/sample_100kbit.mp4/trackID=4 RTSP/1.0
CSeq: 6
Transport: RTP/AVP;unicast;client_port=32780-32781
User-Agent: VLC media player (LIVE555 Streaming Media v2008.02.08)
RTSP/1.0 401 Unauthorized
Server: DSS/5.5.5 (Build/489.16; Platform/Linux; Release/Darwin; state/beta; )
Cseq: 6
WWW-Authenticate: Basic realm="Streaming Server"
And here is the Output from the Terminal window.
Code: Select all
:~$ vlc rtsp://admin:admin@127.0.0.1/video/sample_100kbit.mp4
VLC media player 0.8.6e Janus
[00000268] live555 demuxer error: SETUP of'video/MP4V-ES' failed SETUP: cannot handle response: RTSP/1.0 401 Unauthorized
[00000268] live555 demuxer error: SETUP of'audio/MPEG4-GENERIC' failed SETUP: cannot handle response: RTSP/1.0 401 Unauthorized
[00000268] live555 demuxer error: Nothing to play for rtsp://admin:admin@127.0.0.1/video/sample_100kbit.mp4
[00000269] main access error: cannot resolve admin port 80 : Name or service not known
[00000269] access_realrtsp access error: cannot connect to admin:0
[00000267] main input error: no suitable access module for `rtsp://admin:admin@127.0.0.1/video/sample_100kbit.mp4'
[00000257] main playlist: nothing to play
[00000257] main playlist: stopping playback
yves@dv6610-nb:~$ vlc rtsp://admin:admin@127.0.0.1/video/sample_100kbit.mp4
VLC media player 0.8.6e Janus
[00000268] live555 demuxer error: SETUP of'video/MP4V-ES' failed SETUP: cannot handle response: RTSP/1.0 401 Unauthorized
[00000268] live555 demuxer error: SETUP of'audio/MPEG4-GENERIC' failed SETUP: cannot handle response: RTSP/1.0 401 Unauthorized
[00000268] live555 demuxer error: Nothing to play for rtsp://admin:admin@127.0.0.1/video/sample_100kbit.mp4
[00000269] main access error: cannot resolve admin port 80 : Name or service not known
[00000269] access_realrtsp access error: cannot connect to admin:0
[00000267] main input error: no suitable access module for `rtsp://admin:admin@127.0.0.1/video/sample_100kbit.mp4'
[00000257] main playlist: nothing to play
[00000257] main playlist: stopping playback
yves@dv6610-nb:~$ vlc rtsp://admin:admin@127.0.0.1/video/sample_100kbit.mp4
VLC media player 0.8.6e Janus
[00000268] live555 demuxer error: SETUP of'video/MP4V-ES' failed SETUP: cannot handle response: RTSP/1.0 401 Unauthorized
[00000268] live555 demuxer error: SETUP of'audio/MPEG4-GENERIC' failed SETUP: cannot handle response: RTSP/1.0 401 Unauthorized
[00000268] live555 demuxer error: Nothing to play for rtsp://admin:admin@127.0.0.1/video/sample_100kbit.mp4
[00000269] main access error: cannot resolve admin port 80 : Name or service not known
[00000269] access_realrtsp access error: cannot connect to admin:0
[00000267] main input error: no suitable access module for `rtsp://admin:admin@127.0.0.1/video/sample_100kbit.mp4'
[00000257] main playlist: nothing to play
[00000257] main playlist: stopping playback
:~$
Between, keep up the good work.
Best wishes, Yves
Re: passing rtsp authentication informations
Posted: 26 Jun 2008 10:50
by niketrk
Hi,
With my IP camera, I am facing problem when authentication is enabled in RTSP.
I am using VLC 8.6h.
With quicktime it is working.
The Problem that I have found is, in case of quicktime, after "DESCRIBE" command, when "SETUP" command is sent, username and password is sent again for each "setup" packet.
In case of VLC, authentication information is sent only once with "DESCRIBE" command, but with "SETUP" command it is not sending and so authorization is failed.
I checked with live555 openRTSP.exe. It can successfully captured the video, when authentication is enabled.
So I think, VLC is not sending "SETUP" command properly.
Please help me out.
Thanks
Niket
Re: passing rtsp authentication informations
Posted: 03 Sep 2008 19:34
by clayton
I'm seeing the same thing that niketrk reports.
Media Player Classic using QuickTime Lite (QuickTime v7.5) works and sends the authentication string along with the SETUP RTSP command, but VLC v0.8.6i does not work and does not send the authentication string with SETUP RTSP command.
Note that VLC does send the authentication with the DESCRIBE RTSP command and that seems to work.
I'm connecting to a QuickTime stream from a serer that has this Server header:
Server: QTSS/6.0.2 (Build/526.2; Platform/MacOSX; Release/Mac OS X Server; )\r\n
I assume that means the server is QuickTime Streaming Server v6.0.2.
I'd be thrilled if someone add the sending of that authentication string with the SETUP RTSP command to VLC.
If anyone does, I'd love to hear about it and test it.
--Clayton