I'm currently trying to use UIVideoEditorViewController
to trim a video file previously selected from the Photos app by using UIImagePickerController
. I verified that after choosing the file and before creating UIVideoEditorViewController
the file has the original resolution. However, after trimming the video, the output is always in 360p resolution despite setting the videoQuality
property to high
. All the applicable settings seem to be ignored for this property and the video ends up being compressed unnecessarily.
I have found multiple people reporting similar issues but yet have to find a workaround for this.
let editor = UIVideoEditorController()
editor.delegate = self
editor.videoMaximumDuration = 0 // No limit for now
// TODO: This should really work, however while testing it seems like the imported videos are always scaled down
// to 320p which equivalents the default value of .low.
editor.videoQuality = .typeHigh
editor.videoPath = internalURL.path
Any help would be greatly appreciated.