# Choppy HLS Video

**URL:** <https://community.wowza.com/t/choppy-hls-video/34335>\
**Category:** Wowza Streaming Engine\
**Created:** [October 27, 2011, 1:16am UTC](https://community.wowza.com/t/choppy-hls-video/34335 "2011-10-27T01:16:13Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Blair\_L](https://avatars.discourse-cdn.com/v4/letter/b/0ea827/32.png) [@Blair\_L](https://community.wowza.com/u/Blair_L)\
**Post date:** [October 27, 2011, 1:16am UTC](https://community.wowza.com/t/choppy-hls-video/34335/1 "2011-10-27T01:16:13Z")

</div>

This one’s been quite elusive, and I hope its common enough I just missed something. I’ve got choppy VOD (not choppy as in poor performance, but choppy like something is wrong) from HLS using iPhone 4, iPad1, and Safari 4 on 10.7. Its like a constant stuttering but only with specifically compressed files. Files also play fine through Quicktime directly and through RTMP/Flash, but through Wowza and HLS stutters.

It sounds related to this:

> [@iOS Stutter from RTP Live Stream](http://community.wowza.com/t/-/37289):
>
> Hello, I am using a LEADTools encoder to encode a Live stream and send the output via UDP to a WOWZA server. The stream looks great wen played back on the RTSP protocol however it the video stutters when played back on the iOS http. This is on both an iPod and an iPad. I have tried this with the network running normally and also with the iOS device as the only thing on the internal network. The stream itself is a 40k AAC audio stream which is nice and smooth through the majority of the playback…

I also verified this (on v2 and v3 of Wowza)

> **[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.

90 key frames @30fps = 3000ms for the cupertinoChunkDurationTarget.

I’ve got the issue down to one difference being Main level 3.0 being OK and level 3.1+ has the issue (creating out of Compressor or Squeeze). Even when the above chunking is different I don’t have the problem on level 3.0 and down.

I’ll stop there hoping there’s a quick fix for this. iPhone 4S handles High now, so jumping at that would be cool to play with. What did I miss?

---

<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:** [October 27, 2011, 9:28am UTC](https://community.wowza.com/t/choppy-hls-video/34335/2 "2011-10-27T09:28:28Z")

</div>

Try chunkDurationTarget of 6000, then try 9000. Multiples of 3000.

Also, try encoding with Baseline profile, level 3 instead of Main 3.

Richard

---

<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:** [October 27, 2011, 9:36pm UTC](https://community.wowza.com/t/choppy-hls-video/34335/3 "2011-10-27T21:36:01Z")

</div>

There is a guide here:

[https://www.wowza.com/docs/how-to-configure-apple-hls-packetization-cupertinostreaming](https://www.wowza.com/docs/how-to-configure-apple-hls-packetization-cupertinostreaming)

Richard

---

<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:** [October 31, 2011, 3:47pm UTC](https://community.wowza.com/t/choppy-hls-video/34335/4 "2011-10-31T15:47:04Z")

</div>

There is vod note:

**Note:** You can control the video on demand chunk size by adding the following property to the HTTPStreamer/Properties container:

```auto
<Property>
	<Name>cupertinoChunkDurationTarget</Name>
	<Value>10000</Value>
	<Type>Integer</Type>
</Property>

```

Richard

---

<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:** [October 31, 2011, 6:53pm UTC](https://community.wowza.com/t/choppy-hls-video/34335/5 "2011-10-31T18:53:25Z")

</div>

It might be encoding problem. Do you see anything in Flash playback? In Cupertino you should see smooth video for at least as long as the chunk size, then possibly buffering if bandwidth is the issue.

Do you have a m3u8 URL we can try? Post here or send to support@wowza.com with a link to this thread for reference

Richard

---

<div class="post-metadata">

**Author:** ![Jake\_Hilton](https://avatars.discourse-cdn.com/v4/letter/j/9f8e36/32.png) [@Jake\_Hilton](https://community.wowza.com/u/Jake_Hilton)\
**Post date:** [January 21, 2014, 11:09am UTC](https://community.wowza.com/t/choppy-hls-video/34335/6 "2014-01-21T11:09:17Z")

</div>

Trying to use HLS for on-demand streaming and users are complaining a ton about coppiness… using adaptive bitrate streaming. Hoping to find a setting that would help this. Using jwplayer to play the stream.

A typical user complaint is as follows:

"The videos are skipping a lot. The video just jumps to a random spot.

This is happening very often. It is becoming hard to watch the videos. I have a really good internet

connection because I can watch videos from other sites without a problem."

I would be suspect that it’s the users connection but it’s happening quite a lot across the board. Could it be an encoding issue of the videos? I’ve checked all aspects of the streaming path and I’m hoping a config change will help users with this type of issue.

Thanks,

Jake

---

<div class="post-metadata">

**Author:** ![Jake\_Hilton](https://avatars.discourse-cdn.com/v4/letter/j/9f8e36/32.png) [@Jake\_Hilton](https://community.wowza.com/u/Jake_Hilton)\
**Post date:** [January 21, 2014, 1:51pm UTC](https://community.wowza.com/t/choppy-hls-video/34335/7 "2014-01-21T13:51:43Z")

</div>

Using ffmpeg to create my different levels. Here is an example of the commands. Of course only the scale changes for each size:

ffmpeg -i myvid.mp4 -vf “scale=320:trunc(ow/a/2)\*2” -ar 44100 320/output.mp4

ffmpeg -i myvid.mp4 -vf “scale=720:trunc(ow/a/2)\*2” -ar 44100 720/output.mp4

So I’m not adjusting any keyframe intervals… but maybe I should? I’m using the same src for each output.

---

<div class="post-metadata">

**Author:** ![Jake\_Hilton](https://avatars.discourse-cdn.com/v4/letter/j/9f8e36/32.png) [@Jake\_Hilton](https://community.wowza.com/u/Jake_Hilton)\
**Post date:** [January 21, 2014, 2:12pm UTC](https://community.wowza.com/t/choppy-hls-video/34335/8 "2014-01-21T14:12:49Z")

</div>

I did see that article and it specifically talked about live HLS(iOS) which is different from my case. I can surely try the settings mentioned there if they will also be applicable to on demand HLS.

It looks like the default GOP is set to 250 for h264 video with ffmpeg. ([https://sites.google.com/site/linuxencoding/x264-ffmpeg-mapping](https://sites.google.com/site/linuxencoding/x264-ffmpeg-mapping)) So for a 30 fps video we’d be looking at a keyframe every 8.3 seconds… which isn’t optimal to be sure. I’ll see about lowing that to see if I can get more bang for my buck. Sadly I’m not able to repro this issue… go figure!

Thank for your help with this!

---

<div class="post-metadata">

**Author:** ![Jake\_Hilton](https://avatars.discourse-cdn.com/v4/letter/j/9f8e36/32.png) [@Jake\_Hilton](https://community.wowza.com/u/Jake_Hilton)\
**Post date:** [January 21, 2014, 2:23pm UTC](https://community.wowza.com/t/choppy-hls-video/34335/9 "2014-01-21T14:23:12Z")

</div>

Fantastic information! Thanks guys. I’ll be digesting this and hopefully getting to the bottom of this soon.

---

<div class="post-metadata">

**Author:** ![Jake\_Hilton](https://avatars.discourse-cdn.com/v4/letter/j/9f8e36/32.png) [@Jake\_Hilton](https://community.wowza.com/u/Jake_Hilton)\
**Post date:** [January 29, 2014, 4:19pm UTC](https://community.wowza.com/t/choppy-hls-video/34335/10 "2014-01-29T16:19:05Z")

</div>

The information provided here helped me a lot for sure.

I was able to identify the problem with the pts stamps not lining up but also one of the streams had a different keyframe interval which would mess up things when switching streams. I ended up using a slightly modified ffmpeg command for conversions. I have noted it on the page for multibitrate encoding but for the sake of the thread I’ll include it here as well:

```auto
ffmpeg -i Butterfly_HD_1080p.mp4 -vf "scale=320:trunc(ow/a/2)*2" -ab 128k -ar 48000 -strict -2 -g 30 -keyint_min 30 Butterfly_HD_1080p_320.mp4

```

So switching to different sizes is easy by changing the scale value. It will automatically calculate the height based on the width passed in. Of course a -b could be added to set the bitrate.

Hope this helps someone!

---

<div class="post-metadata">

**Author:** ![Blair\_L](https://avatars.discourse-cdn.com/v4/letter/b/0ea827/32.png) [@Blair\_L](https://community.wowza.com/u/Blair_L)\
**Post date:** [October 27, 2011, 1:22pm UTC](https://community.wowza.com/t/choppy-hls-video/34335/11 "2011-10-27T13:22:55Z")

</div>

Just to be sure, these properties are being added in the XML to Root/LiveStreamPacketizer/Properties correct? Not Root/Streams/LiveStreamPacketizer/Properties?

---

<div class="post-metadata">

**Author:** ![Blair\_L](https://avatars.discourse-cdn.com/v4/letter/b/0ea827/32.png) [@Blair\_L](https://community.wowza.com/u/Blair_L)\
**Post date:** [October 27, 2011, 1:25pm UTC](https://community.wowza.com/t/choppy-hls-video/34335/12 "2011-10-27T13:25:33Z")

</div>

Oh, and there’s a naming difference in the article. In the post the names are “cupertinoXXX” but in the comments they omit “cupertino”. For version 3 which is it?

---

<div class="post-metadata">

**Author:** ![Blair\_L](https://avatars.discourse-cdn.com/v4/letter/b/0ea827/32.png) [@Blair\_L](https://community.wowza.com/u/Blair_L)\
**Post date:** [October 27, 2011, 3:45pm UTC](https://community.wowza.com/t/choppy-hls-video/34335/13 "2011-10-27T15:45:56Z")

</div>

Yes I know, I quoted it in the first thread. There’s a naming difference in that article though. In the post the names are “cupertinoXXX” but in the comments they omit “cupertino”. For version 3 which is it? And just to be sure because its unclear in the article, these properties are being added in the XML to Root/LiveStreamPacketizer/Properties correct? Not Root/Streams/LiveStreamPacketizer/Properties? Otherwise the packet changes are not changing the glitchy video.

---

<div class="post-metadata">

**Author:** ![Blair\_L](https://avatars.discourse-cdn.com/v4/letter/b/0ea827/32.png) [@Blair\_L](https://community.wowza.com/u/Blair_L)\
**Post date:** [October 31, 2011, 9:40am UTC](https://community.wowza.com/t/choppy-hls-video/34335/14 "2011-10-31T09:40:46Z")

</div>

Thanks! Yep, these properties have no effect on the VOD stream, and don’t change how the video stutters. Its doing it about 6-7 times a second, though audio plays smooth. I have to wonder if its something else?

---

<div class="post-metadata">

**Author:** ![Blair\_L](https://avatars.discourse-cdn.com/v4/letter/b/0ea827/32.png) [@Blair\_L](https://community.wowza.com/u/Blair_L)\
**Post date:** [October 31, 2011, 12:37pm UTC](https://community.wowza.com/t/choppy-hls-video/34335/15 "2011-10-31T12:37:00Z")

</div>

Ahhh! Alright, that seems to make the load time change. Still no go on the stutter. Tried several multiples. It seems like if it were a chunking problem, then every 3 seconds (since I’m in 90key @30fps), or a multiple of, there would be some sort of skip. Is that what it looks like if the chunking isn’t a multiple?

---

<div class="post-metadata">

**Author:** ![Blair\_L](https://avatars.discourse-cdn.com/v4/letter/b/0ea827/32.png) [@Blair\_L](https://community.wowza.com/u/Blair_L)\
**Post date:** [October 31, 2011, 1:54pm UTC](https://community.wowza.com/t/choppy-hls-video/34335/16 "2011-10-31T13:54:50Z")

</div>

Examples sent! Thanks.

---

<div class="post-metadata">

**Author:** ![Blair\_L](https://avatars.discourse-cdn.com/v4/letter/b/0ea827/32.png) [@Blair\_L](https://community.wowza.com/u/Blair_L)\
**Post date:** [November 30, 2011, 9:55am UTC](https://community.wowza.com/t/choppy-hls-video/34335/17 "2011-11-30T09:55:28Z")

</div>

Don’t check the ‘frame reorder’ checkbox in Compressor.

---

<div class="post-metadata">

**Author:** ![Blair\_L](https://avatars.discourse-cdn.com/v4/letter/b/0ea827/32.png) [@Blair\_L](https://community.wowza.com/u/Blair_L)\
**Post date:** [January 21, 2014, 2:26pm UTC](https://community.wowza.com/t/choppy-hls-video/34335/18 "2014-01-21T14:26:41Z")

</div>

Assuming you haven’t messed with the packet sizes in the app config… The “jumps to random spots” might suggest each quality level doesn’t have keyframe/full frame/iframe in the same spot since when a rate change only happens on a keyframe. Uncheck any auto or best kind of setting in the compression app and enter one in that’s a multiple of the video’s frame rate, the same on each vid. That’s my take… unless Richard’s got his usual ninja-awesome trick I don’t know about or knows some other weird HLS thing.

---

<div class="post-metadata">

**Author:** ![Blair\_L](https://avatars.discourse-cdn.com/v4/letter/b/0ea827/32.png) [@Blair\_L](https://community.wowza.com/u/Blair_L)\
**Post date:** [January 21, 2014, 3:07pm UTC](https://community.wowza.com/t/choppy-hls-video/34335/19 "2014-01-21T15:07:50Z")

</div>

I don’t know offhand what the default ffmpeg keyframe (GOP size, as if this didn’t have enough nicknames) would be if it wasn’t specified, and seems like Google isn’t super clear, so try setting it for sure. This is also helpful for setting up Wowza.

[https://www.wowza.com/docs/how-to-configure-apple-hls-packetization-cupertinostreaming](https://www.wowza.com/docs/how-to-configure-apple-hls-packetization-cupertinostreaming) specifically the target duration.

---

<div class="post-metadata">

**Author:** ![Kingsley\_Foreman](https://avatars.discourse-cdn.com/v4/letter/k/ccd318/32.png) [@Kingsley\_Foreman](https://community.wowza.com/u/Kingsley_Foreman)\
**Post date:** [November 30, 2011, 10:50pm UTC](https://community.wowza.com/t/choppy-hls-video/34335/20 "2011-11-30T22:50:54Z")

</div>

Have you worked this out, im having a similar issue

[Next page](https://community.wowza.com/t/choppy-hls-video/34335.md?page=2)
