# Issues with keyframe interval insertion

**URL:** <https://community.wowza.com/t/issues-with-keyframe-interval-insertion/97216>\
**Category:** Wowza Streaming Engine\
**Tags:** transcoder\
**Created:** [April 24, 2024, 11:56am UTC](https://community.wowza.com/t/issues-with-keyframe-interval-insertion/97216 "2024-04-24T11:56:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Simon\_Koester](https://avatars.discourse-cdn.com/v4/letter/s/e36b37/32.png) [@Simon\_Koester](https://community.wowza.com/u/Simon_Koester)\
**Post date:** [April 24, 2024, 11:56am UTC](https://community.wowza.com/t/issues-with-keyframe-interval-insertion/97216/1 "2024-04-24T11:56:18Z")

</div>

Hello Wowza Community

We’ve recently noticed a somewhat strange behaviour with our Streaming Engine.  
When we transcode a video stream (50fps) into 4 quality levels, we also adjust the keyframe interval to be 50 frames.  
But the LiveStreamPacketizerCupertino.endChunkTS still reports that the chunk duration is out of bounds.

`LiveStreamPacketizerCupertino.endChunkTS[ingest/_definst_/outstream_480]: Duration is out of bounds: duration:6040 targetDuration:2000 bounds:[0,6000], setting to calculated duration:6040, marking as discontinuity`

With a stream monitoring tool, we discovered that the messured duration, always equals the incommings streams keyframe interval  
Which would mean that the keyframe insertion that should be happening in the transcode process, just isn’t

Is anyone else experiencing a similar issue?  
Or did we forget to set something specific up in the Streaming Engine to make the keyframe interval insertion work?

With regards,

Simon

---

<div class="post-metadata">

**Author:** ![Scott\_Kellicker2](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/scott_kellicker2/32/1337_2.png) [@Scott\_Kellicker2](https://community.wowza.com/u/Scott_Kellicker2)\
**Post date:** [April 24, 2024, 3:23pm UTC](https://community.wowza.com/t/issues-with-keyframe-interval-insertion/97216/2 "2024-04-24T15:23:23Z")

</div>

Hi Simon,

I have not changed the kf interval for awhile, so don’t have much recent info. However I would be surprised if its broken.

I assume you set the KeyFrameInterval in your transcoder template, and FollowSource to false.

The other thing I would check is that the correct transcoder template is specified in your Application.xml. The default goes to “${SourceStreamName}.xml,transrate.xml”

ScottK  
Streaming Video Consultant  
scott@blankcanvas.video

```
<>
					<FollowSource>false</FollowSource>
					<Interval>60</Interval>
				</KeyFrameInterval>
```

---

<div class="post-metadata">

**Author:** ![Simon\_Koester](https://avatars.discourse-cdn.com/v4/letter/s/e36b37/32.png) [@Simon\_Koester](https://community.wowza.com/u/Simon_Koester)\
**Post date:** [April 29, 2024, 11:03am UTC](https://community.wowza.com/t/issues-with-keyframe-interval-insertion/97216/3 "2024-04-29T11:03:18Z")

</div>

All of our Transcoding Templates have the following option enabled

```
<KeyFrameInterval>
    <FollowSource>false</FollowSource>
    <Interval>50</Interval>
</KeyFrameInterval>

```

But we are still getting the Errors

```
LiveStreamPacketizerCupertino.endChunkTS[ingest/_definst_/outstream_low]: Duration is out of bounds: duration:6040 targetDuration:2000 bounds:[0,6000], setting to calculated duration:6040, marking as discontinuity

LiveStreamPacketizerCupertino.endChunkTS[ingest/_definst_/outstream_720]: Duration is out of bounds: duration:6160 targetDuration:2000 bounds:[0,6000], setting to calculated duration:6040, marking as discontinuity

LiveStreamPacketizerCupertino.endChunkTS[ingest/_definst_/outstream_480]: Duration is out of bounds: duration:6160 targetDuration:2000 bounds:[0,6000], setting to calculated duration:6040, marking as discontinuity

LiveStreamPacketizerCupertino.endChunkTS[ingest/_definst_/outstream_360]: Duration is out of bounds: duration:6160 targetDuration:2000 bounds:[0,6000], setting to calculated duration:6040, marking as discontinuity

LiveStreamPacketizerCupertino.endChunkTS[ingest/_definst_/outstream_1080]: Duration is out of bounds: duration:6160 targetDuration:2000 bounds:[0,6000], setting to calculated duration:6040, marking as discontinuity

```

We typically stream at 50fps or 25fps and we observe these issues from time to time  
What mainly confuses me, is that the measured duration is so far out of bounds and no where near our target keyframe interval.  
If we were streaming at 25fps and the measured duration would be 2100ms then I would understand that our timings might be a bit tight  
But the duration is far beyond anything we are inserting in terms of Keyframe intervals  
Which is why we suspect that the keyframes might not get inserted properly

---

<div class="post-metadata">

**Author:** ![Scott\_Kellicker2](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/scott_kellicker2/32/1337_2.png) [@Scott\_Kellicker2](https://community.wowza.com/u/Scott_Kellicker2)\
**Post date:** [April 29, 2024, 2:34pm UTC](https://community.wowza.com/t/issues-with-keyframe-interval-insertion/97216/4 "2024-04-29T14:34:34Z")

</div>

What does your application.xml have set for the transcoder template? And is this the one you are expecting?

---

<div class="post-metadata">

**Author:** ![Simon\_Koester](https://avatars.discourse-cdn.com/v4/letter/s/e36b37/32.png) [@Simon\_Koester](https://community.wowza.com/u/Simon_Koester)\
**Post date:** [May 3, 2024, 8:54am UTC](https://community.wowza.com/t/issues-with-keyframe-interval-insertion/97216/5 "2024-05-03T08:54:09Z")

</div>

The application.xml is pointing to our custom transcoder preset that we made, which is giving us a correct output except for the keyframe interval.

---

<div class="post-metadata">

**Author:** ![Scott\_Kellicker2](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/scott_kellicker2/32/1337_2.png) [@Scott\_Kellicker2](https://community.wowza.com/u/Scott_Kellicker2)\
**Post date:** [May 3, 2024, 6:14pm UTC](https://community.wowza.com/t/issues-with-keyframe-interval-insertion/97216/6 "2024-05-03T18:14:07Z")

</div>

Simon,

Out of ideas here, ☹  
Form the outside looks like a transcoder bug (which is where you started)

ScottK

---

<div class="post-metadata">

**Author:** ![baccola](https://avatars.discourse-cdn.com/v4/letter/b/b487fb/32.png) [@baccola](https://community.wowza.com/u/baccola)\
**Post date:** [February 21, 2025, 9:52pm UTC](https://community.wowza.com/t/issues-with-keyframe-interval-insertion/97216/7 "2025-02-21T21:52:54Z")

</div>

We are having a similar issue. The Wowza profile is set up with a target chunk length of 6 seconds but that isn’t being respected and the chunks are being created at each keyframe. Was this issue ever figured out?
