AVAssetExportSession exportAsynchronouslyWithCompletionHandler: Source frame unsupported format

Viewed 160

I am using AVAssetExportSession to export a video selected from library. It works great for all videos of all types except landscape-recorded screen recordings (using the screen recording feature in iOS 11). Weird enough, it works perfectly for other landscape videos, and it also works perfectly for portrait videos of the same screen recording feature. But I've tried two videos that are landscape screen recordings, and they both failed with the error Source frame unsupported format.

How can I fix this problem?

UPDATE: Videos play just fine both in Photos and in my app before exporting.

1 Answers

The video size may not be standard like 1920 X 1080 , The screen recording produce non standard video resolutions in some devices.

You need to write the videos in standard resolution while recording

Related