Wowza Community

HLS VOD Playback delay / buffer length

I’m new to all of this. I’ve encoded several videos using ffmpeg. I’m using a -framerate of 29.97 and a -g value of 60 which should give me a keyframe internal of 2. I’ve set up HLS in Wowza Engine Manager via SMIL files. I’ve verified that playback works great, and the various qualities are shown (1080, 720, 480, etc) and adaptive bitrate switching occurs when I use bandwidth throttling to test this. I see the .ts files coming in when I check the network console in Chrome. All good.

My only issue is that it takes about ~10 seconds for playback to begin. Is this normal, or am I doing something incorrectly? As a comparison, when loading a YouTube HD, playback starts almost immediately (I’ve also tested MPEG-DASH in Wowza and the same delay time exists with it, too). My connection is 24mbps.

Thanks for any insight!

-Brian

No hints on this? I find it hard to believe I’m the only one who has seen this. :slight_smile:

Hello Brian,

If you are using the HLS links to tune in, the default packetization has a playlist of 3 chunks @ 10 seconds each. I am providing you an article on making changes to the HLS packetization to achieve lower latency. Please keep in mind that chunks must start on a keyframe, so it’s best to use a keyframe interval that’s a factor of the cupertinoChunkDurationTarget setting.

For example, if cupertinoChunkDurationTarget is set to 10 seconds, use a keyframe interval of either 2, 2.5, 5, or 10 seconds.

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

In your case, start with 4 second chunks and see how this affects your latency. You will definitely see at least 12 seconds. If you choose to go to 2 second chunks with a 2 second keyframe, see how the player responds. If the chunks are not available quick enough for the player, you will see buffering.

Regards,

Jason Hatchett

Hello Brian,

For now I will focus on replying within our Support ticket.

Regards,

Jason Hatchett

The problem with RTMP is that because it doesn’t pre-buffer segments, slower connections tend to buffer more. HLS pre-buffers a number of segments before playback so that less buffering occurs during the rest of the video. How does jwplayer achieve this ~3 second start with HLS?

https://developer.jwplayer.com/jw-player/demos/toolbox/hls-aes-token/