rling
28th May 2007, 08:04
Hi DV-ers,
I captured a DV tape as a AVI type 1, using DVIO. It plays fine in ZoomPlayer and WMP.
I imported it into VD using the AviSynth statement:
DirectShowSource("file.avi")
But the audio plays back too slow. The Information panel in VD gives a playback speed of 32 kHz. DV should be either 32 or 48 kHz, but 48 was too fast. By experimenting with AssumeSampleRate() I found out the correct rate is 44.1 kHz. That's the first weird thing.
Now here's the REALLY weird thing.
WITHOUT using AssumeSampleRate(), if I play it from the beginning it starts out in sync, but because the audio plays too slow, it quickly goes out of sync. If I stop it and resume playing part way, the audio again starts out in sync! Think about this. If I play the video from the beginning and stop it at frame 100, it is playing the audio that *should* have been with (roughly) frame 72. If I click "stop" and "play" from exactly the same position, it starts playing video and audio both from frame 100! (though by the time it gets to frame 200, the audio is only up to frame 172).
What seems to be happening is, when seeking, the offset into the audio data is calculated using 44.1 kHz, but when playing, it plays at 32 kHz. Somehow there are two different rates for the same audio data!
OK, I thought. I added AssumeSampleRate(44100) to the script.
Now the video would stay in sync if played from the start, BUT if I seek using VD and resume playing from the middle, the audio goes out of sync immediately. I think this is because AssumeSampleRate() has only multiplied the audio rate by a scalar... it now plays at 44.1 kHz, but seeks at 44.1*(44.1/32)=60.7 kHz!!
Anyone know how I can fix this? I want to transcode it using AviSynth.
Remember, this same AVI plays perfectly in ZoomPlayer and WMP (plays and seeks with no loss of sync).
I already recaptured the tape as Type 2 AVI, but that didn't work (no sound at all).
Thanks in advance,
--rling :confused:
I captured a DV tape as a AVI type 1, using DVIO. It plays fine in ZoomPlayer and WMP.
I imported it into VD using the AviSynth statement:
DirectShowSource("file.avi")
But the audio plays back too slow. The Information panel in VD gives a playback speed of 32 kHz. DV should be either 32 or 48 kHz, but 48 was too fast. By experimenting with AssumeSampleRate() I found out the correct rate is 44.1 kHz. That's the first weird thing.
Now here's the REALLY weird thing.
WITHOUT using AssumeSampleRate(), if I play it from the beginning it starts out in sync, but because the audio plays too slow, it quickly goes out of sync. If I stop it and resume playing part way, the audio again starts out in sync! Think about this. If I play the video from the beginning and stop it at frame 100, it is playing the audio that *should* have been with (roughly) frame 72. If I click "stop" and "play" from exactly the same position, it starts playing video and audio both from frame 100! (though by the time it gets to frame 200, the audio is only up to frame 172).
What seems to be happening is, when seeking, the offset into the audio data is calculated using 44.1 kHz, but when playing, it plays at 32 kHz. Somehow there are two different rates for the same audio data!
OK, I thought. I added AssumeSampleRate(44100) to the script.
Now the video would stay in sync if played from the start, BUT if I seek using VD and resume playing from the middle, the audio goes out of sync immediately. I think this is because AssumeSampleRate() has only multiplied the audio rate by a scalar... it now plays at 44.1 kHz, but seeks at 44.1*(44.1/32)=60.7 kHz!!
Anyone know how I can fix this? I want to transcode it using AviSynth.
Remember, this same AVI plays perfectly in ZoomPlayer and WMP (plays and seeks with no loss of sync).
I already recaptured the tape as Type 2 AVI, but that didn't work (no sound at all).
Thanks in advance,
--rling :confused: