# Custom Chunk Ids, or what is calculateChunkIDBasedOnTimecode?

**URL:** <https://community.wowza.com/t/custom-chunk-ids-or-what-is-calculatechunkidbasedontimecode/39536>\
**Category:** Wowza Streaming Engine\
**Created:** [November 8, 2013, 4:44pm UTC](https://community.wowza.com/t/custom-chunk-ids-or-what-is-calculatechunkidbasedontimecode/39536 "2013-11-08T16:44:07Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_Williams1](https://avatars.discourse-cdn.com/v4/letter/c/a4c791/32.png) [@Chris\_Williams1](https://community.wowza.com/u/Chris_Williams1)\
**Post date:** [November 8, 2013, 4:44pm UTC](https://community.wowza.com/t/custom-chunk-ids-or-what-is-calculatechunkidbasedontimecode/39536/1 "2013-11-08T16:44:07Z")

</div>

Hi,

I’ve been trying to set up a CloudFront distribution with two wowza servers behind and elastic load balancer ( two servers for security, a primary and backup stream location). All is well, the only problem is not being able to get the Chunk ID’s to match over both servers.

I’ve had a look through the forums and found two LiveStreamPacketizer parameters:

calculateChunkIDBasedOnTimecode

cupertinoCalculateChunkIDBasedOnTimecode

… that from their name would give me what I want, but I can find no documentation for them. My chunks for live stream are not being changed when enabling these parameters. Can you point me in the direction of the documentation for these two, or if there’s anything particular about the timecode/other settings that I need use.

The alternative (and to be honest, more attractive idea) is that the chunk id’s are based on the wowza system time - then as long as I can keep the time in sync I can send source to any server and know that the chunk id’s will be the same.

Thanks in advance!

Chris -.

---

<div class="post-metadata">

**Author:** ![Chris\_Williams1](https://avatars.discourse-cdn.com/v4/letter/c/a4c791/32.png) [@Chris\_Williams1](https://community.wowza.com/u/Chris_Williams1)\
**Post date:** [November 10, 2013, 5:13pm UTC](https://community.wowza.com/t/custom-chunk-ids-or-what-is-calculatechunkidbasedontimecode/39536/2 "2013-11-10T17:13:57Z")

</div>

Hi,

Any chance on a response for this please?

Thanks!

Chris -.

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [November 10, 2013, 6:59pm UTC](https://community.wowza.com/t/custom-chunk-ids-or-what-is-calculatechunkidbasedontimecode/39536/3 "2013-11-10T18:59:41Z")

</div>

Chris,

We’ll have to take a closer look. Open a ticket by writing to support@wowza.com. Run a fresh test to generate logs that show the issue, then Zip up the current access log and the /conf folder and include that.

Include a link to this thread for reference.

Richard

---

<div class="post-metadata">

**Author:** ![Norberts\_Ositis](https://avatars.discourse-cdn.com/v4/letter/n/76d3ee/32.png) [@Norberts\_Ositis](https://community.wowza.com/u/Norberts_Ositis)\
**Post date:** [August 13, 2015, 6:05pm UTC](https://community.wowza.com/t/custom-chunk-ids-or-what-is-calculatechunkidbasedontimecode/39536/4 "2015-08-13T18:05:27Z")

</div>

Hi!

Has the status regarding these two properties \*CalculateChunkIDBasedOnTimecode changed somehow?

Brgds,

Norbert

---

<div class="post-metadata">

**Author:** ![Maxim\_Kozlov](https://avatars.discourse-cdn.com/v4/letter/m/a4c791/32.png) [@Maxim\_Kozlov](https://community.wowza.com/u/Maxim_Kozlov)\
**Post date:** [March 23, 2016, 11:59am UTC](https://community.wowza.com/t/custom-chunk-ids-or-what-is-calculatechunkidbasedontimecode/39536/5 "2016-03-23T11:59:08Z")

</div>

Bump up.

Any news?

---

<div class="post-metadata">

**Author:** ![Chris\_Williams1](https://avatars.discourse-cdn.com/v4/letter/c/a4c791/32.png) [@Chris\_Williams1](https://community.wowza.com/u/Chris_Williams1)\
**Post date:** [November 10, 2013, 8:55pm UTC](https://community.wowza.com/t/custom-chunk-ids-or-what-is-calculatechunkidbasedontimecode/39536/6 "2013-11-10T20:55:59Z")

</div>

Hi,

I’ll email that in the morning, in the mean time can I get documentation for calculateChunkIDBasedOnTimecode and cupertinoCalculateChunkIDBasedOnTimecode please?

Thanks,

---

<div class="post-metadata">

**Author:** ![Chris\_Williams1](https://avatars.discourse-cdn.com/v4/letter/c/a4c791/32.png) [@Chris\_Williams1](https://community.wowza.com/u/Chris_Williams1)\
**Post date:** [November 11, 2013, 10:09am UTC](https://community.wowza.com/t/custom-chunk-ids-or-what-is-calculatechunkidbasedontimecode/39536/7 "2013-11-11T10:09:21Z")

</div>

Hi Roger,

Email sent with the attached files. I can see now what you mean regarding the chunkId continuing if the encoder is interrupted (rather than the expected generating the chunkId from ether the embedded timecode or the system time)

Wit the cookie system, will this weight the ELB to one of the servers rather than the other?

Thanks,

Chris -.

---

<div class="post-metadata">

**Author:** ![Roger\_Littin1](https://avatars.discourse-cdn.com/v4/letter/r/c89c15/32.png) [@Roger\_Littin1](https://community.wowza.com/u/Roger_Littin1)\
**Post date:** [November 11, 2013, 9:27am UTC](https://community.wowza.com/t/custom-chunk-ids-or-what-is-calculatechunkidbasedontimecode/39536/8 "2013-11-11T09:27:33Z")

</div>

Hi Chris,

There is no official documentation for these two properties at the moment however, it will not work as you are expecting.

Normally, the chunk ids are reset to 0 when a stream is re-published or the packetizers reset for some reason. When these properties are enabled, Wowza tries to calculate what the next chunk id would be based on the time that has elapsed from when the previous chunk was created. It will not sync chunks between servers which I think you are looking for. At the current time, there is not a way to synchronise chunks between servers however if the encoder starts broadcasting to both the primary and backup servers at the same time, then both servers should produce identical chunks. Having one of these properties enabled could possibly help but it would not be guaranteed.

The issue you are seeing is because of the way that CloudFront and ELB handle cookies. Wowza needs to send a server id cookie and the ELB and CloudFront need to be enabled to use this cookie. Wowza does not currently send out server cookies so a custom module is required and the steps to configure it can be explained in the ticket when you open it.

Regards,

Roger.

---

<div class="post-metadata">

**Author:** ![Andy\_Engberson](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/andy_engberson/32/392_2.png) [@Andy\_Engberson](https://community.wowza.com/u/Andy_Engberson)\
**Post date:** [March 25, 2016, 10:13am UTC](https://community.wowza.com/t/custom-chunk-ids-or-what-is-calculatechunkidbasedontimecode/39536/9 "2016-03-25T10:13:29Z")

</div>

Hello,

I can see that for this case a ticket was created where a problem with calculateChunkIDBasedOnTimecode was discovered. A fix was included in the 4.0.4 release.

[https://www.wowza.com/docs/wowza-streaming-engine-4-0-4-release-notes](https://www.wowza.com/docs/wowza-streaming-engine-4-0-4-release-notes)

“Fixed problem with live cupertino streaming calculateChunkIDBasedOnTimecode…”

In that ticket it was also recommended use the following guide to help with setup.

_For more info on this and other related settings, please refer to the following article._

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

Do let me know if you have more questions regarding this.

Andy
