Here is one way:
- Start capturing video frames with AVCaptureSession + AVCaptureVideoDataOutput
- Convert frames to OpenGL textures for display
- Record GLSL shaders for each desired effect and apply to textures from step 2
- Reading textures + effects and writing to a movie file
- Optimize until performance is adequate.
- goto 5
5 is probably the most important step. You will need to configure and configure the algorithm, video quality, texture size, frame rate, shaders, etc.
Enjoy it!
source share