[libav-api] RTSP Auth

Luca Barbato lu_zero at gentoo.org
Fri Nov 25 19:02:31 CET 2011

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@" 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://" (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?



Luca Barbato

More information about the libav-api mailing list