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

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

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)

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

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

How to encode video on demand content

Kind regards,

Salvadore

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

Hello Richard,

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

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

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

Kind regards,

Salvadore

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:

<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

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.

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

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