How to reduce latency in HDS protocol

Hi,

I am using wowza stream engine 4.3. By using adobe media live encoder with properties like

Framerate: 20 frames/sec

Format: H.264

Key frame : 2secs

Level: 2.1 iam doing live streaming. Now i need to reduce latency time. I changed in application.xml by adding some properties for HLS protocol and reduced to 10 secs latency. But HDS is taking nearly 30secs latency. As i m new to Wowza i donno where i need to tweak and change configurations/properties. Hence request to help me out by specifying in detail. Thanks

Hi,

Sorry…i found the solution in this forum by adding some properties in same xml file. Some how it reached 10sec latency but my client requires 5secs latency. Can any one suggest/help for this? Thanks in advance

Hi, this seems like the same issue in your other thread

I assume this is the guide you are referring to for HDS

This is the same principle as with HLS streaming, you modify sanjoseChunkDurationTarget, but it has to correspond to the key frame frequency of the stream. If you are able to encode to 1 second key frame frequency by making the key frame interval (or gop) the same as the FPS setting (e.g. FPS 24 and GOP 24) you will have 1 second key frame frequency; then if you set sanjoseChunkDurationTarget and cupertinoChunkDurationTarget to “1000” ms (1 second), the chunks will all be 1 second in duration with one key frame. This will improve playback start time and live stream latency.

When Wowza starts packetizing a live stream you will see the 1st 10 chunks being logged in the access log, and it that includes a/v/k (audio/video/key frames) and duration data for each chunk. It is ideal when eachc chunk is the same duration and has the same number of key frames.

So, to be clear, just setting these chunk targets is not enough, that setting should be a factor of key frame frequency.

Richard

Hi there, can you please provide your encoder settings?

What is the GOP length(key frame interval)?

What is the bit rate of the stream?

The sanjoseChunkDurationTarget, needs to correspond to the key frame frequency of the stream.

Also, it would be good to test these settings locally to rule out any bandwidth issues, the best way to do that is to make everything local and see what the delay is when using a stream which has 1 second keyframe intervals and the sanjoseChunkDurationTarget is set to 1000 (1 second).

You should be able to test in VLC player to keep everything local.

Thank you.

Salvadore

Hi,

I tried everything thats mentioned in the guide

https://www.wowza.com/docs/how-to-configure-adobe-hds-packetization-sanjosestreaming

But the latency is still above 30 secs.

currently my settings for HDS looks

<Property>
	<Name>sanjoseChunkDurationTarget</Name>
	<Value>2000</Value>
	<Type>Integer</Type>
</Property>
<Property>
	<Name>sanjoseMaxChunkCount</Name>
	<Value>5</Value>
	<Type>Integer</Type>
</Property>
<Property>
	<Name>sanjosePlaylistChunkCount</Name>
	<Value>2</Value>
	<Type>Integer</Type>
</Property>
<Property>
	<Name>sanjoseRepeaterChunkCount</Name>
	<Value>2</Value>
	<Type>Integer</Type>
</Property>

I am not seeing any improvement in latency with these settings. I am using origin-edge setup and i have made these settings on origin server.

any pointers ?

-Gaurav

Hi,

I am using actionscript for publishing and my encoder settings looks like this -

cam.setQuality(0, 80); (0 here means use as much bandwidth available. and 80 means 20 percent compression) so bitrate is variable.

cam.setMode(960, 720, 24, true); - resolution 960X720 at 24fps

cam.setKeyFrameInterval(24) ; - keyframe duration 1 secs.

var h264setting:H264VideoStreamSettings = new H264VideoStreamSettings();

h264setting.setProfileLevel(H264Profile.MAIN, H264Level.LEVEL_5_1);

I used these settings on local but the latency is still above 10secs. I also noticed if i make the chunk duration to 1 secs my player is no longer able to play the video.