Wowza Community

Direct communication with RTSP server


I want to directly (using some custom piece of code) communicate with my RTSP server, to get session descriptors and start RTP streams.

Does wowza allow such level of customization?

My use case is that I have RTSP server deployed over NAT, and obviously, Wowza cannot directly connect to it from outside. I can only do port mapping for UDP, not TCP.

I am thinking about providing Wowza with the Socket already connected to the server, then it can use it to communicate with RTSP.

Another option, is that I handle RTSP part by my custom code, and provide Wowza with the session description (SDP) to start RTP.

So my constrain is that I cannot use TCP. Do you think one of the above scenarios possible? Any other suggestions?




Take a look at IRTSPActionNotify:


Some encoders do RTSP announce, which is where you enter Wowza URL and application name in the encoder and it sends sdp file to Wowza. But your encoder is not one of those, and I’m not sure how to do what you are suggesting.



Yes, in this case the encoder starts by connecting to Wowza and sending the .sdp file over the wire, which Wowza then uses to initiate streaming as it would if the .sdp file were in the /content folder.

This is the basic guide for this kind of encoder:


For RTSP announce you have to connect to a specific Wowza application, that exists.


The generic instructions indicates only ip address + port, no protocol. And the application name is included with the stream name.

Host Address: [wowza-address]:1935

Stream Name: live/myStream.sdp

That is how you do it in Wirecast using the “RTSP/RTP based streaming” method. Take a look at the 2nd example in this old (1.7 forum) Wirecast guide


Hi Richard,

thanks for the pointer. However, if I understand the documentation correctly, this interface provides callbacks for RTSP actions for already created RTSP session.

Say, I have a RTSP server published on some port, which is not visible for Wowza. Once I start a stream (say defined by *.stream file, e.g. rtsp://, Wowza will not be able to create an initial RTSP session.

Idea 1: I was thinking about implementing NAT traversal, and provide Wowza with the socket accepted by RTSP server.

Idea 2: I can publish SDP from the server to Wowza through UDP. The question is how to start RTP streaming from my custom handler. It is done through UDP in my case.

Here is some kind of flow:

  1. Wowza -> Server. Request SDP by doing UDP request.

  2. Server -> Wowza. Return SDP and start RTP session.

  3. Wowza -> ???




I am in full control of my encoder code, so I can implement RTSP Announce. Sounds very cool suggestion!

Does that also mean that Wowza listens for RTSP announcements and automatically starts re-streaming? (I need to support these streamers: cupertinostreaming, smoothstreaming, sanjosestreaming). Any pointers to documentation? Because at the moment I publish *.stream file just with RTSP and configure my Application.xml accordingly.



I made the following changes in VHost.xml: 554, 1935

Also created rtplive application, with the following in the Application.xml:


with no authentication:



If I create a TCP connection to Wowza

Socket socket = new Socket(“”, 554);

and publish the RTSP announcement, I get

WARN server comment - Application folder ([install-location]/applications/defapp) is missing

It seems I am missing something trivial, but how should I publish my SDP to reach the rtplive application, which I defined in XML?

I am still a bit puzzled, RTSP is not HTTP, I can only connect to a certain IP address and a port. It is not clear, how I can specify the application.

Should I send RTSP announce by using HTTP POST to smth. like ?

My Wowza server has the following IP:

Encoder’s IP:

I am sending the following ANNOUNCE request to Wowza port 554:

ANNOUNCE rtsp:// RTSP/1.0

Cseq: 0

Content-Type: application/sdp

Session: 12345678

Content-Length: 299


o=- 1360014152814 1360014152814 IN IP4



c=IN IP4

t=0 0


m=video 5006 RTP/AVP 96


a=rtpmap:96 H264/90000

a=fmtp:96 packetization-mode=1;profile-level-id=42801e;sprop-parameter-sets=Z0KAHukBQHsg,aM4G4g==;


The first line in the request should indicate the actual Wowza application, right? So my RTSP announce is correct.

After the announcement is published, I see the following in the log:

NFO rtsp connect 938250587 -

INFO server comment - sortPackets[2]: sortBufferSize:500

INFO stream create - -

INFO rtsp announce 938250587 -

WARN server comment - RTPStream.idle[938250587:rtplive/definst:]: Close RTSP/RTP session. Session timeout: 90000

INFO stream unpublish - -

INFO server comment - MediaStreamMediaCasterPlay: close

INFO stream destroy - -

INFO rtsp disconnect 938250587 -

I did some experiments with Wirecast encoder, the log is the following after publishing (to the same Wowza application):

INFO rtsp connect 344217766 -

INFO server comment - sortPackets[1]: sortBufferSize:500

INFO stream create - -

INFO rtsp announce 344217766 -

INFO server comment - RTPUDPTransport.bind[rtplive/definst]:

INFO server comment - RTPUDPTransport.bind[rtplive/definst]:

INFO server comment - RTPUDPTransport.bind[rtplive/definst]:

INFO server comment - RTPUDPTransport.bind[rtplive/definst]:

INFO stream publish myStream.sdp -

INFO rtsp publish 344217766 -

INFO server comment - UDPTransport.firstPacket: bind: msg:/

Do I need perhaps also send RTSP PLAY request?