# pHow can I split the chunk programmatically?

**URL:** <https://community.wowza.com/t/phow-can-i-split-the-chunk-programmatically/50341>\
**Category:** Wowza Streaming Engine\
**Created:** [December 9, 2017, 6:40am UTC](https://community.wowza.com/t/phow-can-i-split-the-chunk-programmatically/50341 "2017-12-09T06:40:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tuongtndg\_Ha](https://avatars.discourse-cdn.com/v4/letter/t/5f9b8f/32.png) [@tuongtndg\_Ha](https://community.wowza.com/u/tuongtndg_Ha)\
**Post date:** [December 9, 2017, 6:40am UTC](https://community.wowza.com/t/phow-can-i-split-the-chunk-programmatically/50341/1 "2017-12-09T06:40:18Z")

</div>

I tried to insert keyframes via server-side API.

[https://www.wowza.com/docs/how-to-insert-key-frames-into-a-transcoded-stream-using-server-side-api](https://www.wowza.com/docs/how-to-insert-key-frames-into-a-transcoded-stream-using-server-side-api)

Inserting the keyframe was succeeded, however the HLS segments was not split by keyframes.

How can I split the chunk programmatically? or any solutions?

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/system/32/447_2.png) [@system](https://community.wowza.com/u/system)\
**Post date:** [December 9, 2017, 6:02pm UTC](https://community.wowza.com/t/phow-can-i-split-the-chunk-programmatically/50341/2 "2017-12-09T18:02:44Z")

</div>

Make sure that your cupertinoChunkDurationTarget value matches the value of the keyframe distance you are using with Transcoder.

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