Wowza Community

Bug ? AAC + H264 gets out of sync (version 2.0, patch9)

I realized I posted this on a version 1.7 thread, so I’m moving it here…

I am having the same problem as described here:

http://www.wowza.com/forums/showthread.php?t=6697

For live streams (relayed or pulled from Darwin/QuickTime Streaming Server RTSP), the video slows down when a browser menu is opened, sometimes when fullscreen is toggled, etc., but the audio track keeps going. Tried both the LiveVideoStreaming player and JWPlayer. Here is a sample stream (hopefully it stays up, got it on a loop):

Server: [dead link]

Stream: test

Original RTSP source: [dead link]

For on-demand streaming MP4 files, similar slowdown can be observed, although it seems like the video and audio begin out of sync too. Sample:

Server: [dead link]

Stream: mp4:test.mp4

Original MP4 source: [dead link]

The originals play perfectly. They are H.264 video and AAC audio, encoded using QuickTime Broadcaster. I am using the current development build of Wowza 2.0 (patch9) running as a service, server tuned, and the client is using the latest version of the Flash player. I’ve tried most things in my Application.xml file (AVSyncMethod, SortBuffer, RTP jitter buffer) without any success. I do get occasional packet loss errors with the RTP jitter buffer, but this seems very different than that.

I really don’t remember this issue when I first started using Wowza last year. I’d be curious to know what build version solved ChloeD’s problem as discussed in the thread linked above…

This seems to be a browser issue, Netscape type browsers in particular, Firefox etc. I don’t get it in IE. I don’t think it has anything to do with Darwin, RTSP, restreaming or Wowza. I get the same results with Stream class streams: Video stops and goes out of sync when you click Alt key to activate menu. It happens with live stream from FMLE too.

Richard

Yes, I downloaded that file, and tried it here with the SimpleVideoStreaming player, and the audio is out of sync with the video.

Richard

Try another encoding method. Here are our suggestions:

https://www.wowza.com/docs/how-to-encode-video-on-demand-content

Richard

Safari and Firefox are the worst, but I could reproduce the sync problems in IE too just by opening and closing the “Organize Favorites” window once or twice.

I just ran a RTMP live stream through the same Wowza server using Wirecast, and although the video would lose frames and slow down with similar user activity, it would never lose sync with the audio. (The video actually speeds up briefly after such a slowdown to catch the audio.) I guess if this is a Flash issue, there isn’t much we can do, but this problem does render the Darwin/QuickTime relaying feature almost worthless.

However, an even bigger potential problem (for me) is the MP4 video-on-demand being out of sync, regardless of browser or user activity. The MP4 file was created with QuickTime Broadcaster and QuickTime. Feel free to download it and let me know if you see anything unusual about it:

[dead link]

Thanks – that’s what I got too. But if I play it locally using VLC or QuickTime, or stream it on a Darwin/QuickTime Streaming Server, it’s perfect. What gives?

Like I said, it’s H.264/AAC, recorded using QuickTime Broadcaster (as a .mov file), then pass-through exported by QuickTime Pro into a .mp4 container.

EDIT: Apparently, the QuickTime “pass through” export option doesn’t work for Wowza/RTMP. I had to transcode the existing video and audio tracks in order to get them to play in sync using Wowza and RTMP. Will investigate further…

EDIT #2: The MP4 sync issue is apparently a QuickTime Broadcaster output problem – Wirecast recorded video works fine without transcoding. I notice the QuickTime Broadcaster file has an embedded “media duration” value on the video track that is about 10% longer than it should be, and I can’t seem to correct it unless I transcode it. I’ll bug some Apple people about this.

EDIT #3 (PARTIAL SOLUTION): There were two problems with the MP4 file: one was the “media duration” problem, which was solved by trimming the last second off the file, and the other was keyframes. The first frame of my MP4 files were not necessarily keyframes – they were trimmed from longer MP4 files. Flash starts video playback on the nearest keyframe, but audio starts at the beginning of the file regardless, so they can easily begin out of sync. I used MPEG Streamclip to locate the nearest keyframe to my desired starting point, then trimmed it to that point and saved it. Plays fine now.

Still having problems with live sync, which I believe are specific to Wowza/QT Broadcaster… I may start a new thread specific to that, since I muddled this one quite a bit!

Sync issue fixed!

In QuickTime Broadcaster, uncheck the “Frame Reordering” option under the Video tab.

(It worked fine coming from Wirecast because there is no “Frame Reordering” option!)

HI, i think i am having the same problem…i would like to edit an mp4 file into smaller segments using “passthrough” in quicktime export…files play fine on iPhone but on Android the audio starts immediately when edited mp4 starts so a/v is not synced…thanks for any responses!! :slight_smile: