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];
如何壓縮視頻。 –