And I have an alternative idea for you. However, I cannot promise that it fits your purpose. This is the problem of your question: you never shared your ultimate purposes, and without it your request may not make sense.
But let me just speculate. First step is: if you wanted to create video with the use of alpha channel, it's apparent that it should be prepared in some very special way. It's apparent that if you simply take a camera and take some video, that video will make all channels 100% opaque, even if alpha is formally utilized. Now, the next step: therefore, it cannot be "just video", so it could be only some animation in the wide sense of this word. Even if this video includes some "real" video from the camera, it should have some "manipulated" elements.
And here is then main step: animation does not mean video. In other words, motion picture does not mean having "traditional" frame-by-frame video, moreover, having the video could be a harmful idea, a pure redundancy. I'll illustrate it on a speculative example. Suppose you want to have one or few graphical objects, something like balls, fly over some UI interface, over some list boxes, check boxes and grid view, having them in the background and even leaving them accessible to your mouse events. But this problem becomes trivial if you give up pointless video. You should have just UI element animated, without rendering the background, which would only take up memory and compromise performance. And, if you want, you can even show the semi-transparent background, say, blue skies with clouds, still showing your UI controls. Not a problem at all: this background would be static or almost static and work in a separate layer. But should you try to put it on video, in addition to all your problems, all that layers would become a part of video and contribute to the cost of rendering the whole frame on each move.
So, this is the conclusion: instead of using video, you can use WPF animation. Mind you, I don't mean standard WPF animation (storyboard-based), which could be too limited. You could animate some UIElement
objects (typically, on a Canvas
) and use a separate thread and Dispatcher.Invoke
to modify these objects and their coordinates and doing other coordinate space transforms. The object can use either vector or pixel graphics. Moreover, you can draw complicated vector objects using excellent open-source InkScape (or something else at your liking), export resulting SVG as XAML, embed this XAML as WPF resource and animate in your application. This is all pretty trivial stuff.
If you need some further detail, I'll gladly try to help more. First, just think about it.
—SA