Video with AVFoundation | raywenderlich.com

AVFoundation is Apple’s advanced framework for working with time-based media, such as audio and video. This course covers the essentials to using the AVFoundation framework to create video based apps. Learn how to import videos, create thumbnails from them, play live videos in SwiftUI, setup capture sessions to preview and capture still images, record movies files; and merge multiple video clips.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/21460315-video-with-avfoundation

Hi Brian!
Thank you for producing such a great content for using the AVFoundation framework! It helped me creating a very cool compositions capabilities to a project I am working on.

I have a question, I am trying to add image filters to one of the video tracks in the composition. Reading online I found that this is done by creating an AVVideoComposition and then applying the filter to it using: AVVideoComposition(asset: asset, applyingCIFiltersWithHandler: { request in …

My question is how do I use the AVVideoComposition with the AVMutableComposition you created in your course? It seems like it’s either using one of the other when setting the exporter:

*exporter = AVAssetExportSession(asset: composition…
exporter.videoComposition = videoComposition…

Understanding how to incorporate image filters on tracks will help me a lot.

Thank you!