Tech Off Thread

5 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

How to show image over video in Media Player?

Back to Forum: Tech Off
  • User profile image
    Beetlejuice

    Hello Programms!

    I want show image when my Windows Media Player playing video file.
    In Windows Media Player SDK i try Skins. Add <SLIDER...

    But video play always on top, i want show image over video stream?

     

  • User profile image
    staceyw

    Beetlejuice wrote:
    Hello Programms!

    I want show image when my Windows Media Player playing video file.
    In Windows Media Player SDK i try Skins. Add <SLIDER...

    But video play always on top, i want show image over video stream?

     


    SilverLight (wpf/e) allows this.  Also, I think the Expression Media encoder does this kind of thing.

  • User profile image
    rhm

    Beetlejuice wrote:
    Hello Programms!

    I want show image when my Windows Media Player playing video file.
    In Windows Media Player SDK i try Skins. Add <SLIDER...

    But video play always on top, i want show image over video stream?

     


    The problem is that media player uses a feature called "video overlays" that allows it to write the decoded frames directly to video memory, thus overwriting anything the GDI might want to put in that space.

    If you are willing to program in C++, there are some samples in the DirectX SDK that show how to mix other imagery with the output of media player but DirectShow is very complex. However the samples might be close enough to what you want to do that you can achieve it without really understanding the ocde.

    If you don't mind depending on WPF, you can use a media player element in that. WPF gets windows media to render to an off-screen bitmap which it then draws to screen composited with all your other visual elements, so that doesn't have a problem with the video overwriting your static imagery.

    Then there's also the forthcoming Silverlight which is really a cut-down version of WPF and the CLR and might be suitable for what you want.

  • User profile image
    Beetlejuice

    i know about DirectX - DirectShow, but i looking standard action in Media Player, it seems like that solution does not exists. Too bad... Sad

  • User profile image
    Cannot​Resolve​Symbol

    rhm wrote:
    
    Beetlejuice wrote: Hello Programms!

    I want show image when my Windows Media Player playing video file.
    In Windows Media Player SDK i try Skins. Add <SLIDER...

    But video play always on top, i want show image over video stream?

     


    The problem is that media player uses a feature called "video overlays" that allows it to write the decoded frames directly to video memory, thus overwriting anything the GDI might want to put in that space.

    If you are willing to program in C++, there are some samples in the DirectX SDK that show how to mix other imagery with the output of media player but DirectShow is very complex. However the samples might be close enough to what you want to do that you can achieve it without really understanding the ocde.

    If you don't mind depending on WPF, you can use a media player element in that. WPF gets windows media to render to an off-screen bitmap which it then draws to screen composited with all your other visual elements, so that doesn't have a problem with the video overwriting your static imagery.

    Then there's also the forthcoming Silverlight which is really a cut-down version of WPF and the CLR and might be suitable for what you want.


    It's actually relatively simple to draw on top of a video using DirectShow on .Net...  see http://channel9.msdn.com/ShowPost.aspx?PostID=142051.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.