0
使用ASIFormDataRequest将HDvideo上传到服务器。 但它需要长时间来上传。如何压缩并上传高质量视频到服务器
我的代码是
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
if (movieUrl != Nil) {
NSData *videoData = [NSData dataWithContentsOfURL:movieUrl];
[request addData:videoData withFileName:[movieUrl lastPathComponent] andContentType:@"audio/mp4" forKey:@"video"];
[request setRequestMethod:@"POST"];
//
[request setTimeOutSeconds:600];
[request setDelegate:self];
//
[request setUploadProgressDelegate:progressView];
[request startSynchronous];
其中movieurl是imagepickerdidfinish网址回报
movieUrl = (NSURL*)[info objectForKey:UIImagePickerControllerMediaURL];
如何压缩视频。 –