Support Alpha Channel

Jan 19, 2011 at 9:27 PM

Hi all

Thanks for the MediaKit, it's great to use.

BTW, recently I encounter an issue, I want to play video with alpha channel by using MediaKit

Not sure if it's limitation for VMR9 or EVR for alpha channel.

I found a video with alpha channel (*.flv) and try to playback by using MediaKit.

It's normal to play, but don't have alpha channel. I try to modify all related code from X8R8G8B8 to A8R8G8B8 in MediaKit code

But it doesn't work, is there any way to achieve it? or there's a limitation?


I try many codecs and every possible ways, but it seems there's no way to achieve play video with alpha channel which is also overlay with other things, such as controls, ...etc.  






Jan 19, 2011 at 9:36 PM

I've never tried video with an alpha channel. Try playing the file in graphedit and see what format type is being sent to the renderer. Maybe it's possible another filter is changing the color space and dropping the alpha channel.

Jan 20, 2011 at 10:09 PM

What I understan is that only ".mov" video can handle true alpha channel (save as +million colors).

But I very much like to have support for alpha. With alpha you can use nice looking "Lower Thirds" videos like these:


Jan 22, 2011 at 5:26 PM

Hi jmorrill and Kenneta

Thanks for your feedbacks. I have surveyed this issue for few days.

It seems VMR9 don't support ARGB32 format for mixing. VMR9 only support fixed alpha value or AlphaBitmap.

I try to render ARGB32 to VMR9 filter and it can't be connected.

So it seems it's not related to MediaKit issue, it's VMR9's limitation.

But I can share some conclusion of my investigation.

Goal --> overlay videos with alpha channel together.

Support Video Codec with alpha Channel -->  

   MOVs (at least TGA inside) --> but it's not directshow based, and I can't find any 3 party direct-show filter to playback MOV with TGA format inside (RGBA)

   FLV  --> in default, it seems it will be decode to RGB, i try to use FLV decoder filter and i can decode RGBA, but VMR9 can't get it

   Uncompressed AVI -->  the information is from internet, but i haven't try because VMR9 doesn't work!


I try to use any technology to achieve. (WPF, XNA, DirectShow, with D3dimage, ...etc)

It seems so far there's no good and easy way to achieve my goal.

I try to decode series of PNG with alpha channel to act as video, but the frame rate is not easy to achieve 25 FPS and also depends on hardware.

Color Key or Color Range by using PixelShader (in WPF, XNA, ...etc) might be a alternative way, but the overall quality can't compete to true alpha channel.

:-(   But thanks for your precious suggestions.




Jan 24, 2011 at 8:49 AM



Try this Quiktime filter (feature lista say "Supports alpha-channel output")



Jan 24, 2011 at 12:31 PM

Hi Kenneta

Thanks, I have downloaded the directshow filter and it indeed support RGBA for MOV/TGA format. (But not sure how much it cost, need check later.)

Now I need to write a directshow filter myself to get all frames and try to do rendering myself. :-)

It's helpful, thanks!


Jan 24, 2011 at 1:10 PM


Did you get Alpha channel to work in WMFmediakit with the Medialooks QT filter? If so please share come code how you did it.

Also interested if you build your own QT filer with Alpha support.



Jan 24, 2011 at 1:23 PM

Hi Kenneta

Not Yet, but the codec you support seems can successfully decode RGBA from MOV file, but I don't have proper renderer to play to verify if it works.

I don't think it's possible to use MediaKit to playback because it use VMR9 or similar renderer which don't support RGBA32 format.

So the limitation is from renderer, not from MediaKit I think.

I will try more and if any progress, I will share out.



Jan 24, 2011 at 3:57 PM

witch Directshow render did you use in your graph?  Is it possible to use another render than VMR9 in MediaKit?  As long a the render can "output" to WPF we can just add the "alpha" render a layer (canvas) ontop of MediaKit in the WPF application.