Green Screen in Silverlight...y cant i do it? RRS feed

  • Question

  • I im trying to attempt a effect at is easily done in silver light. Which is playing a video with and alpha channel.

    I have tried exporting to wmv with alpha channel enabled and that didnt work, btw it work fine with 24bit-png files when you load an image it will load its alpha channel.

    ok so then I finally came to think...ok it just dosen't support it.

    so i tried to achieve the effect in XAML.

    Since it was a greenscreen file i figuired i could just set the <MediaElment.OpacityMask> to a SolidColorBrush whose color was the green color in the movie....that didnt work the way i wanted to, so i tried all the other brush and they work as expected.

    So then i thought maybe i can create a alpha video and use  videobrush...wich is in the documentation...to find out that the mediaelement dosen't support the video brush....so im i attempting the imposible with silver light?........this is an effect that is very simple in flash.

    Friday, September 28, 2007 3:56 PM

All replies

  • nope, can't do it...it was originally supposed to make it into 1.1, but I hear it's not going to make it.

    Friday, September 28, 2007 4:00 PM
  • Man...thats like a big thing in terms of competing with flash... i work with a bunch of designers and as much of a pain in the ass that flash is...it allows them to do what they want visually. Which sucks because we are a marketing company and interactive media is our thing.

     so far its my only gripe with it...it has a shorter learning curve than flash...hope Scott's thinks of throwing that in  1.2 lol

    Friday, September 28, 2007 4:08 PM
  • Can it be done in WPF?
    Thursday, October 4, 2007 11:36 PM
  • The media element those not support playing back alpha channels from what i have researched. I tried doing the same in a regular WPF app and got the same results. I hope they work with the expression encoder team and figure something out, my company wont push silverlight until we can do the exact same things we do in flash...trust me ill take xaml over action script anyday

    Friday, October 5, 2007 9:00 AM
  • Hmm. In the WPF world could I use something like the VP6 codec to play videos with alpha channel information?

    Friday, October 5, 2007 5:53 PM
  • The following are the only supported formats

    The MediaElement object supports the following formats. These encodings are supported regardless of the file's extension.


    • WMV1: Windows Media Video 7
    • WMV2: Windows Media Video 8
    • WMV3: Windows Media Video 9
    • WMVA: Windows Media Video Advanced Profile, non-VC-1
    • WMVC1: Windows Media Video Advanced Profile, VC-1


    • WMA 7: Windows Media Audio 7
    • WMA 8: Windows Media Audio 8
    • WMA 9: Windows Media Audio 9
    • MP3: ISO/MPEG Layer-3
      • Input: ISO/MPEG Layer-3 data stream
      • Channel configurations: mono, stereo
      • Sampling frequencies: 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, and 48 kHz
      • Bit rates: 8-320 kbps, variable bit rate
      • Limitations: "free format mode" (see ISO/IEC 11172-3, sub clause is not supported.

    Other formats

    MediaElement also supports playlists in the form of Advanced Stream Redirector (ASX) files, also known as Windows Media Metafiles.  Although the file extension does not matter, these files typically have a .asx, .wax, .wvx, .wmx, or .wpl extension.


    Friday, October 5, 2007 10:18 PM