Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Recorded MP4 audio out of sync

  1. #1
    Join Date
    Jul 2012
    Posts
    1

    Default 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!

  2. #2
    Join Date
    Dec 2007
    Posts
    21,962

    Default

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

    Richard

  3. #3
    Join Date
    Jul 2012
    Posts
    8

    Default

    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

    <Streams>
    <StreamType>live-record</StreamType>
    <StorageDir>${com.wowza.wms.context.VHostConfigHome}/content</StorageDir>
    <KeyDir>${com.wowza.wms.context.VHostConfigHome}/keys</KeyDir>
    <LiveStreamPacketizers>cupertinostreamingpacketizer, smoothstreamingpacketizer, sanjosestreamingpacketizer</LiveStreamPacketizers>
    <Properties>
    </Properties>
    </Streams>

    <Transcoder>
    <!-- To turn on transcoder set to: transcoder -->
    <LiveStreamTranscoder>transcoder</LiveStreamTranscoder>
    <!-- [templatename].xml or ${SourceStreamName}.xml -->
    <Templates>hdfvr.xml</Templates>
    <ProfileDir>${com.wowza.wms.context.VHostConfigHome}/transcoder/profiles</ProfileDir>
    <TemplateDir>${com.wowza.wms.context.VHostConfigHome}/transcoder/templates</TemplateDir>
    <Properties>
    </Properties>
    </Transcoder>

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

    Thanks
    Prajosh

  4. #4
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    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

  5. #5
    Join Date
    Jul 2012
    Posts
    8

    Default

    Hi Richard,

    It is recording MP4 but still no sound


    Thanks
    Prajosh

    Quote Originally Posted by rrlanham View Post
    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

  6. #6
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    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?
    http://www.wowza.com/forums/content....anscoder-AddOn

    Richard

  7. #7
    Join Date
    Jul 2012
    Posts
    8

    Default

    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

    Quote Originally Posted by rrlanham View Post
    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?
    http://www.wowza.com/forums/content....anscoder-AddOn

    Richard

  8. #8
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    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

  9. #9
    Join Date
    Jul 2012
    Posts
    8

    Default

    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

    <Root>
    <Transcode>
    <Encodes>
    <!-- Example Encode block for source, not required unless Member of StreamNameGroup. -->
    <Encode>
    <Enable>true</Enable>
    <Name>aac</Name>
    <StreamName>mp4:${SourceStreamName}</StreamName>
    <Video>
    <!-- H.264, PassThru, Disable -->
    <Codec>PassThru</Codec>
    <Bitrate>${SourceVideoBitrate}</Bitrate>
    <Parameters>
    </Parameters>
    </Video>
    <Audio>
    <!-- AAC, PassThru, Disable -->
    <Codec>AAC</Codec>
    <Bitrate>48000</Bitrate>
    </Audio>
    <Properties>
    </Properties>
    </Encode>
    </Encodes>
    <Decode>
    </Decode>
    <StreamNameGroups>
    </StreamNameGroups>
    <Properties>
    </Properties>
    </Transcode>
    </Root>


    Hope this will give u idea about our usage.

    Thanks
    Prajosh
    Quote Originally Posted by rrlanham View Post
    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

  10. #10
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    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

Page 1 of 2 12 LastLast

Similar Threads

  1. mp4 recorded live streams: audio gets out of sync
    By philpav in forum Live Streaming and Encoder Discussion
    Replies: 7
    Last Post: 08-15-2012, 10:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •