locked
MFT - Custom overlays Question RRS feed

  • Question

  • Hello all,

    I'm a little stumped on how to achieve my goal of combining Text overlay in a video stream. I'm currently reading and looking at the book "Developing Microsoft Media Foundation Applications" and getting a lot out of it, but in his Transform example he is just injecting a static image overlay to the input video stream of his Transform dll.

    I understand the Transform plugins are isolated COM objects from all outside applications. Am I wrong in assuming this could be achieved by the calling application setting up 2 streams to the transform, 1 being the image of the text overlay, and the other being the video stream and then combining the 2 inside the Transform? Am I way off base in this theory or is there another way of sending custom data to the Transform (being the Text Image overlay) somehow other than a stream.

    Thanks so much in advance for your responses!

    -Brandon

    Tuesday, March 4, 2014 2:48 PM

Answers

  • Hello.

    If you want to mix text and video, there is another approach, if text is not inside the video file. You need to make a custom EVR. This EVR will draw your video and your text.

    There is a sample code for a custom EVR (evrpresenter). I suggest you to use DirectX9, because it's easier to use font with it, more than DirectX11. In fact, DX11 does not handle font, it is a young API.

    So the trick is to manage the text directly with DirectX, inside EVR.


    • Marked as answer by Brussellz Wednesday, March 5, 2014 1:26 PM
    • Edited by Miaou77 Friday, March 14, 2014 9:32 PM
    Tuesday, March 4, 2014 9:43 PM

All replies

  • Hello.

    If you want to mix text and video, there is another approach, if text is not inside the video file. You need to make a custom EVR. This EVR will draw your video and your text.

    There is a sample code for a custom EVR (evrpresenter). I suggest you to use DirectX9, because it's easier to use font with it, more than DirectX11. In fact, DX11 does not handle font, it is a young API.

    So the trick is to manage the text directly with DirectX, inside EVR.


    • Marked as answer by Brussellz Wednesday, March 5, 2014 1:26 PM
    • Edited by Miaou77 Friday, March 14, 2014 9:32 PM
    Tuesday, March 4, 2014 9:43 PM
  • Thank you Miaou77 for your help. I'll most definately look into the EVR path then, I was wondering if there was another part in the pipeline that would be more suitable than using the MFT path.

    Thanks!

    Wednesday, March 5, 2014 1:26 PM