Got this code:
videoSize = [[AVPlayerItem playerItemWithAsset:asset] presentationSize];
// nslogs -> height: 000 width 000
And this deprecated:
videoSize = [asset naturalSize];
// nslogs -> height: 360 width 480
Why is this happening? I don't get it.
Solved:
NSArray* allVideoTracks = [movieAsset tracksWithMediaType:AVMediaTypeVideo];
if ([allVideoTracks count] > 0) {
AVAssetTrack* track = [[movieAsset tracksWithMediaType:AVMediaTypeVideo]objectAtIndex:0];
CGSize size = [track naturalSize];
}
this made my day, hope it works for someone else...