Can you blend videos using GL shaders?

Hi! Is there a way to do crossfade within scheduled player?

OR is there a way to use GL shaders (or some other approach) to blend one video with another in a two-screen package I’ve made?

E.g. I can see a “crossfade” capability in the Simple Playlist package and imagine this is an easy thing for the GPU to do… but am not sure if the info-beamer player would support that capability.

Thanks in advance!


There isn’t in scheduled player, as cross fading would require both pages to be visible at the same time which isn’t supported by that package.

But you can cross fade in your own code. There are different approaches:

  • You can use the :alpha method when drawing both images and in case of some videos. This is the only method when using images, but only works if you load the video in GL playback mode. So when not using raw = true while loading the video. Playing back videos that way is potentially too slow, especially for higher resolution due to the extra copying required to place them into a GL texture and only then placing them on the screen. 720p is fine though.

  • If you load videos in raw mode, they are rendered outside of GL. You cannot use the :draw function in that case but must use :place instead. You can then also use the :alpha and :layer methods to specify transparency and whether the video is drawn in front or behind the GL content.

Hope that helps.

1 Like

Very clear @florian and makes sense… i’m playing them in raw mode so i’ll implement your second method… your code repo is such a huge resource, have to stay focused to not be drawn down into all the amazing learnings there!

Cheers and Happy New Year again for 2024


1 Like