iPhone:Effects for recorded video?
I have a program to allow user to record the video. I have to provide options like Black&White, Crystal etc. like how "Viddy" iPhone appl开发者_如何学JAVAication does for setting more Effects to the recorded video. How can i achieve it programmatically?
Please guide me.
Thank you!
Here's one way:
- Start capturing video frames with AVCaptureSession+AVCaptureVideoDataOutput
- Convert the frames to OpenGL textures for display
- Write GLSL shaders for each desired effect and apply to textures from step 2
- Read back textures + effect and write to movie file
- Optimise until performance is adequate
- goto 5
5 is probably the most important step. You'll need to tune and tweak the algorithm, video quality, texture size, frame rates, shaders, etc.
Enjoy!
精彩评论