You can easily correct audio sync issues by setting the audio_sync tag in your XML, as follows:
<?xml version="1.0"?> <query> <format> <audio_sync>1</audio_sync> </format> </query>
This works by adjusting the output audio stream to match the source timestamps, in # of samples per second. Consider this a great for fixing sync when source is variable framerate, or has timescale problems.
The most common instance of this is webcam video recorded with Nellymoser audio codec from the free flash plugin.