Recorded MP4 audio out of sync

Hey guys,

I have a Flash application from which people can broadcast live. The stream is also recorded in MP4 using the LiveStreamRecord plugin. Since Flash does not support AAC/MP3 audio, the application broadcasts H264 video with SPEEX audio encoding. We are using Wowza transcoder to transcode the stream to H264/AAC and in multiple bit rates.

The problem is that audio is out of sync in MP4 recordings of all bitrates. Can someone tell me what we can do to fix this?

Thanks!

The LiveStreamRecord API has startOnKeyFrame. Set that to true when recording.

Richard

Try adding recordWaitForVideoKeyFrame to /Streams /Properties

<Streams>
<StreamType>live-record</StreamType>
<StorageDir>${com.wowza.wms.context.VHostConfigHom e}/content</StorageDir>
<KeyDir>${com.wowza.wms.context.VHostConfigHome}/keys</KeyDir>
<LiveStreamPacketizers>cupertinostreamingpacketize r, smoothstreamingpacketizer, sanjosestreamingpacketizer</LiveStreamPacketizers>
<Properties>
<Property>
<Name>recordWaitForVideoKeyFrame</Name>
<Value>true</Value>
<Type>Boolean</Type>
</Property>
</Properties>
</Streams>

You might consider using LiveStreamRecord API to record one stream instead of using StreamType “live-record” and recording all transcoded streams, which your disk might not be able to keep up with.

Richard

What is the source? Is it a Flash app with h.264 video and Speex audio?

Is there sound when you play the stream live?

Have you seen this example?

https://www.wowza.com/docs/how-to-convert-flash-player-11-output-from-h-264-speex-audio-to-h-264-aac-audio-using-wowza-transcoder

Richard

Are using hdvr to record, or Wowza? Please detail the exact work-flow so I can understand what you are doing.

Have you tried to LiveStreamRecord package? Or are you still using StreamType “live-record” with the Transcoder enabled?

Are you using mp4: prefix in the stream name to instruct Wowza to write to mp4?

Are you testing the result file from the source, or transcoded stream? If source, are you playing back the mp4 in Flash, or other client? If other client, it doesn’t work because it is Speex audio. The transcoded streams should work, but you should use the LiveStreamRecord addon or API to record one stream, using StreamType “live” instead of “live-record”

Richard

Stop Wowza, rename or delete the access log. Then add “cupertinostreamingpacketizer” to the Application.xml /LiveStreamPacketizers, if it is not already there.

Then re-start Wowza and run through your tests: Publish from this application, and try to playback.

Then zip up and send the conf, logs and transcoder folders to support@wowza.com. Include a link to this thread for reference.

Richard

Hi Richard

I also have same problem, video recording in mp4 format but no sound. I am also recording flv and it has sound.

We are using Transcoder Addon

Here is the xml configuration in Application.xml

live-record

${com.wowza.wms.context.VHostConfigHome}/content

${com.wowza.wms.context.VHostConfigHome}/keys

cupertinostreamingpacketizer, smoothstreamingpacketizer, sanjosestreamingpacketizer

transcoder

hdfvr.xml

${com.wowza.wms.context.VHostConfigHome}/transcoder/profiles

${com.wowza.wms.context.VHostConfigHome}/transcoder/templates

can you please let me know where I need to add startOnKeyFrame ?

Thanks

Prajosh

Hi Richard,

It is recording MP4 but still no sound

Thanks

Prajosh

Try adding recordWaitForVideoKeyFrame to /Streams /Properties

<Streams>
<StreamType>live-record</StreamType>
<StorageDir>${com.wowza.wms.context.VHostConfigHom e}/content</StorageDir>
<KeyDir>${com.wowza.wms.context.VHostConfigHome}/keys</KeyDir>
<LiveStreamPacketizers>cupertinostreamingpacketize r, smoothstreamingpacketizer, sanjosestreamingpacketizer</LiveStreamPacketizers>
<Properties>
<Property>
<Name>recordWaitForVideoKeyFrame</Name>
<Value>true</Value>
<Type>Boolean</Type>
</Property>
</Properties>
</Streams>

You might consider using LiveStreamRecord API to record one stream instead of using StreamType “live-record” and recording all transcoded streams, which your disk might not be able to keep up with.

Richard

We are using http://hdfvr.com/ for client side

The video is saving in two format on server flv and mp4. Flv has sound but mp4 does not have sound.

Thanks

Prajosh

What is the source? Is it a Flash app with h.264 video and Speex audio?

Is there sound when you play the stream live?

Have you seen this example?

Wowza Streaming Engine

Richard

We are using HDFVR on client side and it is connected with wowza server installed on Amazon EC2

I am still trying StreamType ‘live-record’ with Transcoder enabaled. Actually we need to save the video on server and play back later.

Yes we are using mp4: prefix name to instruct wowza to write mp4

Transcoder template xml

true

aac

mp4:${SourceStreamName}

Hope this will give u idea about our usage.

Thanks

Prajosh

Are using hdvr to record, or Wowza? Please detail the exact work-flow so I can understand what you are doing.

Have you tried to LiveStreamRecord package? Or are you still using StreamType “live-record” with the Transcoder enabled?

Are you using mp4: prefix in the stream name to instruct Wowza to write to mp4?

Are you testing the result file from the source, or transcoded stream? If source, are you playing back the mp4 in Flash, or other client? If other client, it doesn’t work because it is Speex audio. The transcoded streams should work, but you should use the LiveStreamRecord addon or API to record one stream, using StreamType “live” instead of “live-record”

Richard

Hi Richard,

I have send the details to support@wowza.com

can you please let me know the status ?

Thanks

Prajosh

Stop Wowza, rename or delete the access log. Then add “cupertinostreamingpacketizer” to the Application.xml /LiveStreamPacketizers, if it is not already there.

Then re-start Wowza and run through your tests: Publish from this application, and try to playback.

Then zip up and send the conf, logs and transcoder folders to support@wowza.com. Include a link to this thread for reference.

Richard

What was the resolution for this issue? Using the same HDFVR program & Wowza. The end result .mp4 does not have audio.

Thanks.