iosvideoavfoundationavplayerphotosframework

How can I determine the video playback capabilities of an iOS device?


I use an AVAssetExportSession in my iOS app to save edited videos as an mp4 file to disk. This video file can then be shared or added to the user's photo library.

The Photos framework doesn't allow to save assets to the photo library that the device isn't capable of playing back. For example, an iPad mini 2 does not support playback of video resolutions that are greater than 1080p, so such videos cannot be added on that device.

I want to make sure that the exported video can always be added to the photo library and automatically export at a lower resolution if needed.

How can I determine this limit? Can the device's video playback capabilities be queried during runtime, or are they documented somewhere?


Solution

  • An Apple engineer has confirmed that the playback capabilities cannot be determined during runtime.

    Video playback capabilities are documented on Apple's Tech Specs pages. iPhone models can be compared here.