[libav-api] RTSP Auth

Mark Kenna mark.kenna at sureviewsystems.com
Mon Nov 28 10:07:09 CET 2011


On 25/11/2011 18:02, Luca Barbato wrote:
> On 25/11/11 14:08, Mark Kenna wrote:
>>
>> On 23/11/2011 14:57, Luca Barbato wrote:
>>> On 23/11/11 15:00, Mark Kenna wrote:
>>>> Hi Guys
>>>>
>>>> Does LibAv current support RTSP authentication (digest/basic)?
>>>
>>> Yes it does, see
>>>
>>> http://git.libav.org/?p=libav.git;a=blob;f=libavformat/rtsp.c;h=d0e9bbf6af6534b0e2f8c841b6cb763f0a41f4dd;hb=HEAD#l1370 
>>>
>>>
>>>
>>>> I am connecting to a url of the form
>>>> "rtsp://user:pas@123.123.123.123/rtspl?h264&channel=1" which works 
>>>> fine
>>>> in VLC but not through LibAv/FFMpeg. I just get the line "[rtsp @
>>>> 003EB7E0] method OPTIONS failed: 401 Unauthorized" when I try this
>>>> through the command line.
>>>
>>> Should work there as well, could you please provide an url we could 
>>> test?
>>>
>>> lu
>>>
>>
>> Hi Luca
>>
>> I have traced the issue and it looks like LibAv is not creating the auth
>> response correctly. The details are as follows for the first call 
>> (OPTIONS)
>>
>> user="live"
>> password="sureview"
>> realm="Use 'live' as User Name"
>> nonce="1f63550066114283365d7d9a346e5dff"
>> uri="rtsp://10.128.3.7:554/rtsp_tunnel?h26x=4&line=1&inst=1" (note that
>> this is behind a VPN so you wont be able to see it)
>>
>> LibAv is generating the response as "ea214b7c7f218d0053ad9467003e14aa"
>>
>> I have calculated the response should be
>> "5d7ee8885c6ae3c64055bdb9e21f88ca" using the information on
>> http://en.wikipedia.org/wiki/Digest_access_authentication. I have also
>> tried this against the OPTIONS request and it succeeds!
>>
>> Does this help at all? If you need more information I will post whatever
>> you need.
>
> I'll have a look and ask Martin to check as well. He is using the 
> feature so is strange to have it wrong.
>
> Could you please provide a whole wireshark dump so we can see the 
> whole exchange between the two parties?
>
> lu
>

Hi Luca

Attached are a successful and unsuccessful RTSP connections. The 
successful one is from VLC which seems to work perfectly.

Thanks,
Mark.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: rtspAuthSuccess.pcap
Type: application/octet-stream
Size: 182454 bytes
Desc: not available
URL: <http://lists.libav.org/pipermail/libav-api/attachments/20111128/c40454cb/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rtspAuthFail.pcap
Type: application/octet-stream
Size: 1938 bytes
Desc: not available
URL: <http://lists.libav.org/pipermail/libav-api/attachments/20111128/c40454cb/attachment-0003.obj>


More information about the libav-api mailing list