PDA

View Full Version : Layer possibilities


Zarxrax
8th November 2003, 23:43
I often use Adobe After Effects to create overlays on the video. I have to render out the overlay as RGB32 with an alpha channel. Then I apply the overlays like this:

video = AVISource("raw.avi").ConvertToRGB32()
overlays = AVISource("overlays.avi")
Layer(video,overlays).ConvertToYV12()


As you can see, doing this requires that my encodes always have a colorspace conversion in them. While I'm pretty sure there is no way to skip the conversion currently, I was wondering if it would be technically possible to implement a method of layering these videos without the conversion?

My idea would be to do something like this:
video = AVISource("raw.avi")
overlays = AVISource("overlays.avi")
Layer(video,overlays)

The Layer command would see that video is YV12 colorspace and the overlay is RGB32. It would then convert the overlay to YV12 in order to Layer it with the video, but it would still use the alpha channel information when layering it.
Would anything like this ever be possible?

Richard Berg
9th November 2003, 02:55
Yes. In the framework I envisioned, you would do something like:

video = AVISource("raw.avi")
overlays = AVISource("overlays.avi")
Layer(video, overlays.ConvertToYV12, overlays.AlphaToMask)