# RTSP/RTP recording:ANNOUNCE returns 401(Unauthorized)

**URL:** https://community.wowza.com/t/rtsp-rtp-recording-announce-returns-401-unauthorized/374
**Category:** Wowza Streaming Engine
**Created:** [June 23, 2008, 12:09am UTC](https://community.wowza.com/t/rtsp-rtp-recording-announce-returns-401-unauthorized/374 "2008-06-23T00:09:53Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/system/32/447_2.png) [@system](https://community.wowza.com/u/system)
#### Post date: [June 23, 2008, 12:09am UTC](https://community.wowza.com/t/rtsp-rtp-recording-announce-returns-401-unauthorized/374/1 "2008-06-23T00:09:53Z")

</div>

Hello,

I am interfacing with Wowza Pro to live stream the media and using ANNOUNCE + RECORD combination.I have followed the steps given in the thread

“Using Quicktime broadcaster with Wowza Pro(RSTP/RTP)” for setting up the Wowza side.

ANNOUNCE is the first RTSP message sent without any session established.

My test application is written in C and runs on Linux machine whereas the WowzaPro runs on Vista machine.I have used the WWW-Authenticate and Authorization headers within the announce command but I get

“401 Unauthorized”.

Can you please provide me the right way to provide the authentication to WowzaPro or other way to stream the live media to Wowza Pro if my current setup is

incorrect?

My announce message looks as follows:

DEBUG server comment - uri: ANNOUNCE rtsp://192.168.1.3/streamtest/3gstream.sd

p RTSP/1.0

DEBUG server comment - method: ANNOUNCE

DEBUG server comment - context: rtsp://192.168.1.3/streamtest/3gstream.sdp

DEBUG server comment - protocol: RTSP/1.0

DEBUG server comment - cseq: 1

DEBUG server comment - content-type: application/sdp

DEBUG server comment - www-authenticate: user:password

DEBUG server comment - authorization: Digest username=“user”, realm=“Streaming Server”, uri="/streamtest/3gstream.sdp"

DEBUG server comment - user-agent: rstp\_test

Kind regards,

Pradeep

---

<div class="post-metadata">

### Author: ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)
#### Post date: [June 22, 2008, 4:32pm UTC](https://community.wowza.com/t/rtsp-rtp-recording-announce-returns-401-unauthorized/374/2 "2008-06-22T16:32:13Z")

</div>

Install the most recent patch from here (don’t miss the files in the conf folder):

[https://www.wowza.com/devbuild.html](https://www.wowza.com/devbuild.html)

Turn off authentication by editing **conf/[application]/Application.xml** and changing **RTP/Authentication/Method** to **none**.

This will turn off authentication.

Charlie

---

<div class="post-metadata">

### Author: ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)
#### Post date: [July 1, 2008, 8:41am UTC](https://community.wowza.com/t/rtsp-rtp-recording-announce-returns-401-unauthorized/374/3 "2008-07-01T08:41:12Z")

</div>

I would download and install Vara Software Wirecast. Try to mimic what they are doing. You can see the most information from Wowza Pro by turning on debug logging (edit conf/log4j.properties and chaning the log level on the first line from INFO to DEBUG).

The control statements in your sdp data are incorrect. They should not include the entire url. Just the track id:

Here is what it looks like from Wirecast:

```auto
DEBUG server comment - sdp: v=0
DEBUG server comment - sdp: o=- 1428733278 1428733278 IN IP4 127.0.0.0
DEBUG server comment - sdp: s=Wirecast
DEBUG server comment - sdp: c=IN IP4 127.0.0.1
DEBUG server comment - sdp: t=0 0
DEBUG server comment - sdp: a=range:npt=now-
DEBUG server comment - sdp: m=audio 0 RTP/AVP 96
DEBUG server comment - sdp: a=rtpmap:96 MP4A-LATM/44100/2
DEBUG server comment - sdp: a=fmtp:96 profile-level-id=15;object=2;cpresent=0;config=400024203FC0
DEBUG server comment - sdp: a=control:trackid=1
DEBUG server comment - sdp: m=video 0 RTP/AVP 97
DEBUG server comment - sdp: a=rtpmap:97 H264/90000
DEBUG server comment - sdp: a=fmtp:97 packetization-mode=1;profile-level-id=4D400C;sprop-parameter-sets=J01ADKkYKD9gDUGAQa2wrXvfAQ==,KN4JF6A=
DEBUG server comment - sdp: a=cliprect:0,0,240,320
DEBUG server comment - sdp: a=framesize:97 320-240
DEBUG server comment - sdp: b=AS:200
DEBUG server comment - sdp: a=control:trackid=2

```

Charlie

---

<div class="post-metadata">

### Author: ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)
#### Post date: [July 13, 2008, 6:43am UTC](https://community.wowza.com/t/rtsp-rtp-recording-announce-returns-401-unauthorized/374/4 "2008-07-13T06:43:53Z")

</div>

You cannot record H.264 live streams. This is a feature we plan on adding in a future release of the product.

Charlie

---

<div class="post-metadata">

### Author: ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)
#### Post date: [July 20, 2008, 11:18am UTC](https://community.wowza.com/t/rtsp-rtp-recording-announce-returns-401-unauthorized/374/5 "2008-07-20T11:18:45Z")

</div>

We have not added support for H.264 stream recording. We are still working on this feature. No definite plans on when it will be available.

Charlie

---

<div class="post-metadata">

### Author: ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)
#### Post date: [July 21, 2008, 3:14am UTC](https://community.wowza.com/t/rtsp-rtp-recording-announce-returns-401-unauthorized/374/6 "2008-07-21T03:14:34Z")

</div>

I do not have code to do this.

Charlie

---

<div class="post-metadata">

### Author: ![Pradeep\_Bhimellu](https://avatars.discourse-cdn.com/v4/letter/p/839c29/32.png) [@Pradeep\_Bhimellu](https://community.wowza.com/u/Pradeep_Bhimellu)
#### Post date: [July 1, 2008, 4:18pm UTC](https://community.wowza.com/t/rtsp-rtp-recording-announce-returns-401-unauthorized/374/7 "2008-07-01T16:18:15Z")

</div>

Hello,

I have done some tests announcing the sdp to Darwin streaming server (DSS) and the announce worked there.If I announce the same way to Wowza,it just hangs the whole system and my app does not get any reply for the announce.

Is there any way to see the received/sent RTSP requests by Wowza(like the DSS does) so as to debug the announce message?

The announce message looks as follows:

```auto
ANNOUNCE rtsp://192.168.1.5/streamtest/mystream.sdp RTSP/1.0
CSeq: 1
Content-Type: application/sdp
User-Agent: my_streamer
Content-Length: 370
v=0
o=017667424505 IN IP4 192.168.1.2
s=streamtest,Abcde
i=live Hi streaming from Abcde
c=IN IP4 192.168.1.5
t=0
m=audio 0 RTP/AVP 96
a=rtpmap:96 AMR/8000
a=fmtp:96 octet-align=1
a=control:rtsp://192.168.1.5/streamtest/3gstream.sdp/trackid=1
m=video 0 RTP/AVP 34
a=rtpmap:34 H263/90000
a=control:rtsp://192.168.1.5/streamtest/3gstream.sdp/trackid=2

```

An “OK” reply is received if I remove the “Content-length” field but then SETUP request returns “track not found” and I don’t see any “mystream.sdp” file created in the “streamtest” application folder.

Kind regards,

Pradeep

---

<div class="post-metadata">

### Author: ![Pradeep\_Bhimellu](https://avatars.discourse-cdn.com/v4/letter/p/839c29/32.png) [@Pradeep\_Bhimellu](https://community.wowza.com/u/Pradeep_Bhimellu)
#### Post date: [July 13, 2008, 2:24pm UTC](https://community.wowza.com/t/rtsp-rtp-recording-announce-returns-401-unauthorized/374/8 "2008-07-13T14:24:15Z")

</div>

Thank you very much for pointing the Wirecast example,it helped me a lot and now I can broadcast to Wowza :).

I can only hear the audio from flash player though,perhaps some parameters are still missing in the SDP.To debug the “no video” effect,I thought of recording the stream first and inspect the recording but enabling the recording does not seems to record anything.

I have changed the stream type from “live” to “live-record” and expected a new file to be created in the “contents” folder.I have also tried with WireCast but still the same effect(off course I can see the video in the flash player when broadcasted using Wirecast).

Is there some special setting to record the RTSP/RTP streams?

Kind regards,

Pradeep

---

<div class="post-metadata">

### Author: ![vivek\_w](https://avatars.discourse-cdn.com/v4/letter/v/eada6e/32.png) [@vivek\_w](https://community.wowza.com/u/vivek_w)
#### Post date: [July 20, 2008, 7:01pm UTC](https://community.wowza.com/t/rtsp-rtp-recording-announce-returns-401-unauthorized/374/9 "2008-07-20T19:01:17Z")

</div>

> You cannot record H.264 live streams. This is a feature we plan on adding in a future release of the product.
> 
> Charlie

Your comment was dated in 2006… surely it must have been included in server, by now(2008)… But, I am running the most updated (including patches), but still not able to do live-record for a stream from wirecast (h.264)… it returns with following error… How do I explicitly respond to RTSP RECORD commend? What do I need to do to detect RTSP RECORD (from encoder) and start recording on specific stream?

java.lang.NoClassDefFoundError: com/wowza/wms/stream/record/MediaStreamRecord

DEBUG server comment - ServerHandler.exceptionCaught: java.lang.NoClassDefFoundError: com/wowza/wms/stream/record/MediaStreamRecord

at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClass(Unknown Source)

at java.security.SecureClassLoader.defineClass(Unknown Source)

at java.net.URLClassLoader.defineClass(Unknown Source)

at java.net.URLClassLoader.access$000(Unknown Source)

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClassInternal(Unknown Source)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Unknown Source)

at com.wowza.wms.stream.MediaStreamFactory.createStream(Unknown Source)

at com.wowza.wms.stream.MediaStreamMap.getStreamClientless(Unknown Source)

at com.wowza.wms.rtp.model.RTPStream.createStream(Unknown Source)

at com.wowza.wms.rtsp.RTSPCore.setup(Unknown Source)

at com.wowza.wms.rtsp.RTSPRequestAdapter.handleMessage(Unknown Source)

at com.wowza.wms.rtsp.RTSPRequestAdapter.decodeMessage(Unknown Source)

at com.wowza.wms.rtsp.RTSPRequestAdapter.service(Unknown Source)

at com.wowza.wms.server.ServerHandler.serviceRequest(Unknown Source)

at com.wowza.wms.server.ServerHandler.handleMessageReceived(Unknown Source)

at com.wowza.wms.server.ServerHandler.messageReceived(Unknown Source)

at org.apache.mina.common.support.AbstractIoFilterChain$2.messageReceived(Unknown Source)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Unknown Source)

at org.apache.mina.common.support.AbstractIoFilterChain.access$900(Unknown Source)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(Unknown Source)

at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(Unknown Source)

at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(Unknown Source)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Unknown Source)

at org.apache.mina.common.support.AbstractIoFilterChain.access$900(Unknown Source)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(Unknown Source)

at org.apache.mina.filter.executor.ExecutorFilter.processEvent(Unknown Source)

at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

Caused by: java.lang.ClassNotFoundException: com.wowza.wms.stream.record.MediaStreamRecord

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClassInternal(Unknown Source)

… 37 more

---

<div class="post-metadata">

### Author: ![vivek\_w](https://avatars.discourse-cdn.com/v4/letter/v/eada6e/32.png) [@vivek\_w](https://community.wowza.com/u/vivek_w)
#### Post date: [July 21, 2008, 6:22am UTC](https://community.wowza.com/t/rtsp-rtp-recording-announce-returns-401-unauthorized/374/10 "2008-07-21T06:22:32Z")

</div>

Is there anyway to record the converted flv stream (live rtmp stream) ? I tried samples from forum. Could see the files been generated but they can not be played back…
