Re: Video & Audio Lip sync issue when changing the speed of the audio

Hi, Chris.

Folloging your suggestion, now I am changing the timestamp of the audio
samples in TransformFilter::Transform of my Audio Speed change filter.

Here is how I recalculate it:
if (NOERROR == pSource->GetTime(&origTimeStart, &origTimeEnd)) {

if (m_prevTimeEnd == -1)
TimeStart = origTimeStart;
TimeStart = m_prevTimeEnd;

m_prevTimeEnd = (origTimeEnd - origTimeStart)/m_rate +
pDest->SetTime(&TimeStart, &m_prevTimeEnd);

Before I did this, I could see that video/audio plays almost in sync in x4
speed. But now, only the audio plays fast and video is playing real time.
I am totally confused. Previously, I was only setting the speed through
AudioChangeFilter and was not doing anything about video. But since the
video/audio goes to the different route in the FilterGraph (see below), am I
supposed to write the filter to change video speed also??

Let me know.
Bibo mushi.


I created an audio speed change filter (Transform filter) that allows the

user to change the speed of the audio. If you set the audio speed to 3, I

will only pick up 33% of the audio samples in Transform and go on.
The audio sounds pretty good but I found that if I use it for the file
has video, the video and the audio is not in sync (I think video is ahead
My graph looks like this :
Source Filter-MPEG1 Splitter
-MPEG1 Video Codec - Video Renderer
-MPEG1 Audio Codec - Audio Speed Change - Audio Renderer

It's also important to make sure you are recalculating the timestamps in
your audio speed change filter. The Audio Renderer is the reference clock
by default so not adjusting timestamps appropriately will cause sync