any way to crossfade between video clips?

I’m trying to figure out if there’s any way to crossfade between two video clips. for example, let’s say I have to ofVideoPlayer objects, movie1 and movie2. When I want to switch from movie1 to movie2, I want the transition to be a crossfade instead of a cut.

I took a look at the ofxFadable addon, but don’t see how it could be used to fade between two clips (although I can get it to fade a clip into a color or fade out of a color).

Any ideas?

thanks!!

1 Like

This might add unneeded complexity to your program, but I would render the video.draw() function to an FBO and display FBOs reference texture with a partial alphas.

Are your preceding ofSetColor() calls with full alpha?

float alphaValue = 255;

// fade out player0
ofSetColor(255,255,255,alphaValue);
videoPlayer0.draw();

// fade in player1
ofSetColor(255,255,255,255 - alphaValue);
videoPlayer1.draw();

alphaValue = alphaValue - 1.0;