Xfade two videos using jit.gl

    May 12 2014 | 9:08 pm
    I've been searching the forums for a while, but haven't been able to find a solution to my problem yet.
    What is the best way to Xfade a QuickTime movie with either another QuickTime movie, or a webcam feed (using jit.dx.grab for the webcam).
    When I connect two videos (that are being rendered on the gpu) to a single jit.window, the two videos flicker from one to the other as quickly as my gpu can process the frames, creating an unfortunate strobing effect. I believe this has something to do with the fact that frames are erased and redrawn every time they are displayed, but I'm not sure.
    My question: How do I use jit.xfade to switch back and forth between these two rendered video files without them flickering? Or, is there a workaround with blending channels?
    (I am not at home, and cannot post my patch at the moment, sorry)
    Windows 8.1
    Intel i5-4670k (4 cores)
    Nvidia gtx 680
    8GB ram
    What I need my patch to do: I'm trying to display 4 separate videos/webcam feeds on four separate monitors. The four webcams will stream live content in their standard state. Once the patch begins running, the four streams will Xfade into four separate videos of the same length (~5 minutes). Once the videos have reached their end, the webcam feeds will Xfade back in. Originally I had all four video streams running on my CPU, but I was only getting about 9-11 FPS with each video, and I need at least 20. My plan is to run two streams from the CPU and two from the GPU to maintain a decent frame rate.
    Any help is appreciated, thank you.

    • May 14 2014 | 8:23 am
      Heres an example patch that should get you going :)
    • May 14 2014 | 8:28 am
      Because they all go to jit.gl.slab and then to jit.gl.videplane they all stay on the GPU which is far more efficient than sending two to the cpu and two to the GPU.
      What starts in open GL should stay in open GL ;-) Otherwise you lose the boost in performance.