iosopengl-esgpuimagelive-video

GPUImage multiple live videos


I'm using the Brad Larsons GPUImage framework and was wondering if it is possible to have multiple live videos simultaneously. Each live video should have its own filter applied. Similar to the camera application that is included in iOS.

Any help is truly appreciated.


Solution

  • Sure. Look at the MultiViewFilterExample sample application that comes with the framework, which does just this.

    For that, you'd take a single video or photo camera input and have it target multiple filters. Each of these filters will receive a frame from the camera and process it. You can then direct the outputs of these filters to separate GPUImageViews for display. As an optimization, I'd recommend using -forceProcessingAtSize: on the filters to constrain them to only the pixel size you need for your final preview view (which is what I do in the above example).