Wowza Community

Error "Too many chunk in the output" in log

Hello,

I’m trying to restream from an HLS live source. However, I’m getting the following error message in the logs:

“CupertinoMediaCasterConnection.outputStream: Streamname: sample.stream Too many chunk in the output, quitting.”

What is the meaning of this error? Is it a latency/bandwidth issue? Some other problem with the original stream?

Edit: A few more details below.

  • Wowza Streaming Engine Trial Edition 4.7.0 build20186

  • Running on Ubuntu 16.04

  • Incoming Stream is stuck on status “Waiting on Stream”

  • Logs contain several messages related to “CupertinoMediaCasterConnection.autoAdjustSegmentBuffering” before the error

  • After the error happens there’s a resetConnection event and the stream is restarted

  • Log segment here: https://pastebin.com/raw/6FtXUxD9

The error “Too many chunk in the output, quitting.” indicates that there are too many HLS chunks in the playlist. Please modify your .stream file as follows:

cupertinoAutoSegmentBuffer: false,

cupertinoManifestBufferBlockCount: 4,

cupertinoManifestMaxBufferBlockCount: 35

You should check that the chunks that are being pulled into your server are all the same size and duration. I have seen incoming HLS streams have their keyframes perfectly aligned but the incoming segment sizes and durations change randomly. This will have a severe impact on the stability and reliability of your live feed and can cause high CPU usage because the server cannot process the blocks fast enough.

You can search your access logs for “a/v/k” to monitor for keyframe or GOP distance as well as chunk size.

A == Audio frames

V == Video frames

K == Key frame distance

Please make sure that they keyframe distance of your source is a multiple of your chunk duration. If you have a two second keyframe then a chunk duration of 2, 4, 6, 8, or 10 would be ideal. The default time is ten seconds. When keyframes are not created evenly then chunks are not created the same size. If this happens then clients will experience buffering and pausing issues because the chunk sizes will be unpredictable. This behavior can also affect Wowza Streaming Engine if the incoming HLS stream has the same issue.

Segments are created on keyframes closest to the cupertinoChunkDurationTarget. If the keyframe is created too far from the specified segment duration then Wowza Streaming Engine will wait until a the next keyframe before making the determination again. For example if I have a two second keyframe distance but have a three second chunk size I will end up with six second chunks.

If this issue persists then please open a ticket with support.