Audio / Video sync issue - audio leads by a few seconds while video is delayed.
I have a live stream coming in that is transcoded in VLC/1.1.7. At this point if I view the stream directly from VLC with a player over RTSP such as QuickTime or VLC the audio & video are in perfect sync and never skew. These streams are transcoded to 30fps with something along the lines of the following VLC transcode profile:
When the stream is viewed via Wowza a variable skew of between 3 to 5 seconds is introduced. I have tried WMS 2.2.3, 2.2.3patch3, 2.2.2, 2.1.0. All show the same behaviour.
When compared to the good direct stream side by side the stream via WMS has audio at almost exactly the same time while the video is is lagging behind.
I suspect this may be related to the frame rates on the source stream. I believe the original source upstream is firstname.lastname@example.org. This is transcoded to email@example.com for us, which is what we feed to VLC:
When I transcode to 30fps the audio is always skewed by 3 to 5 seconds. If I transcode to 60fps there is no audio-video skew about a third of the time. Unfortunately 60fps is just too much for both the transcoder and flash to handle.
I have a feeling it's related to the tbr, tbn, tbc values, but haven't been able to find much information on these.
I found references on the forum to
debug AAC timecode issues and found there is no difference as defined in that thread, so as I understand it there should be no drift.
I have tried adjustments to <AVSyncMethod>systemclock</AVSyncMethod>. The rtptimecode option results in very choppy sound. systemclock seems to give the best result, but still not perfect.
I have tried with and without flushInterval=25 as defined