# HLS stream jumps ahead

**URL:** <https://community.wowza.com/t/hls-stream-jumps-ahead/40989>\
**Category:** Wowza Streaming Engine\
**Created:** [September 18, 2013, 12:56pm UTC](https://community.wowza.com/t/hls-stream-jumps-ahead/40989 "2013-09-18T12:56:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jordan\_Rumph](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@Jordan\_Rumph](https://community.wowza.com/u/Jordan_Rumph)\
**Post date:** [September 18, 2013, 12:56pm UTC](https://community.wowza.com/t/hls-stream-jumps-ahead/40989/1 "2013-09-18T12:56:45Z")

</div>

Hello! When playing our livestream using HLS, the video will skip ahead about 10-15 seconds and freeze. Audio will continue as normal until it catches up with the video and then it will play fine for a while until it happens again.

For testing, our setup is basic. We have Makito encoders publishing 36 streams to our Wowza server with TS-UDP. We are using simple stream names with just one live application. Here are some configuration settings for each part:

MakitoX2 encoder

* * *

Video Out: 720p

FPS: 60

GOP: 120

UDP Port: 10000-10500

Bitrate: 3000

Wowza

* * *

content/live/10010.stream:

udp://0.0.0.0:10010

conf/live/Application.xml:

live

${com.wowza.wms.context.VHostConfigHome}/content/live

cupertinostreamingpacketizer

cupertinostreaming

STB

* * *

Amino a140

So far we have tested the streams on an Amino, iPad and ffplay. All will have a hickup, but only the Amino will jump ahead and freeze for 10-15 seconds. We have also sent a stream straight from the encoder to the Amino and we have no problems at all. Of course, that is using RTSP and not HLS. There are no errors in the wowza error logs and we have tried disabling data events as per this article;

> **[Configure Apple HLS packets for HTTP streaming](https://www.wowza.com/docs/how-to-configure-apple-hls-packetization-cupertinostreaming)**
>
> Configure the CupertinoStreaming segmenter in Wowza Streaming Engine software to split streams into segments for playback on Apple HLS compatible clients.

We have also tried adjusting the chunk settings as recommended here;

> [@HLS stream sudden skip](http://community.wowza.com/t/-/34701):
>
> Hi, we see random sudden skips on our HLS, the skip is always forward , not to a particular point and at no particular time, mediastreamvalidator results are fine, i can’t find anything in the logs, any hint would be appreciated, the server CPU or I/O are not under any stress. (WMS 3.1.2 patch 4, Latest MediaCache) BR, Shay Update: we use BDNS i think the reason for the skip was that the player is not “sticky” so i used cupertinoRelativePlaylistPlaylists false Boolean together with: c…

> **[Configure Apple HLS packets for HTTP streaming](https://www.wowza.com/docs/how-to-configure-apple-hls-packetization-cupertinostreaming)**
>
> Configure the CupertinoStreaming segmenter in Wowza Streaming Engine software to split streams into segments for playback on Apple HLS compatible clients.

Thanks in advance and any help will be greatly appreciated!

Jordan

---

<div class="post-metadata">

**Author:** ![Jordan\_Rumph](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@Jordan\_Rumph](https://community.wowza.com/u/Jordan_Rumph)\
**Post date:** [September 19, 2013, 7:40am UTC](https://community.wowza.com/t/hls-stream-jumps-ahead/40989/2 "2013-09-19T07:40:35Z")

</div>

Update:

We have done some more testing with the chunk settings and have noticed some interesting things. If our cupertinoChunkDurationTarget is set to 10000:

cupertinoChunkDurationTarget

10000

Integer

cupertinoMaxChunkCount

10

Integer

cupertinoPlaylistChunkCount

3

Integer

cupertinoRepeaterChunkCount

3

Integer

and our GOP size on the encoders is set to 2 seconds (60fps with 120 gop), we get this when we check the chunklist:

#EXTM3U

#EXT-X-VERSION:3

#EXT-X-ALLOW-CACHE:NO

#EXT-X-TARGETDURATION:11

#EXT-X-MEDIA-SEQUENCE:8

#EXTINF:10.01,

media\_w688736434\_8.ts

#EXTINF:10.01,

media\_w688736434\_9.ts

#EXTINF:10.01,

media\_w688736434\_10.ts

So for whatever reason the GOP size on the encoders is offsetting the cupertinoChunkDurationTarget.

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [September 19, 2013, 9:38pm UTC](https://community.wowza.com/t/hls-stream-jumps-ahead/40989/3 "2013-09-19T21:38:45Z")

</div>

I am not sure why the skip and freeze on Amino playing HLS is happening. Is there any corresponding log messages? Have you tried RTSP playback from Wowza in the Amino? You said you played RTSP from the source, try playback from Wowza over RTSP.

The playlist looks right for cupertinoChunkDurationTarget “10000” and key frame frequency of 2 seconds. Each chunk is 10 seconds long, and each chunk should contain 5 key frames. You can also try 2000, 4000, 6000, and 8000.

Richard

---

<div class="post-metadata">

**Author:** ![Jordan\_Rumph](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@Jordan\_Rumph](https://community.wowza.com/u/Jordan_Rumph)\
**Post date:** [September 20, 2013, 4:55am UTC](https://community.wowza.com/t/hls-stream-jumps-ahead/40989/4 "2013-09-20T04:55:53Z")

</div>

Hi Richard. Thanks for responding.

I think the problem is that the targetduration is reporting 11 instead of 10. We are running the Amino a140 in debug mode and it is showing an out of sync error. It’s showing that the segments are 10 seconds and that we have 5 i frames, but it’s also showing 11sec duration. I will keep trying different settings and let you know if I find anything. It seems to be the exact same issue as in this thread;

> [@TS duration does not match cupertinoChunkDurationTarget on HLS](http://community.wowza.com/t/-/40042):
>
> Hi, I am new to here and just started using WOWZA Media Server. My aim is to stream a live stream from Adobe Live Encoder to Wowza Media Server and display on the iPad with the lowest latency possible. My settings are as follow: Adobe Live Encoder 3.1 / 3.2 (tried both) Video Format: H.264 Profile: Baseline Keyframe Frequency: 1 second WOWZA media server 3.5.2 cupertinoChunkDurationTarget: 1000ms cupertinoMaxChunkCount: 10 cupertinoPlaylistChunkCount: 2 cupertinoRepeaterChunkCount: 1 I…

Let me know if you have any other ideas. Thanks!

Jordan

---

<div class="post-metadata">

**Author:** ![Jordan\_Rumph](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@Jordan\_Rumph](https://community.wowza.com/u/Jordan_Rumph)\
**Post date:** [October 9, 2013, 11:10am UTC](https://community.wowza.com/t/hls-stream-jumps-ahead/40989/5 "2013-10-09T11:10:20Z")

</div>

Hi Richard,

We have done some more testing. We got the stream to play stable by adjusting the encoder settings and reducing the number of .stream files in the ‘live’ application. If I push about 10 streams to the live application on the Origin server, I have no issues. When I try to push 15 or more, I will start getting the skipping. Right now, we have 36 streams that we need to push from the encoders to Wowza. Is it recommended to use one application per stream?

I have lots of other questions about the topology of our setup, as it will be quite large and I would like to clarify the best way to do things. For now though, I need to make it stable in a very simple environment. Here are the new encoder settings and the ‘live’ application settings. Thanks in advance Richard!

MakitoX2 encoder

* * *

Video Out: 720p

FPS: 30

GOP: 60

UDP Port: 10000-10500

Bitrate: 3000

Wowza

* * *

content/live/10010.stream:

udp://0.0.0.0:10010

conf/live/Application.xml:

live

${com.wowza.wms.context.VHostConfigHom e}/content/live

cupertinostreamingpacketize r

cupertinostreaming

---

<div class="post-metadata">

**Author:** ![Jordan\_Rumph](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@Jordan\_Rumph](https://community.wowza.com/u/Jordan_Rumph)\
**Post date:** [October 16, 2013, 10:13am UTC](https://community.wowza.com/t/hls-stream-jumps-ahead/40989/6 "2013-10-16T10:13:02Z")

</div>

I think I solved the issue.

I used JMXRemoteConfiguration to see what was happening on the server with live statistics. I noticed under ‘Memory’ that the memory pool would hit 100% every so often. When it would, I would get the freeze/skip in our playback. I did two things in [install-dir]bin/setenv.sh to fix it.

1. 

```auto
JAVA_OPTS="-server -Xmx8000M"

```

to

```auto
JAVA_OPTS="-server -Xmx10000M"

```

1. 

```auto
JAVA_OPTS="$JAVA_OPTS -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:NewSize=512m"

```

After I made the adjustment, I moved everything that I had tweaked back to defaults and I still have no problems. Here is my configuration in case it would help someone;

Server

* * *

CPU: Dual Intel Xeon E5-2650 2Ghz (32 threads for Wowza tuning)

Memory: 32GB

NIC: (x4) 1Gb bonded with bond mode 5

Wowza

* * *

conf/live/Application.xml:

```auto
<StreamType>live</StreamType>
<StorageDir>${com.wowza.wms.context.VHostConfigHome}/content/live</StorageDir>
<LiveStreamPacketizers>cupertinostreamingpacketizer</LiveStreamPacketizers>
<HTTPStreamers>cupertinostreaming</HTTPStreamers>

```

bin/setenv.sh

```auto
_EXECJAVA=java
JAVA_OPTS="-server -Xmx10000M"
# Better garbage collection setting to avoid long pauses
JAVA_OPTS="$JAVA_OPTS -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:NewSize=512m"

```

(x18) MakitoX2 encoders

* * *

(x36 streams)

Video Out: 720p

FPS: 60

GOP: 120

Bitrate: 3000
