This project demonstrates how to trim a video using AVAssetExportSession
Project includes functionalities like
- Video preview.
- Select video from photo library or record a new one (using
PHPickerViewControllerfor new iOS versions andUIImagePickerControllerfor old iOS versions) - Trim video and save video to Photos Library
- Now the maximum time of video is limited to 2.5 minutes, can change it using
trimmerView.maxDuration = 200
Thanks to PryntTrimmerView for trim view
- Icons are system icons so they won't be available in lower iOS versions.
- Not tested in lower iOS versions. (tested above iOS 14*)