Can you tell me how iOS compresses video?

  ios, question

Need to upload video, the original video is too big, tried several compression methods are not good. May I ask the better way for Is there any? . I still hope that all great gods not stint. .
- (void)lowQuailtyWithInputURL:(NSURL*)inputURL outputURL:(NSURL*)outputURL blockHandler:(void (^)(AVAssetExportSession*))handler
bracket
AVURLAsset *asset = [AVURLAsset URLAssetWithURL:inputURL options:nil];
AVAssetExportSession *session = [[AVAssetExportSession alloc] initWithAsset:asset presetName:AVAssetExportPresetMediumQuality];
session.outputURL = outputURL;
session.outputFileType = AVFileTypeQuickTimeMovie;
session.shouldOptimizeForNetworkUse = YES;
[session exportAsynchronouslyWithCompletionHandler:^(void)
bracket
handler(session);
}];
bracket

This code does not know why compression always fails. . .

Video Slice, Segmented Compression Upload,