How can I draw text Over Video in Managed DirectX with C#?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.Graphicand 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.