I want to join two avi files and convert the joined avi into an mpeg2 file.

the audio is vbr, so I open one, save wav as uncompressed pcm. load wave file for audio, have audio and video set to direct stream copy, and generate a first avi file with pcm audio. when played, audio and video are in synch.

follow the same the second, when played it is also in synch.

but, when I append the second avi to the first avi, the audio becomes out of synch at the point where the second avi is added. in other words, the first part of the joined avi, where the first part corresponds to the first avi, is in synch, but the second part of the joined avi, where the second part corresponds to the second avi, is out of synch.

any solutions??