ios獲取視頻寬高比分辨率以及旋轉角度

AVAsset *asset = [AVAsset assetWithURL:url];  
       NSArray *tracks = [asset tracksWithMediaType:AVMediaTypeVideo];  
       if([tracks count] > 0) {  
           AVAssetTrack *videoTrack = [tracks objectAtIndex:0];  
           CGAffineTransform t = videoTrack.preferredTransform;//這裏的矩陣有旋轉角度,轉換一下便可  
           NSLog(@"=====hello  width:%f===height:%f",videoTrack.naturalSize.width,videoTrack.naturalSize.height);//寬高
相關文章
相關標籤/搜索