找了好久都找不到重点,废话不多少,上代码,希望能帮到你
AVURLAsset*asset = [AVURLAssetassetWithURL: [NSURL URLWithString: url]]
NSArray * array = asset.tracks
CGSize videoSize = CGSizeZero
forAVAssetTrack *trackinarray {
if[track.mediaType isEqualToString: AVMediaTypeVideo] {
videoSize = track.naturalSize
}
}
videoSize 就告诉了你宽和高,至于下来怎么做我想不必多说了