I have a problem with an java screen recorder. The problem is that the video and audio gets out of sync sometimes if the client computer is a bit slow.

The tecnique used is to capture a lot of jpegs and the sound. After that the jpegs is rendered to an quicktime movie along with the sound.

Do you guys know of a good tecnique to always get this in sync?