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

Step by step instructions for using a native RTP encoder (an encoder without RTSP announce capabilties) with Wowza Pro (Flash Player version 9.0.115.0 or greater is required).

  • Download and install Wowza Media Server Pro (version: Wowza Pro 1.7.0 or greater)

  • Create a new Wowza Pro application for streaming (may already exist if examples installed)

  • Create the folder [install-dir]/applications/rtplive

  • Create the folder [install-dir]/conf/rtplive

  • Copy the file [install-dir]/conf/Application.xml into this new folder [install-dir]/conf/rtplive

  • Edit the newly copied Application.xml and make the following changes:

  • Change Streams/StreamType to rtp-live

  • Add following properties to Streams/Properties container (there are several containers, be sure to add to correct container)

    <Property>
    	<Name>sortPackets</Name>
    	<Value>true</Value>
    	<Type>Boolean</Type>
    </Property>
    <Property>
    	<Name>sortBufferSize</Name>
    	<Value>500</Value>
    	<Type>Integer</Type>
    </Property>
    
    
  • Startup the Wowza Pro server

  • From the encoder generate a Session Description Protocol (SDP) file that describes the native stream (consult your encoders documentation for instructions on how to do this) use the filename myStream.sdp

  • Copy the SDP file into the [install-dir]/content folder

  • To play the stream, double click [install-dir]/examples/LiveVideoStreaming/client/live.html, set Server to rtmp://[server-ip-address]/rtplive and Stream to myStream.sdp and click the Play button

    [install-dir]

    Windows (default): C:\Program Files\Wowza Media Systems\Wowza Media Server Pro [version]

    Mac OS X: /Library/WowzaMediaServerPro

    Linux: /usr/local/WowzaMediaServerPro

    **Note:**The Session Description Protocol (SDP) information can also be made available to Wowza Pro through a URL. Using this method the stream name is rtplive:[SDP URL]. For example if the SDP information is hosted at the web address:

    http://192.168.1.7/rtp/myStream.sdp
    

    Use the stream name:

    rtplive:http://192.168.1.7/rtp/myStream.sdp
    

    Note: Many players will not accept stream names that look like urls. You can use the stream name alias package to create an alias for the stream name url. This package can also be used to secure Wowza Pro so that it will only be able to restream urls that you specify. This package can be downloaded from here: StreamNameAlias.

    Note: Configure the encoder to send the stream to the Wowza Pro server’s ip address. If the Wowza Pro server is behind a router that uses NAT (network address translation) send it to the routers external ip address and be sure to map the UDP port to the correct internal ip address. Be sure that the time-to-live value on the encoder is high enough so that the stream is able to reach the server running Wowza Pro (time-to-live explained)

    Note: If you experience problems getting either the audio or video to play through Flash, double check the version number of the Flash player (Flash player version 9.0.115.0 or above is required). If you still have problems, turn on Wowza Pro debug logging (edit [install-dir]/conf/log4j.properties and change the log4j.rootCategory on the first line from INFO to DEBUG), try the encoder several more times, zip up and send your [install-dir]/logs folder along with screen shots of the encoder setup screens and the LiveVideoStreaming player screen and send a detailed description of your problem to support@wowza.com.

    Charlie

Follow these instructions to turn on debug logging:

Note: If you experience problems getting either the audio or video to play through Flash, double check the version number of the Flash player (Flash player version 9.0.115.0 or above is required). If you still have problems, turn on Wowza Pro debug logging (edit [install-dir]/conf/log4j.properties and change the log4j.rootCategory on the first line from INFO to DEBUG), try the encoder several more times, zip up and send your [install-dir]/logs folder along with screen shots of the encoder setup screens and the LiveVideoStreaming player screen and send a detailed description of your problem to support@wowza.com.

Send me the Wowza Pro debug logs. Also, zip up your conf folder. Also, provide as much detail as possible on your encoder and how it works.

Charlie

Did you set the stream type to rtp-live? What is showing up in the Wowza Pro logs? If you run Wowza Pro standalone then you can watch the log entries. You should see the bind statements and a firstPacket log statement when the first UDP package arrives.

Charlie

Excellent, glad to hear you have it working.

Charlie

In [install-dir]/conf/[application]/Application.xml be sure to set RTP/Authentication/PlayMethod to none.

Charlie

Hi.

I tried Wowza with my custom RTP encoder, and it’s working fine for 20 seconds, and then the Flash movie begins to stutter.

I’m not sure it’s entirely Wowza issue, though using the RTP encoder with Apple server works just fine.

Therefore I have the following questions:

  1. Is anyone familiar with this symptom, where video has good start and then suddenly slows-down?

  2. Any idea how many different Live H.264 concurrent streams can Wowza server handle, provided the fact I do the encoding on other machines? Does Wowza simply repackage the RTP into RTMP, or it does other processing as well?

Thanks.

New to this step - anyone help with a “push start” would be appreciated.

… From the encoder generate a Session Description Protocol (SDP) file that describes the native stream (consult your encoders documentation for instructions on how to do this) use the filename myStream.sdp

I understand to put the file in the location - also - it errors out BIG TIME if this file is not in place.

I need help building the SDP file - or - where to find documentation. Using QuickTime broadcaster - cannot locate this step.

Thanks!

As I understand it, this will cause Wowza to use the SDP file info to go out and connect to another host via RTSP to try and retrieve a stream when someone connects to the rtplive application, right? Please correct me if I’m wrong.

If this is the case, is there any way to just get Wowza to open ports on the local machine to listen for incoming RTP traffic to act as a source? Then that source could be used somehow by an application?

Hi, I’m evaluating Wowza for use as a RTMP/RTP+RTCP bridge in a Flash video phone application. I’d like to leverage Wowza’s RTP capabilities as much as possible.

The application has several RTP streams that come and go all the time; could I dynamically create and delete SDP files in [install-dir]/content?

The audio and video are transmitted in separate RTP streams; can Wowza mux the 2 streams into a single RTMP stream?

The bridge needs to do some lightweight video & audio transcoding, from Flash’s SVQ1 to standard H.263, and from Nellymoser Asao to uLaw or aLaw PCM. If I write the transcoders, does Wowza have hooks for plugging them in?

If there’s no better solution, I can probably cobble something together using the VideoPassthru example as a starting point; can you steer me towards a converse example that takes audio/video from an external source and publishes it as an RTMP stream?

Thanks for your advice!

David

Check out this forum post which goes through the specific steps for QuickTime Broadcaster:

http://community.wowza.com/t/-/42

If you still want to use the other method then I believe you can generate an SDP file from the File->Export menu in QuickTime Broadcaster.

Charlie

Follow these instructions and you no longer will need the .sdp file (the instructions in this forum thread are for connecting to a native RTP stream that does not use RTSP announce - QuickTime Broadcaster supports RTSP annouce - please, please follow the instructions in the first post of the thread at the URL below):

http://community.wowza.com/t/-/42

In the next patch I will change it so it only reports the missing file error once when using the native RTP method covered in this thread.

Charlie

No, it does not establish an RTSP connection. Wowza Pro in this case reads the SDP file and opens the ports defined in the SDP file and begins listening for incoming UDP packets.

Charlie

Do you see the player connecting to Wowza Pro to play the stream? It sounds like the player is not connecting.

Charlie

With the Flash player if you set the NetStream.setBufferTime to zero, install the most recent patch from here (https://www.wowza.com/devbuild.html) and use the rtp-live-lowlatency stream type you will see the best latency out of Flash and Wowza Pro. With the Haivision Mako hardware H.264 encoders the latency is less then 1 second. If you are seeing numbers greater than this then it is most likely on the encoding side. If you set NetStream.setBufferTime to anything greater then 0 with H.264/AAC video the latency will jump up to 2-3 seconds. So do be sure you have set this property set correctly.

Charlie

Putting it in an FLV container will not effect the playback performance.

Charlie

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

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

I think I get what you are trying to do.

This might be easier to do in Wowza 2.0. In Wowza 2.0 we have a thing called a .stream file. The .stream file is an alias for a stream. It is a simple text file that can contain a complex RTSP or MPEG-TS URL. You could create a simple HTTPProvider that would write a .stream file in the content folder to enable a stream for re-streaming. When the stream was no longer available it would remove the .stream file.

The client would then request the stream using the .stream filename. The MediaCaster system would maintain the connection to the RTSP based encoder and the data could be interleaved over the RTSP connection.

I hope this makes sense.

Charlie

You can use HTTPProviders to read and write SDP file to the [install-dir]/content folder. This is pretty straight forward. If you set the MediaCaster/Properties property sdpFileCheckFrequency the Wowza will check to see if the SDP file has changed based on this time value (in milliseconds). It it changes it will re-start the stream and re-read the SDP file. The sdpFileCheckFrequency property is covered in the User’s Guide.

Charlie

Yes, in both 1.7 and 2.0 (we did not remove any functionality).

Yes, you can host the SDP file at a web server and address it with http url. Really no magic. Just use the URL to the SDP file rather then copying file to content folder and using filename.

Charlie