GPUImage filters in runtime on AVMutableComposition
Asked Answered
C

0

0

I am working on integrating a video player with the very powerful GPUImage framework (https://github.com/BradLarson/GPUImage), whereby user can queue videos for continuous playback (AVMutableComposition) and also select a number of GPUImage filters to be applied to selected clips in the queue on runtime. Say clips number 2 and 4 out of the total 5. The key is that I have unfiltered clips and cannot afford to generate and save "filtered" versions of them for use so this has to be runtime.

Is there a way to achieve this using GPUImage?

Cedeno answered 21/8, 2013 at 4:45 Comment(3)
If you can split them out into individual movies, GPUImageMovie currently takes in AVAssets, not whole compositions. It might be possible to extend GPUImageMovie to process AVMutableCompositions, but that's not something I've spent time on. You can dig into the source for this class to see how it works. I'd gladly take a pull request adding this.Nodal
Thanks for the hint Brad. Movies are already separate, so I guess the next step is to extend GPUImageMovie as you suggested. Looking at it from a different angle however, is it possible to generate an AVAsset from raw video after applying filters, without actually writing the filtered video out to a physical file?Cedeno
@BradLarson: AVMutableComposition is a subclass of AVAsset, but you say GPUImageMovie can take an AVAsset but not an AVMutableComposition. What am I missing?Alnico

© 2022 - 2024 — McMap. All rights reserved.