Live Streaming Latency Issues

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]

Take a look at this article:

How to achieve the lowest latency from capture to playback

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

Salvadore

Did you see this article?

How to configure Apple HTTP Live Streaming packetization (cupertinostreaming)

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

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

<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:

</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

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. :confused:

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)

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