Wowza Community

HLS stream jumps ahead

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;

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

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

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

Thanks in advance and any help will be greatly appreciated!

Jordan

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.

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

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;

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

Jordan

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

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.

JAVA_OPTS="-server -Xmx8000M"

to

JAVA_OPTS="-server -Xmx10000M"
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:

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

bin/setenv.sh

_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