Avasset
AVAsset | AVAssetTrack
Intro
Syntax
Retrieve Media Metadata
Extract Media Codec information
apple dev | formatDescriptions
SO | retrieving codec iOS
Another SO
video size
import AVKit
import Foundation
extension AVAsset {
func videoSize() async throws -> CGSize? {
guard let track = try await loadTracks(withMediaType: .video).first else { return nil }
let size = try await track.load(.naturalSize)
return size
}
}