[Live-devel] RTSP authentication for a 'real' stream?
Dan Bolser
dan.bolser at gmail.com
Thu Oct 9 01:22:48 PDT 2008
Hi,
I am trying to play a 'real' stream that uses RTSP with
authentication. Although I pass the username and password options, I
don't get a 'session'.
Below is an example of the output using openRTSP. Note that if I use
the wrong user name or password, the error is different (also below).
So the user/passwd are being used, but at some point authentication is
not happening. Do I need to pass my browser cookies or somthgin?
Is this a problem with the code, or a fundamental problem with
authentication of real streams?
Thanks for any feedback,
Dan.
OUTPUT USING CORRECT USER / PASSWD:
~/src/live/testProgs/openRTSP -u me secret
rtsp://meetstream.cshl.edu:554/Secure/INFOUK/1.rm
Sending request: OPTIONS
rtsp://meetstream.cshl.edu:554/Secure/INFOUK/1.rm RTSP/1.0
CSeq: 1
User-Agent: openRTSP (LIVE555 Streaming Media v2008.10.07)
Received OPTIONS response: RTSP/1.0 200 OK
CSeq: 1
Date: Thu, 09 Oct 2008 08:13:42 GMT
Server: Helix Server Version 11.1.7.3406 (win32) (RealServer compatible)
Public: OPTIONS, DESCRIBE, ANNOUNCE, PLAY, PAUSE, SETUP,
GET_PARAMETER, SET_PARAMETER, TEARDOWN
TurboPlay: 1
RealChallenge1: b73ec43d19678437ac8152bfe93e1278
StatsMask: 8
Sending request: DESCRIBE
rtsp://meetstream.cshl.edu:554/Secure/INFOUK/1.rm RTSP/1.0
CSeq: 2
Accept: application/sdp
User-Agent: openRTSP (LIVE555 Streaming Media v2008.10.07)
Received DESCRIBE response: RTSP/1.0 401 Unauthorized
CSeq: 2
Date: Thu, 09 Oct 2008 08:13:42 GMT
Set-Cookie: cbid=hfcjjmelcgmkhidmeojokpktmojrktlufkejkielejcfelplqnrompqtpopsrqduhfjgjhhl;path=/;expires=Thu,31-Dec-2037
23:59:59 GMT
WWW-Authenticate: Basic realm="MEETSTREAM.ContentRealm"
Sending request: DESCRIBE
rtsp://meetstream.cshl.edu:554/Secure/INFOUK/1.rm RTSP/1.0
CSeq: 3
Accept: application/sdp
Authorization: Basic ZGFuLmJvbHNlcjowMDAwMDY=
User-Agent: openRTSP (LIVE555 Streaming Media v2008.10.07)
Received DESCRIBE response: RTSP/1.0 200 OK
CSeq: 3
Date: Thu, 09 Oct 2008 08:13:42 GMT
Last-Modified: Thu, 02 Oct 2008 01:52:05 GMT
Content-base: rtsp://meetstream.cshl.edu:554/Secure/INFOUK/1.rm/
Vary: User-Agent, ClientID
Content-type: application/sdp
x-real-usestrackid: 1
Content-length: 2912
Need to read 2912 extra bytes
Read 2912 extra bytes: v=0
o=- 1222912325 1222912325 IN IP4 143.48.1.141
s=Genome Informatics
i=CSHL Leading Strand (C) CSHL 2008
c=IN IP4 0.0.0.0
t=0 0
a=SdpplinVersion:1610641560
a=StreamCount:integer;2
a=control:*
a=Flags:integer;25
a=IsRealDataType:integer;1
a=Author:buffer;"Q1NITCBMZWFkaW5nIFN0cmFuZAA="
a=Copyright:buffer;"KEMpIENTSEwgMjAwOAA="
a=Title:buffer;"R2Vub21lIEluZm9ybWF0aWNzAA=="
a=ASMRuleBook:string;"#($Bandwidth < 350000),Stream0Bandwidth =
117959, Stream1Bandwidth = 32041;#($Bandwidth >=
350000),Stream0Bandwidth = 317959, Stream1Bandwidth = 32041;"
a=range:npt=0-5261.077000
m=video 0 RTP/AVP 101
b=AS:382
b=RR:11923
b=RS:3974
a=control:streamid=0
a=range:npt=0-5260.243000
a=length:npt=5260.243000
a=rtpmap:101 x-pn-realvideo/1000
a=fmtp:101
a=mimetype:string;"video/x-pn-realvideo"
a=Helix-Adaptation-Support:1
a=AvgBitRate:integer;317959
a=AvgPacketSize:integer;349
a=EndOneRuleEndAll:integer;1
a=EndTime:integer;5260243
a=MaxBitRate:integer;317959
a=MaxPacketSize:integer;1342
a=MinimumSwitchOverlap:integer;0
a=Preroll:integer;5048
a=SeekGreaterOnSwitch:integer;1
a=StartTime:integer;0
a=OpaqueData:buffer;"TUxUSQAFAAIAAAAAAAEAAQADAAAAIgAAACJWSURPUlY0MAKAAeAADAAAAAAAGAAAAAgQIEAAgAAAAAAiAAAAIlZJRE9SVjQwAoAB4AAMAAAAAAAYAAAACBAgQACAAAAAACIAAAAiVklET1JWNDACgAHgAAwAAAAAABgAAAAIECBAAIAA"
a=RMFF 1.0 Flags:buffer;"AAUAAgACAAAAAgAA"
a=ASMRuleBook:string;"#($Bandwidth <
117959),TimestampDelivery=T,DropByN=T,priority=9;#($Bandwidth >=
117959) && ($Bandwidth <
317959),AverageBandwidth=117959,Priority=9;#($Bandwidth >= 117959) &&
($Bandwidth < 317959),AverageBandwidth=0,Priority=5,OnDepend=\"1\";#($Bandwidth
>= 317959),AverageBandwidth=317959,Priority=9;#($Bandwidth >=
317959),AverageBandwidth=0,Priority=5,OnDepend=\"3\";"
a=intrinsicDurationType:string;"intrinsicDurationContinuous"
a=StreamName:string;"video/x-pn-multirate-realvideo logical stream"
m=audio 0 RTP/AVP 101
b=AS:35
b=RR:1201
b=RS:400
a=control:streamid=1
a=range:npt=0-5261.077000
a=length:npt=5261.077000
a=rtpmap:101 x-pn-realaudio/1000
a=fmtp:101
a=mimetype:string;"audio/x-pn-realaudio"
a=Helix-Adaptation-Support:1
a=ActualPreroll:integer;2275
a=AvgBitRate:integer;32041
a=AvgPacketSize:integer;651
a=EndOneRuleEndAll:integer;1
a=EndTime:integer;5260243
a=MaxBitRate:integer;32041
a=MaxPacketSize:integer;651
a=MinimumSwitchOverlap:integer;200
a=Preroll:integer;4550
a=SeekGreaterOnSwitch:integer;0
a=StartTime:integer;0
a=OpaqueData:buffer;"TUxUSQACAAAAAAABAAAAVi5yYf0ABQAALnJhNQAAABAABQAAAEYABAAAAosAAAAAAAOqtAAAAAAADgKLAF0AAAAArEQAAKxEAAAAEAABZ2VucmNvb2sBBwAAAAAACAEAAAEEAAAl"
a=RMFF 1.0 Flags:buffer;"AAIAAgAA"
a=ASMRuleBook:string;"AverageBandwidth=32041,Priority=5;AverageBandwidth=0,Priority=5,OnDepend=\"0\",
OffDepend=\"0\";"
a=intrinsicDurationType:string;"intrinsicDurationContinuous"
a=StreamName:string;"audio/x-pn-multirate-realaudio logical stream"
Opened URL "rtsp://meetstream.cshl.edu:554/Secure/INFOUK/1.rm",
returning a SDP description:
v=0
o=- 1222912325 1222912325 IN IP4 143.48.1.141
s=Genome Informatics
i=CSHL Leading Strand (C) CSHL 2008
c=IN IP4 0.0.0.0
t=0 0
a=SdpplinVersion:1610641560
a=StreamCount:integer;2
a=control:*
a=Flags:integer;25
a=IsRealDataType:integer;1
a=Author:buffer;"Q1NITCBMZWFkaW5nIFN0cmFuZAA="
a=Copyright:buffer;"KEMpIENTSEwgMjAwOAA="
a=Title:buffer;"R2Vub21lIEluZm9ybWF0aWNzAA=="
a=ASMRuleBook:string;"#($Bandwidth < 350000),Stream0Bandwidth =
117959, Stream1Bandwidth = 32041;#($Bandwidth >=
350000),Stream0Bandwidth = 317959, Stream1Bandwidth = 32041;"
a=range:npt=0-5261.077000
m=video 0 RTP/AVP 101
b=AS:382
b=RR:11923
b=RS:3974
a=control:streamid=0
a=range:npt=0-5260.243000
a=length:npt=5260.243000
a=rtpmap:101 x-pn-realvideo/1000
a=fmtp:101
a=mimetype:string;"video/x-pn-realvideo"
a=Helix-Adaptation-Support:1
a=AvgBitRate:integer;317959
a=AvgPacketSize:integer;349
a=EndOneRuleEndAll:integer;1
a=EndTime:integer;5260243
a=MaxBitRate:integer;317959
a=MaxPacketSize:integer;1342
a=MinimumSwitchOverlap:integer;0
a=Preroll:integer;5048
a=SeekGreaterOnSwitch:integer;1
a=StartTime:integer;0
a=OpaqueData:buffer;"TUxUSQAFAAIAAAAAAAEAAQADAAAAIgAAACJWSURPUlY0MAKAAeAADAAAAAAAGAAAAAgQIEAAgAAAAAAiAAAAIlZJRE9SVjQwAoAB4AAMAAAAAAAYAAAACBAgQACAAAAAACIAAAAiVklET1JWNDACgAHgAAwAAAAAABgAAAAIECBAAIAA"
a=RMFF 1.0 Flags:buffer;"AAUAAgACAAAAAgAA"
a=ASMRuleBook:string;"#($Bandwidth <
117959),TimestampDelivery=T,DropByN=T,priority=9;#($Bandwidth >=
117959) && ($Bandwidth <
317959),AverageBandwidth=117959,Priority=9;#($Bandwidth >= 117959) &&
($Bandwidth < 317959),AverageBandwidth=0,Priority=5,OnDepend=\"1\";#($Bandwidth
>= 317959),AverageBandwidth=317959,Priority=9;#($Bandwidth >=
317959),AverageBandwidth=0,Priority=5,OnDepend=\"3\";"
a=intrinsicDurationType:string;"intrinsicDurationContinuous"
a=StreamName:string;"video/x-pn-multirate-realvideo logical stream"
m=audio 0 RTP/AVP 101
b=AS:35
b=RR:1201
b=RS:400
a=control:streamid=1
a=range:npt=0-5261.077000
a=length:npt=5261.077000
a=rtpmap:101 x-pn-realaudio/1000
a=fmtp:101
a=mimetype:string;"audio/x-pn-realaudio"
a=Helix-Adaptation-Support:1
a=ActualPreroll:integer;2275
a=AvgBitRate:integer;32041
a=AvgPacketSize:integer;651
a=EndOneRuleEndAll:integer;1
a=EndTime:integer;5260243
a=MaxBitRate:integer;32041
a=MaxPacketSize:integer;651
a=MinimumSwitchOverlap:integer;200
a=Preroll:integer;4550
a=SeekGreaterOnSwitch:integer;0
a=StartTime:integer;0
a=OpaqueData:buffer;"TUxUSQACAAAAAAABAAAAVi5yYf0ABQAALnJhNQAAABAABQAAAEYABAAAAosAAAAAAAOqtAAAAAAADgKLAF0AAAAArEQAAKxEAAAAEAABZ2VucmNvb2sBBwAAAAAACAEAAAEEAAAl"
a=RMFF 1.0 Flags:buffer;"AAIAAgAA"
a=ASMRuleBook:string;"AverageBandwidth=32041,Priority=5;AverageBandwidth=0,Priority=5,OnDepend=\"0\",
OffDepend=\"0\";"
a=intrinsicDurationType:string;"intrinsicDurationContinuous"
a=StreamName:string;"audio/x-pn-multirate-realaudio logical stream"
Unable to create receiver for "video/X-PN-REALVIDEO" subsession: RTP
payload format unknown or not supported
Unable to create receiver for "audio/X-PN-REALAUDIO" subsession: RTP
payload format unknown or not supported
OUTPUT USING *INCORRECT* USER / PASSWD (as a test):
~/src/live/testProgs/openRTSP -u me whatever
rtsp://meetstream.cshl.edu:554/Secure/INFOUK/1.rm
Sending request: OPTIONS
rtsp://meetstream.cshl.edu:554/Secure/INFOUK/1.rm RTSP/1.0
CSeq: 1
User-Agent: openRTSP (LIVE555 Streaming Media v2008.10.07)
Received OPTIONS response: RTSP/1.0 200 OK
CSeq: 1
Date: Thu, 09 Oct 2008 08:20:16 GMT
Server: Helix Server Version 11.1.7.3406 (win32) (RealServer compatible)
Public: OPTIONS, DESCRIBE, ANNOUNCE, PLAY, PAUSE, SETUP,
GET_PARAMETER, SET_PARAMETER, TEARDOWN
TurboPlay: 1
RealChallenge1: 3fe3f9f0e840918e7d03f7969b1c391d
StatsMask: 8
Sending request: DESCRIBE
rtsp://meetstream.cshl.edu:554/Secure/INFOUK/1.rm RTSP/1.0
CSeq: 2
Accept: application/sdp
User-Agent: openRTSP (LIVE555 Streaming Media v2008.10.07)
Received DESCRIBE response: RTSP/1.0 401 Unauthorized
CSeq: 2
Date: Thu, 09 Oct 2008 08:20:16 GMT
Set-Cookie: cbid=ifjjgmpijjikfldmeojokpktlojrktlufkejkidlejjfeiplmnkrnpltnrnnrqmpqfcjjhcl;path=/;expires=Thu,31-Dec-2037
23:59:59 GMT
WWW-Authenticate: Basic realm="MEETSTREAM.ContentRealm"
Sending request: DESCRIBE
rtsp://meetstream.cshl.edu:554/Secure/INFOUK/1.rm RTSP/1.0
CSeq: 3
Accept: application/sdp
Authorization: Basic ZGFuLmJvbHNlcjowMDAwMDYw
User-Agent: openRTSP (LIVE555 Streaming Media v2008.10.07)
Received DESCRIBE response: RTSP/1.0 401 Unauthorized
CSeq: 3
Date: Thu, 09 Oct 2008 08:20:16 GMT
WWW-Authenticate: Basic realm="MEETSTREAM.ContentRealm"
Failed to get a SDP description from URL
"rtsp://meetstream.cshl.edu:554/Secure/INFOUK/1.rm": cannot handle
DESCRIBE response: RTSP/1.0 401 Unauthorized
More information about the live-devel
mailing list