views:

1999

answers:

1

How can I draw text Over Video in Managed DirectX with C#?

+3  A: 

You need one more component, DirectShow.Net. Since you're referring to MDX, I assume you're still using MDX v1.1, as 2.0 Beta is discontinued and has expired by August 2008. Also, I would assume you know how to playback a basic video using MDX and DirectShow.

I won't post any code here as there's 2 samples in the DirectShow.Net library to show you how to do this, namely DxText (Samples\Players\DxText) and BitmapMixer (Samples\vmr9\BitmapMixer). BitmapMixer is using VMR9 as the renderer and super-impose a bitmap on top it. You can generate the bitmap with your own text using System.Drawing.Graphic and super-impose it on the video. Most video player with subtitle is using either of these method. VMR9 is more popular as it's hardware accelerated.

faulty