Set up low latency applications in Wowza Streaming Engine for RTMP streaming

This article describes how to set up applications in Wowza Streaming Engine™ media server software to achieve the lowest possible latency from video capture to RTMP playback.

Notes:
  • The properties used in this article to adjust the latency of a stream only affect RTMP-based clients.
     
  • To learn more about how to deliver low latency streaming experiences using Wowza technology, see our Low Latency Streaming page.

Using a low latency live application


The Low-latency stream option can be enabled in your live application to lower stream latency. This setting is normally used for applications that publish and play live video content to one or a few client applications, such as in a video chat.

Wowza Streaming Engine Manager configuration

  1. Click the Applications tab, and then click the name of your live application.
     
  2. In the Setup tab of the details page, click Edit.
     
  3. Enable Low-latency stream, click Save, and then restart the application when prompted to apply the changes.

XML configuration

  1. Use a text editor to open the [install-dir]/conf/[application-name]/Application.xml file for your live application and change the Streams/StreamType property value to live-lowlatency.
     
  2. Restart Wowza Streaming Engine.

Changing player buffer time


On the player side, it's important that the NetStream.setBufferTime() method is set to zero (in ActionScript 3 use "NetStream.bufferTime = 0;"). This will give you the lowest possible latency on the playback side.

Although zero gives you the best possible latency, it might not give you the smoothest playback. So you may need to increase the buffer time to a value slightly greater then zero (such as .1 or .25). When using H.264-encoded video, we've found that any buffer setting greater then zero introduces a latency of at least 2 to 3 seconds with video encoded at 30 fps, and even higher at lower frame rates. This seems to be a player issue.
 
Note: When using JW Player, the buffer length is set using the bufferLength parameter.

Smoothing low frame rate playback

When running with NetStream.setBufferTime set to zero, you can often see lower frame rates due to the way the player renders the frames immediately. You can sometimes smooth playback by decreasing the flushInterval property value. However, using flushInterval will also cause the server's per-stream CPU load to increase so you won't be able to handle as many concurrent sessions per server.

Wowza Streaming Engine Manager configuration
To smooth playback using the flushInterval setting:
 
  1. Click the Applications tab and select your live application in the contents pane.
     
  2. In the details page, click the Properties tab, and then click Custom in the Quick Links bar.
     
    Note: Access to the Properties tab is limited to administrators with advanced permissions. For more information, see Manage credentials.
  3. In the Custom section, click Edit.
     
  4. Click Add Custom Property, specify the following settings in the Add Custom Property dialog box, and then click Add:
     
    • Path - Select /Root/Application/Streams.
       
    • Name - Enter flushInterval.
       
    • Type - Select Integer.
       
    • Value - Enter 25.
  5. Repeat the previous step to add the onFlushNotifyClients property using the following values:
     
    • Path - Select /Root/Application/Streams.
       
    • Name - Enter onFlushNotifyClients.
       
    • Type - Select Boolean.
       
    • Value - Enter true.
  6. Click Save, and then restart the application to apply the changes.

XML configuration
To smooth playback using the flushInterval setting:
 
  1. Use a text editor to open the [install-dir]/conf/[application-name]/Application.xml file for your live application and add the following properties to the Streams/Properties container. Be sure to add the properties to the correct <Properties> container in Application.xml as there are several in the file.
    <Property>
        <Name>flushInterval</Name>
        <Value>25</Value>
        <Type>Integer</Type>
    </Property>
    <Property>
        <Name>onFlushNotifyClients</Name>
        <Value>true</Value>
        <Type>Boolean</Type>
    </Property>
  2. Restart Wowza Streaming Engine.

More resources