Wowza Community

Live Stream Recording Audio and Video Sync Issue

As a matter of fact, sdabhi, can you please confirm whether the archived file, when played on VLC or Media Player Classic, runs just fine? What about on Quicktime Player?

Thanks!

Helder

Can you give a bit more info on the known issue?

Is it specific to certain types of live encoders, codecs, profiles?

Hi pcurley,

Please open a new support ticket referencing this forum post. Our Engineering Team has identified an issue with some live-record recordings being out of lip sync and has a fix available that will be included with our next update. We would like to see if your situation matches this current known scenario or is a different problem.

If you could include a zipped copy of your conf/ and logs/ directories with this ticket, that will help us determine if this is a relevant fix.

Best regards,

Andrew

@Animaleante , That’s good . Although I don’t want to add an extra layer of conversion and wowza module must be able to record stream without this issue . With so many posts in forum I think it is really an issue and wowza should provide some input a way to fix it.

Any possibility to get some update from wowza team ?

Here is Wirecast settings shot . . I have tested this with our custom player which is built on top of OSMF and also here http://matbury.com/strobe/setup.html

Please consider this

  1. This does not happen with live stream at all . Only after recorded file .

  2. MP4 recordings has issue .

  3. We have used settings I already described above and we already have LiveStreamPacketizers installed.

  4. We are recording on wowza module as code below

String streamName = stream.getName();

IApplicationInstance appInstance = stream.getClient().getAppInstance();

IVHost vhost = null;

vhost = appInstance.getVHost();

ILiveStreamRecordManager recorder = recorders.get(streamName);

if (recorder != null) {

recorder.stopRecording(appInstance, streamName);

}

recorder = vhost.getLiveStreamRecordManager();

StreamRecorderParameters srp = new StreamRecorderParameters(stream.getClient().getAppInstance());

srp.outputPath = outputPath;

srp.outputFile = outputFile;

srp.segmentationType = IStreamRecorderConstants.SEGMENT_NONE;

srp.versioningOption = IStreamRecorderConstants.APPEND_FILE;

srp.startOnKeyFrame = true;

srp.recordData = true;

recorder.startRecording(appInstance, streamName, srp);

@Salvadore , Thanks for your suggestions, I will try it out. Although it confuses me that if Live stream has no issue with this encoder settings , how changing it will help with recorded file.

I just tried that and still it made no difference .

Anyone here can please provide direction ?

Tried that as well and it makes no difference . No matter what player I tried it with it has same sync issues , and that is because record file itself has problem .

Even tried opening a ticket . No help there either , was suggested just try out parameters that I already mentioned before which makes no difference .

I have tried VLC and it was off . Are you sending stream from wirecast ? I have tried all different parameters with no success so far .

I haven’t got much of help from forum or support tickets so far . But if it helps you I have used following parameters in your code or application.xml .

liveStreamRecorderUseMoreAccurateAudioTimecodes = false

recordWaitForVideoKeyFrame = true

sortPackets = true

sortBufferSize = 750 , 250

streamRecorderBackBufferTime = 2000

splitOnTcDiscontinuity = true

moveFirstVideoFrameToZero = true

versioning: overwrite / append

recordData = true

segmentationType : SEGMENT_NONE

Yes I have already sent wowza my application java code . Before weekend I was advised to try debugAACTimecodes and debugMP3Timecodes to make sure if we see sync issue in logs . I am going to try that now .

Tried debuggAAC and MP3 , result shows following so it looks like its not going above 1 . However recorded file is still out of sync . We also upgraded to wowza 4.2 and still its same issue .

tc[0]: 1894821796:1894821796:44100

tc[0]: 1894821819:1894821819:44100

tc[0]: 1894821819:1894821819:44100

tc[0]: 1894821842:1894821842:44100

tc[0]: 1894821866:1894821866:44100

Hello.

What are the encoders settings for audio and video codec?

Also, what player are you testing the recordings in?

Thank you.

Salvadore

It looks like your key frame interval is to low. I would try changing that from 8 seconds down to 2 seconds. So a key frame every 60 frames instead of every 240 frames.

Salvadore

Sorry, forgot to also suggest testing the recording with one of the VOD sample players that ship with Wowza.

Thank you,

Salvadore

A recording made from a live stream in Wowza should playback from a Wowza vod application, but might not work well or at all for other purposes. It often has to do with the fact that Wowza places the moov atom at the end of the file rather than the beginning.

Please test the recording with one of the example players that ship with Wowza. If playback is correct in the sample player, then you can try re-encoding the recording with ffmpeg and see if that fixes the recording in your custom player.

Also, try different settings in the encoder. Other users have found that changing to 24fps video fixed audio sync issue. I don’t think that is a fix-all in other situations necessarily, but changing audio and video details is where I would start.

If all else fails you can open a ticket with support. To do so please follow this guide and send required information to support@wowza.com:

How to create a compressed zip file in Windows, OS X, and Linux

Regards,

Salvadore

Sdabhi, where you requested to send a sample recording with a/v sync issues to support for testing? If you have not sent a sample, and your ticket is still open, please do so support can get a better understanding.

Salvadore

I was having this problem as well when recording with mp4. For me the problem was the variable frame rate on video. So I changed to FLV recording, and when I finish de recording, I use ffmpeg on it to convert to mp4. No more problems on audio sync since then.

Hi,

@sdabhi: There was a fix in the recent Wowza versions that fixed this issue. Do make sure that your Wowza server is updated to the latest version available and test again. Do make sure that you have rollback procedures in place and that you test thoroughly.

@noface0711: what Wowza version are you using?

Michelle