I am rendering a number of video streams in a Windows form, using the same number of VMR9 instances. I am doing this in C# using DirectShowLib-2005.
If there is a need to display 100 videos, I will create 100 FilterGraphs (IFilterGraph2) that will hold one VMR9 instance (VideoMixingRenderer9) each, that will each render 1 video stream.
This uses up the RAM quickly…
Can I make one VMR9 filter render more than one video stream, so I have less VMR9 instances, and more number of video streams rendered?
Any help will be appreciated.
Well… I figured it out… if someone has a better example, please post it here, I will mark it as an accepted answer.
The graph:

If you render this in GrapgEdit (or something else) it displays the first (Input0) stream and the second one (Input1) underneath it, but I want them to be visible at the same time!
To do this, VMR9 must be configured as such (error handling and some VMR9 configuration omitted):
After this, the streams are rendered in top left and bottom right portion of the clipping window, and they are both shown and rendered correctly!!!

If you want to display more video streams, just
SetNumberOfStreamsaccordingly, and configureNormalizedRectfor each one. This way I can render more streams with one VMR9 instance, and I don’t need to worry about RAM running out.Now the true coolness of VMR9 shows up… 😀 xD
PS
It looks like 16 streams is the limit…