Wowza Community

Using a native RTP encoder with Wowza Pro (native RTP)

I have a video application that uses a custom encoder to encode video to H.264. The encoder can be configured to stream the video over RTP to an IP address. Normally I configure the encoder to stream it locally.

I am able to play the video in VLC and GStreamer using the SDP file generated by the encoder. While trying to access the stream with Wowza (installed on the same machine as the encoder) I get a java.net.BindException stating that the address is in use.

INFO server comment - RTPSessionDescriptionDataProviderBasic.getStreamInfo: /usr/local/WowzaMediaServerPro/content/streams/stream1.sdp

DEBUG server comment - cmd: setBufferTime

DEBUG server comment - sdp: v=0

DEBUG server comment - sdp: o=- 0 0 IN IP4 10.99.50.91

DEBUG server comment - sdp: s=RTP_H264_0

DEBUG server comment - sdp: c=IN IP4 0.0.0.0

DEBUG server comment - sdp: t=0 0

DEBUG server comment - sdp: m=video 8000 RTP/AVP 97

DEBUG session setbuffertime [114845166,1]: 750 750

DEBUG server comment - sdp: a=rtpmap:97 H264/90000

DEBUG server comment - sdp: a=fmtp:97 packetization-mode=0;profile-level-id=420033;sprop-parameter-sets=Z0IAM7kQFAX0IAAAfQAADqYQgA==,aM48gA==

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

DEBUG server comment - onFlushNotifyClients: true

DEBUG server comment - flushInterval: 50

DEBUG server comment - verboseDebug: false

INFO stream create - -

INFO stream create - -

DEBUG server comment - RTPDePacketizerRFC3984H264.init

INFO stream publish stream1.sdp -

INFO server comment - UDPTransport.bind: 0.0.0.0/0.0.0.0:8000

INFO server comment - UDPTransport.bind: 0.0.0.0/0.0.0.0:8001

ERROR server comment - RTPUDPListener.init: java.net.BindException: Address already in use

INFO server comment - UDPTransport.unbind: 0.0.0.0/0.0.0.0:8000

INFO server comment - RTPMediaCaster.Reconnector: stop

ERROR server comment - RTPUDPListener.init: java.net.BindException: Address already in use

INFO server comment - UDPTransport.unbind: 0.0.0.0/0.0.0.0:8001

I have found that if the encoder is configured to send the RTP stream to a different machine and I run Wowza on that machine, then I am able to play the video without any issues.

I have followed the NativeRTPVideoStreaming example, setting the stream type to rtp-live or rtp-live-lowlatency (i get the same error in either case).

Is there any other configuration needed to read an RTP stream?

One thing to try is to edit the SDP file and change this line:

c=IN IP4 0.0.0.0

to point to the local ip address on the machine to which the stream is being sent.

Charlie

Charlie,

I tried your suggestion but it did not work - Wowza gives the same error. Is there anything else that I can do to debug this issue?

Can you post back the error message you got when you modified the SDP file. The problem is that the encoder is most likely binding to the same port as Wowza Media Server is binding to. So there is a conflict. If you can modify the encoder so that it uses two different port numbers on either side of the communication it would help.

Charlie

Charlie,

You were right - the encoder was binding to the same port. We have modified the encoder and now Wowza is able to restream it. Thanks for the help.

I was wondering if it might ever be possible for a combination of RTSP and Native RTP modes. In other words I would like to be able to ANNOUNCE the sdp file from a random outside location (webcaster on the move) but only go as far as to store the xxx.sdp file in the content folder on the WMS. Next I would like a client to be able to request the Stream by xxx.sdp name, but rather than expecting the stream to be on its way already as part of the ANNOUNCE, I would like for WMS to retrieve the Stream via RTSP once requested, or using a MediaCaster on a timer loop that can start the stream when the xxx.sdp file arrives or check until it succeeds.

The benefit I am trying to gain from this goofy hybrid mode is to allow the Stream to be initiated from the outside by the webcaster encoder, but I want to have the stream data interleaved over TCP for firewall and packet loss issues, and the only way it seems that I can make that happen is when the WMS initiates the connection and I have interleavedTCP set to true in my Application.xml file.

It works fine when I use normal RTSP mode, but I am worried that this will not be a workable solution in our webcasting world as the Remote WMS would need hands on configuration for each external location and all activity would have to be started from there… this might be too difficult for our more “simple” customers.

To be perfectly clear it is not a WMS limitation why I cannot initiate Interleaved data from the encoder side, it is an encoder limitation because it is based on a spoofed connection… I was only hoping that I might be able to get a work around from the Wowza side, because you guys seem to be able to make everything else work without too much trouble.

thanks

-Pat

Hello,

I’m following the instruction “How to publish and play a live stream (native RTP encoder with SDP file)” in the quickstart.html. The Adobe Flash player plays fine on both local PC with WowzaMediaServer and remote PC.

But, on the local PC, the VLC can’t play the stream by opening: rtsp://localhost:1945/rtplive/myStream-osprey240e.sdp

The VLC complained:

Your input can’t be opened:

VLC is unable to open the MRL ‘rtsp://localhost:1945/rtplive/myStream-osprey240e.sdp’. Check the log for details.

The myStream-osprey240e.sdp is generated by a RTP broadcaster that broadcasts H.264 and AAC video/audio streams. The content is:

v=0

o=RTSPStreaming_pack_v.2.3.0.6 3475421789 0 IN IP4 38.113.166.154

s=vsofts

c=IN IP4 72.172.164.152/30

a=x-broadcastcontrol:RTSP

a=control:*

m=video 1945 RTP/AVP 36

a=rtpmap:36 H264/90000

a=control:trackID=1

a=cliprect:0,0,320,240

a=framesize:36 320-240

b=AS:250

a=fmtp:36 packetization-mode=1;profile-level-id=42801E;sprop-parameter-sets=J0LgHpZUCg/QgAATiAAEkrRC,KM4GDMg=

There should be no UDP and Firewall issues because the VLC is on the same machine of WMS. I can’t figure it out what’s going wrong. And I will test if the MPET-TS works with VLC.

Thanks

Thanks Charlie,

Yes it’s None

Thanks Charlie. rtsp://localhost:1935/rtplive/myStream-osprey240e.sdp works well. I misunderstood this 1935 port with the port No. in SDP file.:frowning: