BradLarson / GPUImage2

GPUImage 2 is a BSD-licensed Swift framework for GPU-accelerated video and image processing.
BSD 3-Clause "New" or "Revised" License
4.85k stars 605 forks source link

Video processing on `AVMutableVideoComposition` #311

Open israelg99 opened 4 years ago

israelg99 commented 4 years ago

My goal: I am editing a video using AVMutableVideoComposition and want to use GLSL shader files either with OpenGL or Metal to make nice smooth transitions between clips/assets in my composition.
A simple GLSL transition example: https://gl-transitions.com/editor/directionalwarp?direction=1,1

I know MovieInput works:

movie = try MovieInput(url:movieURL, playAtActualSpeed:true)
filter = Pixellate()
movie --> filter --> renderView
movie.start()

Any ideas how can it be done on AVMutableVideoComposition? For instance, an arbitrary transition should begin at 2.5 sec mark & end at 2.9 sec mark in the video composition timeline. More concretely, is there a way to grab a shader file e.g zoom_transition.glsl and apply it to 2.5s-2.9s timeline of the AVMutableVideoComposition.

Let me know if GPUImage is not the place for it, I love the work you guys are doing with shaders @BradLarson .

Jasper2016 commented 3 years ago

I have the same question. @BradLarson