wowza reduces latency

 

Reprinted from: http://www.ttstream.com/wowza/live/howToAchieveTheLowestLatencyFromCaptureToPlayback

 
This article describes the configuration that needs to be done on the Wowza server to achieve the lowest latency effect when using RTMP to play the live stream of Wowza Streaming Engine. 

Notice:
1. The introduction of this article is only for the scene of playing RTMP live stream.

2. To learn more about low latency, please refer to Low-latency Streaming

feed


Live stream using low-latency type



Adjust the buffer time on the player side



Recommendations for encoding parameters 

Use a low-latency type of stream




Configured using the Wowza Streaming Engine Manager management interface


Do the following to enable Low-latency type live streaming: 

  1. In the Wowza Streaming Engine Manager management interface, click the Applications tab menu and click your live streaming application name (eg live ).

  2. In the application details interface of the Setup tab, click Edit .

  3. Tick ​​the checkbox of Low-latency stream , click Save , and restart the Wowza application according to the prompts for the configuration to take effect.

Configure with XML file


To enable Low-latency streaming
  1. Open the [install-dir]/conf/[application]/Application.xml file with a text editor and change the Streams/StreamType parameter to live-lowlatency .

  2. Restart the Wowza server for the configuration to take effect.

Adjust the buffer time on the player side



On the RTMP player side, it's important to set the parameter to 0 in the NetStream.setBufferTime() method (on Actionscript 3, use "NetStream.bufferTime = 0;"). This will give your player the lowest possible latency. 

Note 1:  Although setting the buffer duration to 0 will give you the lowest latency, it may result in unsmooth playback. So you may need to slightly increase the buffer duration (eg .1  or  .25 ).
Note 2:  When you use JW Player, you need to use the bufferLength parameter to set the buffer duration. Please read How does JW Palyer 6 work with Wowza Streaming Engine ?.

Smooth playback at low frame rates


When using NetStream.setBufferTime to set buffering to 0, you can reduce the frame rate to allow the player to render frame images faster. 
Sometimes, lowering the value of flushInterval can result in smoother playback. You can do this by editing the [install-dir]/conf/[application]/Application.xml  file and adding the following properties parameter  in Streams/Properties

: However, be aware that with this setup, the Wowza server is processing The CPU resources occupied by each live stream transmission will go up. As a result, the number of concurrent users that can be handled is reduced. 
Configured using the Wowza Streaming Engine Manager management interface 

  1. On the Wowza Streaming Engine Manager management interface, click the Applications tab menu and click your streaming application name.

  2. On the app's details screen, click the Properties tab, then click the Custom link in the Quick Links navigation

  3. In the Custom section, click Edit .

  4. Click Add Custom Property , make the following settings in the Add Custom Property dialog, 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 restart the application as prompted.


Configure with XML file

<Property>
	<Name>flushInterval</Name>
	<Value>25</Value>
	<Type>Integer</Type>
</Property>
<Property>
	<Name>onFlushNotifyClients</Name>
	<Value>true</Value>
	<Type>Boolean</Type>
</Property>
      


Advice on encoding parameters


Delay may also be generated in the video encoding process. We have found that encoding latency can be minimized when using the Flash Player's built-in encoders (microphone and camera). The Flash player's built-in encoding system uses Sorenson Spark (a variant of H.263) for video encoding and NellyMoser ASAO or Speex for audio encoding. To achieve low latency, it is important that you achieve an acceptable video quality with the highest possible bitrate. The example VideoChat in the Wowza Media Server installation package is a good example of how to use the built-in codec in the Flash player to implement ground delay. 

Increasing the frame rate or decreasing the keyframe interval can also reduce playback latency. 

Note:  NellyMoser ASAO and Speex audio codecs use a fixed numerical sample rate for each packet. For this reason, using a higher sample rate is better at reducing latency because more packets are generated per second. Therefore, we recommend setting Microphone.rate  to  11KHz  or  22KHz when you use the built-in Microphone to encode audio .

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324958020&siteId=291194637