We are about to switch to a new forum software. Until then we have removed the registration on this forum.
How can I create a basic fade transition effect between two videos?
Let us say we have video1.mov playing and after that is done, play video2.mov right away.
But when video1 is done playing, the last few seconds, the frames fade out and when video2 starts playing, the first few frames fade in.
Answers
Do you have the video library installed in processing? You can install it through the Library manager. Then go to Files>>Examples and then go to Libraries>>Video>>Movie and open frames.pde as this file is a good example to start from.
Kf
As kfrajer says, separate what you are trying to do into separate problems:
For the timing:
movie.duration()
returns the length of the movie in seconds https://processing.org/reference/libraries/video/Movie_duration_.htmlmovie.time()
returns the current play location in the movie https://processing.org/reference/libraries/video/Movie_time_.htmlUse those to detect when you are n seconds away from the end of a Movie -- if so, trigger an event (e.g. fade movieA down, fade movieB up).
For the fading:
Cross-fading between either two images or between two videos always works in the same way. Here is a previous discussion with an example sketch that demonstrates cross-fading between two videos:
https://forum.Processing.org/two/discussions/tagged/playbin2.about_to_finish
Thank you everybody for your responses.
jeremydouglass,
I was able to get the desired effect working in the end, thanks to that tutorial!