# Live Streaming Latency Issues

**URL:** <https://community.wowza.com/t/live-streaming-latency-issues/41340>\
**Category:** Wowza Streaming Engine\
**Created:** [October 2, 2013, 10:37am UTC](https://community.wowza.com/t/live-streaming-latency-issues/41340 "2013-10-02T10:37:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sebastian\_Dwornik](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@Sebastian\_Dwornik](https://community.wowza.com/u/Sebastian_Dwornik)\
**Post date:** [October 2, 2013, 10:37am UTC](https://community.wowza.com/t/live-streaming-latency-issues/41340/1 "2013-10-02T10:37:29Z")

</div>

**Purpose:**

**To support the Accessibility Act.**

**A local city theatre is wanting to be able to have hearing impaired people bring their own mobile devices (iOS/Android) and watch a live stream of sub-text+sign language that matches the live theatre event on-stage at the same time.**

**Challenge:**

**I need to attain the lowest possible latency for live streaming. _Near real-time_.**

**Platform: OS X / mobile**

**I’ve tried Wirecast and am now on to Flash Media Live Encoder (FMLE) + Wowza (v3.6.2).**

**Currently my setup consists entirely on my MacBook Pro (Localhost). For some quick testing I managed to get a 240p video stream (using onboard camera) to encode+broadcast viewable through the FlashRTMPPlayer example using Firefox/Chrome.**

**Although it works, the latency is ~4-5 seconds. Which is strange given that it all exists on the localhost machine and has more than enough CPU/RAM resources to push it faster.**

**So after much more reading of Wowza articles and other bits and pieces, I still cannot get this latency down. Everything I do seems to have no effect.**

**If my localhost browser can’t view it with \<1 second latency, mobile devices have no chance at all to do any better.**

**Yet this must be possible given that internet chatting (skype, webex, facetime) manage to get better latency.**

**So I must be doing something incorrectly because I’m certain this type of situation must have already been solved in some fashion. Do I need to code my own custom iOS app to accomplish this somehow?**

**Below is my own Application.xml**

**[HTML]**

**\<!-- Uncomment to set application level timeout values**

**60000**

**12000**

**8000**

**0**

**60000**

**25**

**–\>**

**true**

**\<!–**

**StorageDir path variables**

**${com.wowza.wms.AppHome} - Application home directory**

**${com.wowza.wms.ConfigHome} - Configuration home directory**

**${com.wowza.wms.context.VHost} - Virtual host name**

**${com.wowza.wms.context.VHostConfigHome} - Virtual host config directory**

**${com.wowza.wms.context.Application} - Application name**

**${com.wowza.wms.context.ApplicationInstance} - Application instance name**

**–\>**

**live-lowlatency**

**${com.wowza.wms.context.VHostConfigHome}/content**

**${com.wowza.wms.context.VHostConfigHome}/keys**

**cupertinostreamingpacketizer,smoothstreamingpacketizer,sanjosestreamingpacketizer**

**sanjoseChunkDurationTarget**

**1000**

**Integer**

**sanjoseMaxChunkCount**

**10**

**Integer**

**sanjosePlaylistChunkCount**

**3**

**Integer**

**sanjoseRepeaterChunkCount**

**3**

**Integer**

**flushInterval**

**2**

**Integer**

**onFlushNotifyClients**

**true**

**Boolean**

**behindDropDFrames**

**1000**

**Integer**

**behindDropPFrames**

**2000**

**Integer**

**behindDropKFrames**

**3000**

**Integer**

**behindDropAudio**

**3000**

**Integer**

**${SourceStreamName}.xml,transrate.xml**

**${com.wowza.wms.context.VHostConfigHome}/transcoder/profiles**

**${com.wowza.wms.context.VHostConfigHome}/transcoder/templates**

**0**

**${com.wowza.wms.context.VHostConfigHome}/dvr**

**append**

**vodcaptionprovidermp4\_3gpp**

**cupertinostreaming,smoothstreaming,sanjosestreaming**

**-1**

**\***

**\***

**\***

**\***

**digest**

**none**

**senderreport**

**12000**

**75**

**90000**

**0**

**0.0.0.0**

**127.0.0.1**

**\***

**interleave**

**base**

**Base**

**com.wowza.wms.module.ModuleCore**

**logging**

**Client Logging**

**com.wowza.wms.module.ModuleClientLogging**

**flvplayback**

**FLVPlayback**

**com.wowza.wms.module.ModuleFLVPlayback**

**[/HTML]**

---

<div class="post-metadata">

**Author:** ![sal\_jefferson](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sal\_jefferson](https://community.wowza.com/u/sal_jefferson)\
**Post date:** [October 2, 2013, 11:21am UTC](https://community.wowza.com/t/live-streaming-latency-issues/41340/2 "2013-10-02T11:21:35Z")

</div>

Take a look at this article:

[How to achieve the lowest latency from capture to playback](https://www.wowza.com/docs/how-to-set-up-low-latency-applications-in-wowza-streaming-engine-for-rtmp-streaming)

Also look through the comments at the bottom of the article for more useful information.

Salvadore

---

<div class="post-metadata">

**Author:** ![sal\_jefferson](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sal\_jefferson](https://community.wowza.com/u/sal_jefferson)\
**Post date:** [October 2, 2013, 11:36am UTC](https://community.wowza.com/t/live-streaming-latency-issues/41340/3 "2013-10-02T11:36:20Z")

</div>

Did you see this article?

[How to configure Apple HTTP Live Streaming packetization (cupertinostreaming)](https://www.wowza.com/docs/how-to-configure-apple-hls-packetization-cupertinostreaming%28iOS%29)

What are you frames per second, and key frame frequency settings in the encoder? FPS and key frame frequency is critical.

If your live stream has a 1 second key frame frequency, and you set cupertinoChunkDurationTarget to 1000 milliseconds, which is 1 second (default is 10000 milliseconds, 10 seconds), you can get down to 3 seconds or less.

Salvadore

---

<div class="post-metadata">

**Author:** ![sal\_jefferson](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sal\_jefferson](https://community.wowza.com/u/sal_jefferson)\
**Post date:** [October 2, 2013, 12:31pm UTC](https://community.wowza.com/t/live-streaming-latency-issues/41340/4 "2013-10-02T12:31:53Z")

</div>

Actually, good point, these properties are supposed to go in the LiveStreamPacketizer/Properties:

```auto
<Property>
  <Name>sanjoseChunkDurationTarget</Name>
  <Value>1000</Value>
  <Type>Integer</Type>
</Property>
<Property>
  <Name>sanjoseMaxChunkCount</Name>
  <Value>10</Value>
  <Type>Integer</Type>
</Property>
<Property>
  <Name>sanjosePlaylistChunkCount</Name>
  <Value>3</Value>
  <Type>Integer</Type>
</Property>
<Property>
  <Name>sanjoseRepeaterChunkCount</Name>
  <Value>3</Value>
  <Type>Integer</Type>
</Property>

```

Which is down toward the bottom of the Application.xml file:

```auto
</MediaWriter>
[B]<LiveStreamPacketizer>[/B]
<!-- Properties defined here will override any properties defined in conf/LiveStreamPacketizers.xml for any LiveStreamPacketizers loaded by this applications -->
 [B] [I]<Properties>
  </Properties>[/I][/B]
[b]</LiveStreamPacketizer>[/B]
<HTTPStreamer>

```

Salvadore

---

<div class="post-metadata">

**Author:** ![Sebastian\_Dwornik](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@Sebastian\_Dwornik](https://community.wowza.com/u/Sebastian_Dwornik)\
**Post date:** [October 2, 2013, 12:27pm UTC](https://community.wowza.com/t/live-streaming-latency-issues/41340/5 "2013-10-02T12:27:22Z")

</div>

Been there, read that. No difference.

In fact no matter what I’ve tried, there doesn’t seem to be a change at all in m results. For better or worse. 😕

---

<div class="post-metadata">

**Author:** ![Sebastian\_Dwornik](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@Sebastian\_Dwornik](https://community.wowza.com/u/Sebastian_Dwornik)\
**Post date:** [October 2, 2013, 1:02pm UTC](https://community.wowza.com/t/live-streaming-latency-issues/41340/6 "2013-10-02T13:02:13Z")

</div>

I tried that already. With various FPS and keyframes. Still no difference.

Am I not placing the parameters in the correct section?

Does the example Flash RTMP Player I’m testing with need some adjustment in it? (I’m not really a Flash coder)

---

<div class="post-metadata">

**Author:** ![Sebastian\_Dwornik](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@Sebastian\_Dwornik](https://community.wowza.com/u/Sebastian_Dwornik)\
**Post date:** [October 2, 2013, 1:42pm UTC](https://community.wowza.com/t/live-streaming-latency-issues/41340/7 "2013-10-02T13:42:47Z")

</div>

So I kept trying a bunch of things and parameters too. My single iPad 4 couldn’t do better than 4 seconds of latency. And even at that it started to get jittery with frames missing.

This project seems to be steering into a more custom solution with a different set of tools. Perhaps something like [http://tokbox.com/opentok](http://tokbox.com/opentok)
