Wowza Community

High latency when streaming live video rtmp

Hello,

I know that my problem was mentioned already on the forum and I have implemented all the suggestions from post: “https://www.wowza.com/docs/how-to-set-up-low-latency-applications-in-wowza-streaming-engine-for-rtmp-streaming”. But I am not getting anywhere so I decided to reach for help and suggestions.

I am using:

Wowza 2.2.4

JW Player

Wirecast 4.1.1

I am streaming live video over rtmp and I have 5 second delay.

I am not sure what else I can do in order to improve this.

Any suggestions please…

Regards, Tom

I have set JW Player to:

'bufferlength': '0'

but this does not help.

Do you have low fps setting? That causes start delay. That’s in that article tho. You don’t have control of network latency.

Richard

Setting the JW Player Flashvar “bufferlength” should do it.

Richard

If you have followed that guide, 30fps stream, bufferlength to 0… I don’t know what else to suggest

Richard

Richard,

Thanks for your replay.

FPS on Wirecast is set to 30. So I guess this is not an issue.

Tom

I do not understand only one suggestion from mentioned above link.

“On the player side it is important that the NetStream.setBufferTime(seconds) is set to zero (in Actionscript 3 use “NetStream.bufferTime = 0;”). This will give you the lowest possible latency on the playback side.”

I guess it does not apply to me because I use JW Player. Am I correct?

If not please tell me where/how do I change this parameter.

Thanks

hmm ok I have set bufferlength to 0 and I do not see any progress.

here it is the whole code for JW Player, maybe I am not seeing what is wrong.

  jwplayer('mediaplayer').setup({
    'flashplayer': 'player.swf',
    'id': 'playerID',
    'width': '380',
    'height': '285',
    'bufferlength': '0',
	'file': 'live.sdp',
	'streamer': 'rtmp://x.x.x.x:1935/live/'
  });

Thanks for replay

Hello,

Any suggestion guys please? I have run out of ideas and options.

Thanks in advance, Tom

Richard,

Could you please take a look at my “Application.xml” file and see if I am not missing something?

I would really appreciate.

Thanks, Tom

<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, cupertinostreamingrepeate
r, smoothstreamingrepeater, sanjosestreamingrepeater -->
                        <LiveStreamPacketizers>cupertinostreamingpacketizer,smoothstreamingpacketizer</LiveStreamPacketizers>
                        <!-- DVRPacketizers (separate with commas): dvrpacketizer -->
                        <DVRPacketizers></DVRPacketizers>
                        <!-- Properties defined here will override any properties defined in conf/Streams.xml for any streams types loaded by this application -->
                        <Properties>
<Property>
        <Name>flushInterval</Name>
        <Value>25</Value>
        <Type>Integer</Type>
</Property>
<Property>
	<Name>onFlushNotifyClients</Name>
	<Value>true</Value>
	<Type>Boolean</Type>
</Property>
                        </Properties>
                </Streams>
                <!-- HTTPStreamers (separate with commas): cupertinostreaming, smoothstreaming, sanjosestreaming -->
                <HTTPStreamers>cupertinostreaming,smoothstreaming,sanjosestreaming</HTTPStreamers>
                <!-- DVRStores (separate with commas): dvrfilestorage -->
                <DVRStores></DVRStores>
                <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>                                                                                                                                          
                        <!-- 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>                                                                                                                                        
                <DVRPacketizer>                         
<!-- Properties defined here will override any properties defined in conf/DVR.xml for any DVRPacketizer loaded by this applications -->        
                        <Properties>                                                                                                                                   
                        </Properties>                                                                                                                                  
                </DVRPacketizer>                                                                                                                                       
                <DVRStore>                                                                                                                                             
                        <!-- Properties defined here will override any properties defined in conf/DVR.xml for any DVRStore loaded by this applications -->             
                        <Properties>                                                                                                                                   
                        </Properties>                                                                                                                                  
                </DVRStore>                                                                                                                                            
                <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>properties</Name>                                                                                                                
                                <Description>Properties</Description>                                                                                                  
                                <Class>com.wowza.wms.module.ModuleProperties</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>          

Update

I have noticed that changing FPS to lower number does not affect latency in any way it is always 5 seconds.

I think it is very strange. The only parameter that affects video is “Quality”.

Wowza is installed on Linux based OS and each time I change settings, I restart service on the server.

If this suggests something please let me know.

Thanks in advance, Tom