# mp4 vod lip sync issue on iOS after 2 hours of playing.

**URL:** <https://community.wowza.com/t/mp4-vod-lip-sync-issue-on-ios-after-2-hours-of-playing/41551>\
**Category:** Wowza Streaming Engine\
**Created:** [October 20, 2014, 11:39pm UTC](https://community.wowza.com/t/mp4-vod-lip-sync-issue-on-ios-after-2-hours-of-playing/41551 "2014-10-20T23:39:45Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![richard\_chen](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@richard\_chen](https://community.wowza.com/u/richard_chen)\
**Post date:** [October 20, 2014, 11:39pm UTC](https://community.wowza.com/t/mp4-vod-lip-sync-issue-on-ios-after-2-hours-of-playing/41551/1 "2014-10-20T23:39:45Z")

</div>

Hi experts,

I encounter an issue with Wowza when doing mp4 vod. I have a 4 hours mp4 movies, I put it on Wowza and play it with iPad(do vod), at the beginning, everything is ok, but 2 hours later, I encounter the lip sync issue on iPad, audio is lagged behand 2~3seconds, the longer it plays, the more serious the issue. Then I play the mp4 with VLC on Windows, everything is OK no matter how long it play. My Wowza is 4.1, can you pls help to address this?

Thank you,

Richard

---

<div class="post-metadata">

**Author:** ![sal\_jefferson](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sal\_jefferson](https://community.wowza.com/u/sal_jefferson)\
**Post date:** [October 21, 2014, 8:04am UTC](https://community.wowza.com/t/mp4-vod-lip-sync-issue-on-ios-after-2-hours-of-playing/41551/2 "2014-10-21T08:04:22Z")

</div>

Hello there,

Can you please provide more detail about the source:

What are the audio and video codecs?

What is the bitrate and profile?

Frames per second and GOP(keyframe frequency)?

For iOS it is recommended that you use a profile of baseline 3, or main at the highest, as well as AAC audio. H264 video is required.

Try different FPS and keyframe frequency settings. Key frame frequency should be a multiple of 10, the default for chunkDurationTarget, or a multiple of whatever you have set that to if you changed it.

This article describes the properties that you can use to control how the Cupertino (iOS device) segmenter segments an incoming stream:

[How to configure Apple HTTP Live Streaming packetization (cupertinostreaming)](https://www.wowza.com/docs/how-to-configure-apple-hls-packetization-cupertinostreaming%28cupertinostreaming%29)

You can also debug AAC or MP3 timecode issues with cupertino packetization with this guide:

[How to debug AAC or MP3 timecode issues with cupertino packetization](https://www.wowza.com/docs/how-to-debug-aac-or-mp3-timecode-issues-with-apple-hls-packetization)

And if necessary, you can encode the file following this guide:

[How to encode video on demand content](https://www.wowza.com/docs/how-to-encode-video-on-demand-content)

Kind regards,

Salvadore

---

<div class="post-metadata">

**Author:** ![sal\_jefferson](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sal\_jefferson](https://community.wowza.com/u/sal_jefferson)\
**Post date:** [October 22, 2014, 7:28am UTC](https://community.wowza.com/t/mp4-vod-lip-sync-issue-on-ios-after-2-hours-of-playing/41551/3 "2014-10-22T07:28:30Z")

</div>

Hello Richard,

Chunks must start on a key frame, so it’s best to use a key frame interval that is factor of the cupertinoChunkDurationTarget setting. For example, if cupertinoChunkDurationTarget is set to 10 seconds then use a key frame interval of either 2, 2.5, 5, or 10 seconds.

By default, cupertinoChunkDurationTarget is set to 10 seconds.

Kind regards,

Salvadore

---

<div class="post-metadata">

**Author:** ![sal\_jefferson](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sal\_jefferson](https://community.wowza.com/u/sal_jefferson)\
**Post date:** [October 24, 2014, 9:24am UTC](https://community.wowza.com/t/mp4-vod-lip-sync-issue-on-ios-after-2-hours-of-playing/41551/4 "2014-10-24T09:24:34Z")

</div>

Hello Richard,

Where are you adding this property in the Application.xml file?

For VOD it would be in the **HTTPStreamer/Properties** container:

```auto
<Property>
	<Name>cupertinoChunkDurationTarget</Name>
	<Value>12000</Value>
	<Type>Integer</Type>
</Property>

```

Kind regards,

Salvadore

---

<div class="post-metadata">

**Author:** ![sal\_jefferson](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sal\_jefferson](https://community.wowza.com/u/sal_jefferson)\
**Post date:** [October 27, 2014, 6:29am UTC](https://community.wowza.com/t/mp4-vod-lip-sync-issue-on-ios-after-2-hours-of-playing/41551/5 "2014-10-27T06:29:45Z")

</div>

Hello Richard,

There are two places in the Application.xml file that the **cupertinoChunkDurationTarget** property can go.

For live streams it would be in the **LiveStreamPacketizer/Properties** container.

For VOD it would be in the **HTTPStreamer/Properties** container:

```auto
<Property>
	<Name>cupertinoChunkDurationTarget</Name>
	<Value>12000</Value>
	<Type>Integer</Type>
</Property>

```

Make sure you have this property set in the **HTTPStreamer/Properties** container since you are doing VOD.

Kind regards,

Salvadore

---

<div class="post-metadata">

**Author:** ![richard\_chen](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@richard\_chen](https://community.wowza.com/u/richard_chen)\
**Post date:** [October 21, 2014, 10:41pm UTC](https://community.wowza.com/t/mp4-vod-lip-sync-issue-on-ios-after-2-hours-of-playing/41551/6 "2014-10-21T22:41:51Z")

</div>

Hi Salvadore,

Thank you for your useful information, I would like to provide more information about our mp4 file:

1. video codec: h264 base profile, level=31(720p); audio codec AAC-LC, 48khz

2. the file media bitrate is 2mbps.

3. key frame frequency is 4 seconds(We set the key frequency to 4s to reduce the live delay, it seems works normally except lip sync issue, is it 4s ok?)(Key frame frequency should be a multiple of 10? is it a must?)

4. we didn’t change any Wowza setting, should we change Wowza setting to match our mp4?

We still stick on this issue, thank you very much for your help.

Best regards,

Richard.

---

<div class="post-metadata">

**Author:** ![richard\_chen](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@richard\_chen](https://community.wowza.com/u/richard_chen)\
**Post date:** [October 23, 2014, 5:55pm UTC](https://community.wowza.com/t/mp4-vod-lip-sync-issue-on-ios-after-2-hours-of-playing/41551/7 "2014-10-23T17:55:36Z")

</div>

Hi Salvadore,

Since my mp4 key frame interval is 4 seconds(Comes from Polycom encoder), so I set cupertinoChunkDurationTarget to 4 and then 12 seconds, both of them seem don’t solve the issue. Only on iOS we encounter such issue, is it possible that the issue came from encoder? what possible issue it will be? we analyse the file and everything seems ok, play it with vlc and wmp, they are ok too.

Best regards,

Richard

---

<div class="post-metadata">

**Author:** ![richard\_chen](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@richard\_chen](https://community.wowza.com/u/richard_chen)\
**Post date:** [October 26, 2014, 11:08pm UTC](https://community.wowza.com/t/mp4-vod-lip-sync-issue-on-ios-after-2-hours-of-playing/41551/8 "2014-10-26T23:08:11Z")

</div>

Hi Salvadore,

I did it in Application.xml, however, it doesn’t solve the issue. I’m thinking if the issue comes from the mp4 file itself? but vlc plays it good, does iOS player has special requirement?

Best regards,

Richard
