Video with AVFoundation
Mar 23 2021 · Video Course (58 mins) · Intermediate
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.
Version
- Swift 5.3, iOS 14, Xcode 12


Video with AVFoundation
Get started with working with videos by importing videos into your app by way of the PHPickerViewController.
Generate Thumbnails
3:56Leverage the AVAssetImageGenerator to produce thumbnails for each of your videos.
Create a Playlist
4:59Learn how to create a list of videos and then play those videos one after another using an AVPlayerViewController.
Understand how to add picture-in-picture capability to your app so your users can watch your video in a small floating window.
Access the Camera
9:22Use AVFoundation to access the camera and show a live preview on the screen.
Take a Photo
8:16Learn how to take pictures with AVFoundation and then how to control the flash on demand.
Record Videos
5:46Unlock the video camera on your phone and then learn how to access your recordings in your code.
Preview Video Merge
5:38Learn how to take several video sources and produce a merge preview of them.
Take several videos and merge them into a singular video that you can save to your phone.
Version history
iOS 14, Swift 5.3, Xcode 12 (Selected)
iOS 9, Swift 2, Xcode 7
Who is this for?
This course is for intermediate iOS developers who are comfortable with the Swift language, SwiftUI and know their way around Xcode.
Covered concepts
- Import Videos with PHPickerViewController
- Video Player in SwiftUI
- Video Playlists
- Picture in Picture
- Previewing the Camera
- Taking Photos
- Recording Video
- Splicing Videos Together
Comments