views:

343

answers:

4

In the past I have used Managed Direct X and DirectShow.Net to play a video to a texture on a simple mesh. I have then used this same technique to combine multiple video sources into a single texture, using the various capabilities exposed through textures to blend these streams together. This was a very interesting experiment 2 years ago and was quite suitable for the purpose when Managed Dirext X was still being developed and supported (which is no longer is) and similarly with DirectShow.Net - it doesn't seem like it has been updated since July 2007.

I'm looking to venture in to this space again and would like to know how this can be done in C#, without using depreciated or end-of-life API's and how best to approach it.

+2  A: 

It's very easy to do in WPF.

Use two MediaElement controls, one above the other, and make the upper one 50% transparent.

However, I don't think it's possible to save it into a new video

SLaks
I think this is a really interesting idea for what seems like quite a simple implementation for this problem. I'm going to have a shot at this and see what else I can do with the videobrush.
Sebastian Gray
+1  A: 

you can use SlimDX open source library that is same as almost same as MDX and DirectShow and have support in vista also in win7.0

Firoz
I haven't heard of this libary before, thanks for pointing it out. If I end up going down the heavy lifting path - I'll check it out.
Sebastian Gray
A: 

Another option I came across today may be AForge.net - it contains a namespace for playing videos. http://www.aforgenet.com/framework/samples/video.html and is published under the LGPL license.

Sebastian Gray
A: 

An additional option is OpenTK; for mixing the frames provided by a video stream: http://www.opentk.com/doc/graphics

Sebastian Gray