Results 1 to 7 of 7

Thread: Live Streaming Latency Issues

  1. #1
    Join Date
    Oct 2013
    Posts
    4

    Question 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


    <Root>
    	<Application>
    		<!-- Uncomment to set application level timeout values
    		<ApplicationTimeout>60000</ApplicationTimeout>
    		<PingTimeout>12000</PingTimeout>
    		<ValidationFrequency>8000</ValidationFrequency>
    		<MaximumPendingWriteBytes>0</MaximumPendingWriteBytes>
    		<MaximumSetBufferTime>60000</MaximumSetBufferTime>
    		<MaximumStorageDirDepth>25</MaximumStorageDirDepth>
    		-->
    		<Connections>
    			<AutoAccept>true</AutoAccept>
    			<AllowDomains></AllowDomains>
    		</Connections>
    		<!--
    			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
    			
    		-->
    		<Streams>
    			<StreamType>live-lowlatency</StreamType>
    			<StorageDir>${com.wowza.wms.context.VHostConfigHome}/content</StorageDir>
    			<KeyDir>${com.wowza.wms.context.VHostConfigHome}/keys</KeyDir>
    			<!-- LiveStreamPacketizers (separate with commas): cupertinostreamingpacketizer, smoothstreamingpacketizer, sanjosestreamingpacketizer, mpegdashstreamingpacketizer, cupertinostreamingrepeater, smoothstreamingrepeater, sanjosestreamingrepeater, dvrstreamingpacketizer, dvrstreamingrepeater -->
    			<LiveStreamPacketizers>cupertinostreamingpacketizer,smoothstreamingpacketizer,sanjosestreamingpacketizer</LiveStreamPacketizers>
    			<!-- Properties defined here will override any properties defined in conf/Streams.xml for any streams types loaded by this application -->
    			<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>
    				<Property>
    					<Name>flushInterval</Name>
    					<Value>2</Value>
    					<Type>Integer</Type>
    				</Property>
    				<Property>
    					<Name>onFlushNotifyClients</Name>
    					<Value>true</Value>
    					<Type>Boolean</Type>
    				</Property>
    				<Property>
    					<Name>behindDropDFrames</Name>
    					<Value>1000</Value>
    					<Type>Integer</Type>
    				</Property>
    				<Property>
    					<Name>behindDropPFrames</Name>
    					<Value>2000</Value>
    					<Type>Integer</Type>
    				</Property>
    				<Property>
    					<Name>behindDropKFrames</Name>
    					<Value>3000</Value>
    					<Type>Integer</Type>
    				</Property>
    				<Property>
    					<Name>behindDropAudio</Name>
    					<Value>3000</Value>
    					<Type>Integer</Type>
    				</Property>
    			</Properties>
    		</Streams>
    		<Transcoder>
    			<!-- To turn on transcoder set to: transcoder -->
    			<LiveStreamTranscoder></LiveStreamTranscoder>
    			<!-- [templatename].xml or ${SourceStreamName}.xml -->
    			<Templates>${SourceStreamName}.xml,transrate.xml</Templates>
    			<ProfileDir>${com.wowza.wms.context.VHostConfigHome}/transcoder/profiles</ProfileDir>
    			<TemplateDir>${com.wowza.wms.context.VHostConfigHome}/transcoder/templates</TemplateDir>
    			<Properties>
    			</Properties>
    		</Transcoder>
    
    		<DVR>
    			<!-- As a single server or as an origin, use dvrstreamingpacketizer in LiveStreamPacketizers above -->
    			<!-- Or, in an origin-edge configuration, edges use dvrstreamingrepeater in LiveStreamPacketizers above -->
    			<!-- As an origin, also add dvrchunkstreaming to HTTPStreamers below -->
    
    			<!-- If this is a dvrstreamingrepeater, define Application/Repeater/OriginURL to point back to the origin -->
    			
    			<!-- To turn on DVR recording set Recorders to dvrrecorder.  This works with dvrstreamingpacketizer  -->
    			<Recorders></Recorders>
    
    			<!-- As a single server or as an origin, set the Store to dvrfilestorage-->
    			<!-- edges should have this empty -->
    			<Store></Store>
    
    			<!--  Window Duration is length of live DVR window in seconds.  0 means the window is never trimmed. -->
    			<WindowDuration>0</WindowDuration>
    
    			<!-- Storage Directory is top level location where dvr is stored.  e.g. c:/temp/dvr -->
    			<StorageDir>${com.wowza.wms.context.VHostConfigHome}/dvr</StorageDir>
    
    			<!-- valid ArchiveStrategy values are append, version, delete -->
    			<ArchiveStrategy>append</ArchiveStrategy>
    
    			<!-- Properties for DVR -->
    			<Properties>
    			</Properties>
    		</DVR>
    
    		<TimedText>
    			<!-- VOD caption providers (separate with commas): vodcaptionprovidermp4_3gpp, vodcaptionproviderttml, vodcaptionproviderwebvtt,  vodcaptionprovidersrt, vodcaptionproviderscc -->
    			<VODTimedTextProviders>vodcaptionprovidermp4_3gpp</VODTimedTextProviders>
    			
    			<!-- Properties for TimedText -->
    			<Properties>
    			</Properties>		
    		</TimedText>
    		
    		<!-- HTTPStreamers (separate with commas): cupertinostreaming, smoothstreaming, sanjosestreaming, mpegdashstreaming, dvrchunkstreaming -->
    		<HTTPStreamers>cupertinostreaming,smoothstreaming,sanjosestreaming</HTTPStreamers>
    		<SharedObjects>
    			<StorageDir></StorageDir>
    		</SharedObjects>
    		<Client>
    			<IdleFrequency>-1</IdleFrequency>
    			<Access>
    				<StreamReadAccess>*</StreamReadAccess>
    				<StreamWriteAccess>*</StreamWriteAccess>
    				<StreamAudioSampleAccess></StreamAudioSampleAccess>
    				<StreamVideoSampleAccess></StreamVideoSampleAccess>
    				<SharedObjectReadAccess>*</SharedObjectReadAccess>
    				<SharedObjectWriteAccess>*</SharedObjectWriteAccess>
    			</Access>
    		</Client>
    		<RTP>
    			<!-- RTP/Authentication/[type]Methods defined in Authentication.xml. Default setup includes; none, basic, digest -->
    			<Authentication>
    				<PublishMethod>digest</PublishMethod>
    				<PlayMethod>none</PlayMethod>
    			</Authentication>
    			<!-- RTP/AVSyncMethod. Valid values are: senderreport, systemclock, rtptimecode -->
    			<AVSyncMethod>senderreport</AVSyncMethod>
    			<MaxRTCPWaitTime>12000</MaxRTCPWaitTime>
    			<IdleFrequency>75</IdleFrequency>
    			<RTSPSessionTimeout>90000</RTSPSessionTimeout>
    			<RTSPMaximumPendingWriteBytes>0</RTSPMaximumPendingWriteBytes>
    			<RTSPBindIpAddress></RTSPBindIpAddress>
    			<RTSPConnectionIpAddress>0.0.0.0</RTSPConnectionIpAddress>
    			<RTSPOriginIpAddress>127.0.0.1</RTSPOriginIpAddress>
    			<IncomingDatagramPortRanges>*</IncomingDatagramPortRanges>
    			<!-- Properties defined here will override any properties defined in conf/RTP.xml for any depacketizers loaded by this application -->
    			<Properties>
    			</Properties>
    		</RTP>
    		<MediaCaster>
    			<RTP>
    				<RTSP>
    					<!-- udp, interleave -->
    					<RTPTransportMode>interleave</RTPTransportMode>
    				</RTSP>
    			</RTP>
    			<!-- Properties defined here will override any properties defined in conf/MediaCasters.xml for any MediaCasters loaded by this applications -->
    			<Properties>
    			</Properties>
    		</MediaCaster>
    		<MediaReader>
    			<!-- Properties defined here will override any properties defined in conf/MediaReaders.xml for any MediaReaders loaded by this applications -->
    			<Properties>
    			</Properties>
    		</MediaReader>
    		<MediaWriter>
    			<!-- Properties defined here will override any properties defined in conf/MediaWriter.xml for any MediaWriter loaded by this applications -->
    			<Properties>
    			</Properties>
    		</MediaWriter>
    		<LiveStreamPacketizer>
    			<!-- Properties defined here will override any properties defined in conf/LiveStreamPacketizers.xml for any LiveStreamPacketizers loaded by this applications -->
    			<Properties>
    			</Properties>
    		</LiveStreamPacketizer>
    		<HTTPStreamer>
    			<!-- Properties defined here will override any properties defined in conf/HTTPStreamers.xml for any HTTPStreamer loaded by this applications -->
    			<Properties>
    			</Properties>
    		</HTTPStreamer>
    		<Repeater>
    			<OriginURL></OriginURL>
    			<QueryString><![CDATA[]]></QueryString>
    		</Repeater> 
    		<Modules>
    			<Module>
    				<Name>base</Name>
    				<Description>Base</Description>
    				<Class>com.wowza.wms.module.ModuleCore</Class>
    			</Module>
    			<Module>
    				<Name>logging</Name>
    				<Description>Client Logging</Description>
    				<Class>com.wowza.wms.module.ModuleClientLogging</Class>
    			</Module>
    			<Module>
    				<Name>flvplayback</Name>
    				<Description>FLVPlayback</Description>
    				<Class>com.wowza.wms.module.ModuleFLVPlayback</Class>
    			</Module> 
    		</Modules>
    		<!-- Properties defined here will be added to the IApplication.getProperties() and IApplicationInstance.getProperties() collections -->
    		<Properties>
    		</Properties>
    	</Application>
    </Root>

  2. #2

    Default

    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

  3. #3
    Join Date
    Oct 2013
    Posts
    4

    Default

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

  4. #4

    Default

    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

  5. #5
    Join Date
    Oct 2013
    Posts
    4

    Exclamation

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

    Am I not placing the parameters in the correct <Properties> section?
    Does the example Flash RTMP Player I'm testing with need some adjustment in it? (I'm not really a Flash coder)

  6. #6

    Default

    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>
    <LiveStreamPacketizer>
    <!-- Properties defined here will override any properties defined in conf/LiveStreamPacketizers.xml for any LiveStreamPacketizers loaded by this applications -->
      <Properties>
    
      </Properties>
    </LiveStreamPacketizer>
    <HTTPStreamer>
    Salvadore

  7. #7
    Join Date
    Oct 2013
    Posts
    4

    Default

    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

Similar Threads

  1. Live streaming latency is over 5 seconds
    By jeka1sv in forum General Forum
    Replies: 3
    Last Post: 08-05-2014, 10:40 AM
  2. Live Streaming Latency Issue through Wowza
    By MaxLikelihood in forum Live Streaming and Encoders
    Replies: 3
    Last Post: 05-15-2014, 08:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •