# Minimizing HLS latency

**URL:** <https://community.wowza.com/t/minimizing-hls-latency/40487>\
**Category:** Wowza Streaming Engine\
**Created:** [May 22, 2013, 12:43pm UTC](https://community.wowza.com/t/minimizing-hls-latency/40487 "2013-05-22T12:43:16Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tom\_Distler](https://avatars.discourse-cdn.com/v4/letter/t/b2d939/32.png) [@Tom\_Distler](https://community.wowza.com/u/Tom_Distler)\
**Post date:** [May 22, 2013, 12:43pm UTC](https://community.wowza.com/t/minimizing-hls-latency/40487/1 "2013-05-22T12:43:16Z")

</div>

I’ve read several of the existing forum posts regarding this issue, and I’ve tried the things listed in this tutorial: [https://www.wowza.com/docs/how-to-configure-apple-hls-packetization-cupertinostreaming](https://www.wowza.com/docs/how-to-configure-apple-hls-packetization-cupertinostreaming)

When using JWPlayer in Chrome and iOS (safari natively), we are still seeing 25-30 seconds of latency (we hope to get \<5 secs). _ **I have verified that ffmpeg is outputting an I-frame every second using Elecard StreamEye.** _ Here is my ffmpeg command:

```auto
ffmpeg -i rtsp://<IP>/<stream> -an -vcodec libx264 -b:v 256k -x264opts keyint=10:min-keyint=10 -preset:v fast -profile:v baseline -level 30 -f flv rtmp://127.0.0.1/camera/live

```

Note: The stream is 10 fps (hence keyint=10). I am _ **not** _ seeing any errors about “Fragment duration greater than suggested range…” after increasing the I-frame rate.

I am using the latest ffmpeg and x264 code (built today 5.22.2013). My Wowza version is 3.5.2.

Here’s the relevant part of my Application.xml:

```auto
 <LiveStreamPacketizer>
       <Property>
             <Name>cupertinoChunkDurationTarget</Name>
             <Value>2000</Value>
             <Type>Integer</Type>
       </Property>
       <Property>
             <Name>cupertinoMaxChunkCount</Name>
             <Value>10</Value>
             <Type>Integer</Type>
       </Property>
       <Property>
             <Name>cupertinoPlaylistChunkCount</Name>
             <Value>3</Value>
             <Type>Integer</Type>
       </Property>
       <Property>
            <Name>cupertinoRepeaterChunkCount</Name>
            <Value>3</Value>
            <Type>Integer</Type>
       </Property>
 </LiveStreamPacketizer>

```

I have also set Streams/StreamType to “live-lowlatency”.

I have restarted the server and the ffmpeg stream after each change made to the configuration.

After all these changes, I’m still seeing the browser request a single TS segment every 10 seconds, and the video is behind “live” by ~30 seconds.

Any help would be appreciated.

-Tom

---

<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:** [May 22, 2013, 2:18pm UTC](https://community.wowza.com/t/minimizing-hls-latency/40487/2 "2013-05-22T14:18:07Z")

</div>

Hi there,

Can you start Wowza and download the chunklist with a url like this:

http://[wowza\_ip]:1935/vod/sample.mp4/chunklist.m3u8

Then open this file and let us know what you see.

Here is an example of what the file looks like:

```auto
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:13
#EXT-X-MEDIA-SEQUENCE:1
#EXTINF:11.25,
media_1.ts?wowzasessionid=89255007
#EXTINF:11.25,
media_2.ts?wowzasessionid=89255007
#EXTINF:11.25,
media_3.ts?wowzasessionid=89255007
#EXTINF:11.25,
media_4.ts?wowzasessionid=89255007
#EXTINF:10.208,
media_5.ts?wowzasessionid=89255007
#EXTINF:12.334,
media_6.ts?wowzasessionid=89255007
#EXTINF:11.75,
media_7.ts?wowzasessionid=89255007
#EXTINF:10.458,
media_8.ts?wowzasessionid=89255007
#EXTINF:12.917,
media_9.ts?wowzasessionid=89255007
#EXTINF:10.0,
media_10.ts?wowzasessionid=89255007
#EXTINF:10.791,
media_11.ts?wowzasessionid=89255007
#EXTINF:10.917,
media_12.ts?wowzasessionid=89255007
#EXTINF:11.25,
media_13.ts?wowzasessionid=89255007
#EXTINF:10.375,
media_14.ts?wowzasessionid=89255007
#EXTINF:10.042,
media_15.ts?wowzasessionid=89255007
#EXTINF:10.083,
media_16.ts?wowzasessionid=89255007
#EXTINF:9.833,
media_17.ts?wowzasessionid=89255007
#EXTINF:9.75,
media_18.ts?wowzasessionid=89255007
#EXTINF:10.209,

```

Can you supply your findings from the file so we can take a look at them?

Salvadore

---

<div class="post-metadata">

**Author:** ![Daren\_Johnson](https://avatars.discourse-cdn.com/v4/letter/d/ee59a6/32.png) [@Daren\_Johnson](https://community.wowza.com/u/Daren_Johnson)\
**Post date:** [May 23, 2013, 8:12am UTC](https://community.wowza.com/t/minimizing-hls-latency/40487/3 "2013-05-23T08:12:59Z")

</div>

The Chunk properties need to be within the LiveStreamPacketizer/Properties container.

However, it looks like your Properties container is missing from LiveStreamPacketizer.

So needs to look like this:

```auto
 <LiveStreamPacketizer>
    <Properties>
       <Property>
             <Name>cupertinoChunkDurationTarget</Name>
             <Value>2000</Value>
             <Type>Integer</Type>
       </Property>
       <Property>
             <Name>cupertinoMaxChunkCount</Name>
             <Value>10</Value>
             <Type>Integer</Type>
       </Property>
       <Property>
             <Name>cupertinoPlaylistChunkCount</Name>
             <Value>3</Value>
             <Type>Integer</Type>
       </Property>
       <Property>
            <Name>cupertinoRepeaterChunkCount</Name>
            <Value>3</Value>
            <Type>Integer</Type>
       </Property>
   </Properties>
 </LiveStreamPacketizer>

```

---

<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:** [May 22, 2013, 2:36pm UTC](https://community.wowza.com/t/minimizing-hls-latency/40487/4 "2013-05-22T14:36:49Z")

</div>

Hi Tom, are you sure you are looking at your live stream? or are you looking at the sample.mp4 stream.

The url I provided was just a sample url, your url should be http://[wowza-ip]:1935/your-live-stream/chunklist.m3u8

I am only asking because the two chunklist look identical.

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:** [May 22, 2013, 2:53pm UTC](https://community.wowza.com/t/minimizing-hls-latency/40487/5 "2013-05-22T14:53:26Z")

</div>

Tom, sorry for the confusion.

The chunklist is showing that your chunks are 10 seconds long, which indicates either your application is miss configured and the default values are being used or your assumptions about fps and gop length is incorrect.

Please restart Wowza, then start the stream, let it run for a minute, then zip up and send the /conf folder and the current access log showing the restart and your test to support@wowza.com

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:** [May 23, 2013, 11:45am UTC](https://community.wowza.com/t/minimizing-hls-latency/40487/6 "2013-05-23T11:45:57Z")

</div>

Good catch Daren, sorry I missed this one guys, it was staring me right in the face.

Glad you got this sorted out Tom.

Salvadore

---

<div class="post-metadata">

**Author:** ![Tom\_Distler](https://avatars.discourse-cdn.com/v4/letter/t/b2d939/32.png) [@Tom\_Distler](https://community.wowza.com/u/Tom_Distler)\
**Post date:** [May 22, 2013, 1:21pm UTC](https://community.wowza.com/t/minimizing-hls-latency/40487/7 "2013-05-22T13:21:31Z")

</div>

```auto
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:13
#EXT-X-MEDIA-SEQUENCE:1
#EXTINF:11.25,
media_1.ts?wowzasessionid=2076576926
#EXTINF:11.25,
media_2.ts?wowzasessionid=2076576926
#EXTINF:11.25,
media_3.ts?wowzasessionid=2076576926
#EXTINF:11.25,
media_4.ts?wowzasessionid=2076576926
#EXTINF:10.208,
media_5.ts?wowzasessionid=2076576926
#EXTINF:12.334,
media_6.ts?wowzasessionid=2076576926
#EXTINF:11.75,
media_7.ts?wowzasessionid=2076576926
#EXTINF:10.458,
media_8.ts?wowzasessionid=2076576926
#EXTINF:12.917,
media_9.ts?wowzasessionid=2076576926
#EXTINF:10.0,
media_10.ts?wowzasessionid=2076576926
#EXTINF:10.791,
media_11.ts?wowzasessionid=2076576926
#EXTINF:10.917,
media_12.ts?wowzasessionid=2076576926
#EXTINF:11.25,
media_13.ts?wowzasessionid=2076576926
#EXTINF:10.375,
media_14.ts?wowzasessionid=2076576926
#EXTINF:10.042,
media_15.ts?wowzasessionid=2076576926
#EXTINF:10.083,
media_16.ts?wowzasessionid=2076576926
#EXTINF:9.833,
media_17.ts?wowzasessionid=2076576926
#EXTINF:9.75,
media_18.ts?wowzasessionid=2076576926
#EXTINF:10.209,
media_19.ts?wowzasessionid=2076576926
#EXTINF:11.625,
media_20.ts?wowzasessionid=2076576926
#EXTINF:12.375,
media_21.ts?wowzasessionid=2076576926
#EXTINF:10.041,
media_22.ts?wowzasessionid=2076576926
#EXTINF:10.792,
media_23.ts?wowzasessionid=2076576926
#EXTINF:10.417,
media_24.ts?wowzasessionid=2076576926
#EXTINF:12.5,
media_25.ts?wowzasessionid=2076576926
#EXTINF:11.041,
media_26.ts?wowzasessionid=2076576926
#EXTINF:10.459,
media_27.ts?wowzasessionid=2076576926
#EXTINF:10.041,
media_28.ts?wowzasessionid=2076576926
#EXTINF:12.0,
media_29.ts?wowzasessionid=2076576926
#EXTINF:10.25,
media_30.ts?wowzasessionid=2076576926
#EXTINF:12.292,
media_31.ts?wowzasessionid=2076576926
#EXTINF:11.25,
media_32.ts?wowzasessionid=2076576926
#EXTINF:11.25,
media_33.ts?wowzasessionid=2076576926
#EXTINF:10.458,
media_34.ts?wowzasessionid=2076576926
#EXTINF:12.209,
media_35.ts?wowzasessionid=2076576926
#EXTINF:9.583,
media_36.ts?wowzasessionid=2076576926
#EXTINF:9.833,
media_37.ts?wowzasessionid=2076576926
#EXTINF:11.542,
media_38.ts?wowzasessionid=2076576926
#EXTINF:10.542,
media_39.ts?wowzasessionid=2076576926
#EXTINF:12.875,
media_40.ts?wowzasessionid=2076576926
#EXTINF:12.458,
media_41.ts?wowzasessionid=2076576926
#EXTINF:10.125,
media_42.ts?wowzasessionid=2076576926
#EXTINF:11.0,
media_43.ts?wowzasessionid=2076576926
#EXTINF:10.958,
media_44.ts?wowzasessionid=2076576926
#EXTINF:9.959,
media_45.ts?wowzasessionid=2076576926
#EXTINF:11.125,
media_46.ts?wowzasessionid=2076576926
#EXTINF:11.25,
media_47.ts?wowzasessionid=2076576926
#EXTINF:11.25,
media_48.ts?wowzasessionid=2076576926
#EXTINF:11.25,
media_49.ts?wowzasessionid=2076576926
#EXTINF:11.25,
media_50.ts?wowzasessionid=2076576926
#EXTINF:11.25,
media_51.ts?wowzasessionid=2076576926
#EXTINF:11.25,
media_52.ts?wowzasessionid=2076576926
#EXTINF:11.25,
media_53.ts?wowzasessionid=2076576926
#EXTINF:11.25,
media_54.ts?wowzasessionid=2076576926
#EXTINF:1.541,
media_55.ts?wowzasessionid=2076576926
#EXT-X-ENDLIST

```

---

<div class="post-metadata">

**Author:** ![Tom\_Distler](https://avatars.discourse-cdn.com/v4/letter/t/b2d939/32.png) [@Tom\_Distler](https://community.wowza.com/u/Tom_Distler)\
**Post date:** [May 22, 2013, 1:42pm UTC](https://community.wowza.com/t/minimizing-hls-latency/40487/8 "2013-05-22T13:42:20Z")

</div>

Haha… yeah, I just used your URL. Here’s the manifest from my live stream:

```auto
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-ALLOW-CACHE:NO
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:1
#EXTINF:10.0,
media_1.ts?wowzasessionid=1033911122
#EXTINF:10.0,
media_2.ts?wowzasessionid=1033911122
#EXTINF:10.0,
media_3.ts?wowzasessionid=1033911122

```

---

<div class="post-metadata">

**Author:** ![Tom\_Distler](https://avatars.discourse-cdn.com/v4/letter/t/b2d939/32.png) [@Tom\_Distler](https://community.wowza.com/u/Tom_Distler)\
**Post date:** [May 23, 2013, 9:47am UTC](https://community.wowza.com/t/minimizing-hls-latency/40487/9 "2013-05-23T09:47:30Z")

</div>

[RESOLVED]

Thanks!
