Color effect on video in iOS - ios

How is it possible to set multiple color effects on a video when it is playing ?
Just like Instagram. I've used core image framework to give effects on images. But I have no idea how to do same for videos. I'll not prefer to use any third party SDK.
Thanks in advance.

The CoreImage framework can also process a video input.
This Apple sample project will even show you how to save a filtered video stream while displaying the preview: Core Image Filters with Photos and Video for iOS

Related

Is there any way to capture video or image from Unity (which use Vuforia) iOS application?

I have an Augmented Reality functionality made using Unity + Vuforia plugin which I integrated into the iOS application. The app uses the camera as background and when you navigate camera to some marker 3D object will appear on it.
My task is to add buttons which will start and stop capture video (or image) from the camera. The output should be a video with camera scene + 3D object.
I made some investigation, but the only solution I found is to convert the view of AVCaptureVideoPreviewLayer on which camera preview is showing to a video (or image). But from my opinion, this solution is inefficient and not flexible.
Is there any way to get a current instance of the AVCaptureSession from Unity (or maybe Vuforia plugin)? Or maybe there is another way to solve my problem?
Any pieces of advice or guides will be very helpful.
I don't think you should use AVCaptureSession to get the preview and even do the capture operation in Cocoa-Touch instead you should capture the image in Unity and pass the data to Cocoa-Touch native API.
Here is the link how to capture the screenshot in Unity.

Play video using GPUimage

In my app I have to play an alpha channel video as an overlay over the current view (I'm planning to achieve this alpha channel video using GPUImageAlphaBlendFilter or GPUImageChromaKeyBlendFilter), so I wanted to know if the output video after applying these filters can be played using GPUImage? If we can, then can I get some sample code for the same.
I know AVAnimator is an option but I want to apply filters to these overlay videos i.e.brightness,saturation etc which has to be visible while video is being played because of which I can't use AVAnimator. But this being the next step for now I want to know how to play video using GPUImage.
Thanks in advance! :]
Well, even though I like telling people about AVAnimator, Brad Larson's GPUImage is specifically designed to be a GPU based filtering framework for iOS apps. Application of real time effects like the ones you describe is exactly what GPUImage was designed for. See GPUImage Chroma Key filter

File Format for Saving Video with alpha channel in iOS

I am using AVFoundation to create a video and have added in an effect to clip the video so there is a clear background. What file format should I save this as to preserve the transparency in my iOS app.
AVAnimator is a library with which you can display video with an alpha channel on iOS, it is however not free to use for commercial products.
I don't think it's natively possible.

How to add Dynamic SubTitle Overlay on OutPut Video using GPUImage iOS?

Currently I am working on Video Processing application. I record video using GPUImage for iOS. Video is generated Perfect but i also want to add dynamic subtitles in Video i.e text change with varying time. I don't have any idea how to do subtitles in exported video using GPUImage so i am having difficulty in getting required Output. Kindly help me in this.
Thanks

iOS AVfoundation overlay video with video

I have main video and I want to overlay it with another animated video with alpha channel like "Action Movie FX" application. How can I do it with AVfoundation, or can you suggest third-party framework?
Thanks
GPUImage by Brad Larson is a great third-party framework for this kind of thing. It has many different blending algorithms you can choose from. This thread has code similar to what you want to do.
I would suggest that you take a look at my 3rd party framework to do this sort of task under iOS. You can find example Xcode projects named AVRender and Fireworks that show the exact kind of composition you describe. The compositions could be done either offline or online and can be implemented fully lossless or with a lossy encoding to h.264 as the final output. That main thing is that you will want to use a technology with a full alpha channel as h.264 does not support an alpha channel by default.

Resources