Wowza Community

RTSP Authentication

I may be writing this incorrectly, but here’s what I am trying to do. I’m using:

Wowza Media Server 2.2.3.08 build27169

I’m using Wowza to access an IP camera through an RTSP stream. The IP camera I’m accessing supports both Basic and Digest authentication. If I set the IP camera to “Digest”, how do I configure Wowza to pull an RTSP stream from it? Thanks!

I don’t think there is a way. Use basic and embed in url like this:

rtsp://user:password@[axis-camera-address]:554/axis-media/media.amp?streamprofile=profile1

Richard

Yes, that is correct.

Charlie

If you can put a camera on the Internet with digest auth turned on and send us the RTSP URL that should work (with username/password) to support@wowza.com then we can take a look at it.

Charlie

This does seem to be a problem. Can you put this camera/encoder on the Internet and send us the RTSP URL so we can take a look at it? Send the RTSP URL and authentication information to support@wowza.com.

Charlie

I will see what I can do without it.

Charlie

This patch should do the trick:

WowzaMediaServer2.2.4-patch2.zip

Charlie

At this time it is not configurable.

Charlie

Redownload and install this patch to see if it fixes it:

WowzaMediaServer2.2.4-patch2.zip

I made one small change that might help. I don’t have a good way to setup a quick test.

Charlie

Yoiu are not running the correct version. The version being reported is:

User-Agent: Wowza Media Server Pro (Wowza Media Server 2 Perpetual 2.2.3.09 build27256)

It should be 2.2.4.02.

Charlie

UDP traffic is not reaching Wowza. I might try using the forceInterleave property as suggested in the guide to avoid UDP and rather use RTSP/RTP over TCP. If this is not an option, then debug why UDP traffic is being blocked. It could be a firewall issue.

Charlie

For IP camera, I don’t think so. I tested: added username password to /conf/publish.password and tried to connect to axis cam without username:pwd in the url, and it didn’t work

Richard

Update: If the camera is set for digest authentication, you do need the username and password in the URL as we’ve been doing, but Wowza is not sending this back to the camera in clear text.

Richard

You might need patch 9 tho

http://www.wowza.com/downloads/WowzaMediaServer-2-2-3/WowzaMediaServer2.2.3-patch9.zip

Richard

You will have to provide more detail for us to help.

Richard

That’s what I am currently doing, but isn’t it passing it in plain text? There is nothing in Wowza that supports Digest Authentication?

You are correct, patch 9 is required to make this work. I installed patch 9, changed the camera to digest and it works perfectly. Since I was originally told that this functionality doesn’t exist in Wowza, I’d like to be 100% assured that the username/password is no longer being sent to the camera in plain text through RTSP when the camera is set to digest mode. Is this correct? Thanks!

I tested this incorrectly. Wowza was connected to a camera through RTSP using basic authentication. I then switched the camera to Digest Authentication. There were no errors, so I assumed it was working fine. However, as soon as I killed the stream and then started it up again, I got the errors:

RTPSessionDescriptionDataProviderBasicRTSPWorker.processResponse: Authentication required[401]: Authorization failed.

If the stream is already connected and the authentication method is changed to “Digest”, it will still work just fine since it doesn’t need to authenticate. Please let me know how to get this to work. Thanks!

I have patched the Server and have still problems to receive an RTSP-Stream with basic Auth via Wowza. The VLC-Player is working,

I compared both RTSP communications via Wireshark, and noticed, that Wowza sends the RTSP authorization only once and not like VLC with every RTSP-Request.

How is it possible to fix this problem?

adorn

Hi,

Here are more detailed information about my issue.

We try to receive RTSP Video streams from an external managed Server.

The Server needs a Basic Authentication, and works perfect with the VLC-Player.

If Wowza tries to get the streams, it fails on the Authentication.

Regards

adorn

The TCP-Dumps of both RTSP-Sessions:

Wowza(fails):


DESCRIBE rtsp://10.0.0.20/channel01 RTSP/1.0

CSeq: 1

Accept: application/sdp

User-Agent: Wowza Media Server Pro (Wowza Media Server 2 Perpetual 2.2.4 build27452)

RTSP/1.0 401 Unauthorized

CSeq: 1

WWW-Authenticate: Basic realm="/"

DESCRIBE rtsp://10.0.0.20/channel01 RTSP/1.0

CSeq: 2

Accept: application/sdp

User-Agent: Wowza Media Server Pro (Wowza Media Server 2 Perpetual 2.2.4 build27452)

Authorization: Basic ABCDEFGHIJKlomop=

RTSP/1.0 200 OK

CSeq: 2

Content-Base: rtsp://10.0.0.20/channel01

Content-Type: application/sdp

Content-Length: 307

v=0

o=- 1659267273 1908559390 IN IP4 10.0.0.30

s=H264 Stream 1

c=IN IP4 0.0.0.0

t=0 0

a=range:npt=now-

m=video 0 RTP/AVP 96

a=control:rtsp://10.0.0.20/channel01/livevideo

a=rtpmap:96 H264/90000

a=fmtp:96 profile-level-id=42E01E;sprop-parameter-sets=Z0LgHtoC0Em/8AEAAPEAAA4QAAK/IIQ=,aM4zyA==

SETUP rtsp://10.0.0.20/channel01/livevideo RTSP/1.0

Transport: RTP/AVP/UDP;unicast;client_port=7016-7017;

CSeq: 3

User-Agent: Wowza Media Server Pro (Wowza Media Server 2 Perpetual 2.2.4 build27452)

RTSP/1.0 401 Unauthorized

CSeq: 0

WWW-Authenticate: Basic realm="/"

TEARDOWN rtsp://10.0.0.20/channel01 RTSP/1.0

CSeq: 4

User-Agent: Wowza Media Server Pro (Wowza Media Server 2 Perpetual 2.2.4 build27452)

RTSP/1.0 401 Unauthorized

CSeq: 4

WWW-Authenticate: Basic realm="/"

VLC-Player (working)


RTSP/1.0 401 Unauthorized

CSeq: 2

WWW-Authenticate: Basic realm="/"

OPTIONS rtsp://10.0.0.20:554/channel02 RTSP/1.0

CSeq: 3

Authorization: Basic ABCDEFGHIJKlomop=

User-Agent: LibVLC/1.1.8 (LIVE555 Streaming Media v2011.01.24)

RTSP/1.0 200 OK

CSeq: 3

Public: DESCRIBE, PLAY, PAUSE, SETUP, TEARDOWN

DESCRIBE rtsp://10.0.0.20:554/channel02 RTSP/1.0

CSeq: 4

User-Agent: LibVLC/1.1.8 (LIVE555 Streaming Media v2011.01.24)

Accept: application/sdp

RTSP/1.0 401 Unauthorized

CSeq: 4

WWW-Authenticate: Basic realm="/"

DESCRIBE rtsp://10.0.0.20:554/channel02 RTSP/1.0

CSeq: 5

Authorization: Basic ABCDEFGHIJKlomop=

User-Agent: LibVLC/1.1.8 (LIVE555 Streaming Media v2011.01.24)

Accept: application/sdp

RTSP/1.0 200 OK

CSeq: 5

Content-Base: rtsp://10.0.0.20:554/channel02

Content-Type: application/sdp

Content-Length: 311

v=0

o=- 1647741088 1260738908 IN IP4 10.0.0.30

s=H264 Stream 1

c=IN IP4 0.0.0.0

t=0 0

a=range:npt=now-

m=video 0 RTP/AVP 96

a=control:rtsp://10.0.0.20:554/channel02/livevideo

a=rtpmap:96 H264/90000

a=fmtp:96 profile-level-id=42E01E;sprop-parameter-sets=Z0LgHtoC0Em/8AEAAPEAAA4QAAK/IIQ=,aM4zyA==

SETUP rtsp://10.0.0.20:554/channel02/livevideo RTSP/1.0

CSeq: 6

Authorization: Basic ABCDEFGHIJKlomop=

User-Agent: LibVLC/1.1.8 (LIVE555 Streaming Media v2011.01.24)

Transport: RTP/AVP;unicast;client_port=55162-55163;

RTSP/1.0 200 OK

CSeq: 6

Session: 00020000; timeout=30

Transport: RTP/AVP;unicast;client_port=55162-55163

PLAY rtsp://10.0.0.20:554/channel02 RTSP/1.0

CSeq: 7

Authorization: Basic ABCDEFGHIJKlomop=

User-Agent: LibVLC/1.1.8 (LIVE555 Streaming Media v2011.01.24)

Session: 00020000

Range: npt=0.000-

RTSP/1.0 200 OK

CSeq: 7

Session: 00020000

Range: npt=now-