Log in

View Full Version : Audio synch issues in decoded MPEG2 capture


Tenement Funster
5th January 2005, 23:13
I have a Dazzle DVC150 USB capture device with hardware MPEG2 encoding. I captured a 2 hour 18 minute video (NTSC) from VHS and am able to play back the MPEG2 file without any synch issues with any media player on my machine (MPC, WMP, etc.)

However, since I wanted to clean up the video a bit, I used DGIndex to demux the MPA audio and then loaded it into VirtualDubMod via AviSynth. However, now the audio drifts out of synch as the video progresses. I have tried many things, from using MPASource() in AviSynth and playing back in MPC (this drifts) to decoding to WAV with BeSweet and then adding the stream in VDubMod (this also drifts) to saving the video to HuffYUV and adding in the WAV in a second AviSynth script (also drifts).

I'm at my wit's end here, does anyone have any suggestions for correcting this synch issue? What are the possible causes?

hartford
7th January 2005, 03:23
I sympathise.

If the audio sample-rate is correct (is 48000 or 44100), then
do a stretch or shrink on it. Avisynth has a filter called TimeStretch (http://www.avisynth.org/index.php?page=TimeStretch) .

Other applications such as Sound Forge or Cool Edit can do what you need.

Cool Edit requires a 2-step process of resampling and stretching/shrinking
while Sound Forge will do both in one step.


Why does this happen? It appears that some programs use "default" audio
rates rather than the "actual."

Look at the audio stream in VirtualDubMod. I'd bet that your capture audio
rate isn't exactly "default."

mic
10th January 2005, 19:26
Using DGIndex did you do anything with the frame rate? Also, while I haven't had any problems with DGIndex, might try another tool for demuxing.

If/when the play time for the audio file is longer then the video, as it plays the audio will become further out of sync. As hartford wrote, Cooledit and Sound Forge both can correct this, as can Goldwave. Personally I like the Sony video editors (prev Sonic Foundry) for their time stretch/compress abilities - might download a trial.

One bit of caution: I have seen mpg2 captures where the audio capture continued for a short bit after the video capture ended, which could make stretching a bit more trial and error.

Also, I have seen some mpg2 capture that was a bit non-standard as far as the resulting files go. You might want to try running your capture through different conversion or correcting programs -- maybe something like Rejig with a 99% compression level? It would be quick and easy enough to try, remuxing the streams after the fact just to check sync, and then trying your audio mods.

FWIW, I like to do mpg2 capture using all I frames, then DGIndex to demux while saving the project file. Using VFAPI I recompress the video, using Soundforge to convert the mpa to 48K wav and filtering noise. Haven't experienced any sync issues (knock on wood).