Search code examples
audiodirectshow

DirectShow graph separate Avi and Wav (play back, not saving)?


I am new to Direct Show. What I am trying to do is use one iGraphBuilder object, to play both a silent Avi video, and a separate Wav file at the same time. I can't merge the two into one video, but I would like it to appear as if they were.

Is there any way to go about using one set of filters to run an avi and wav file concurrently?

Thanks!


Solution

  • You can achieve this both ways: by adding two separate chains into the same graph, or using two separate filter graphs.

    The first method will give you a graph like this:

    enter image description here

    Second method will get you two graphs:

    enter image description here enter image description here

    The first approach has advantage that you have lipsync between video and audio and you control the graphs as a single playback object. The other method's advantage is ability to control video and audio separately, including stopping and changing files independently one from the other.