Audio and video sync RRS feed

  • Question

  • Hello,
    I am writing a video mixer filter that mixes multiple video streams. I cannot use VMR because I need to get the mixed video in an output pin for further processing.

    The mixer starts mixing only when it gets samples from each of the video streams connected.

    The outcome is that the video has a latency and the audio is played 1/2-1 seconds before the video.

    I tried to add an input pin of type audio (derived from CTransformInputPin) and an output pin of type audio to the mixer filter (receiving and delivering WAVEFORMATEX) queuing the audio samples until the first video mix sample is ready and then start sending the audio samples.
    However, that seems to block the video (I am getting to much Receive calls on the audio input pin, the CPU is around 100% and the video mix output pin is blocked on the Deliver function even when I do not queue the audio samples).

    Is there a better idea to sync audio and video?
    Monday, October 29, 2007 6:27 AM