RTSP/RTP recording:ANNOUNCE returns 401(Unauthorized)

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

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

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

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:

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

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

Charlie

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

I do not have code to do this.

Charlie

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:

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

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

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

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…