Note that there are some explanatory texts on larger screens.

plurals
  1. POUIImagepickercontroller: converting to low quality video error
    primarykey
    data
    text
    <p>I am getting inputurl <code>[info objectForKey:UIImagePickerControllerMediaURL]</code> from UIImagepickercontroller's <code>didFinishPickingMediaWithInfo</code>'s method. </p> <pre><code>NSURL *inputURL = [NSURL URLWithString:inputurlstring]; </code></pre> <p>I am giving outputurl from this code </p> <pre><code> NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *videoPath = [NSString stringWithFormat:@"%@/%@", documentsDirectory,@"capturedvideo.MOV"]; NSURL *outputURL = [NSURL fileURLWithPath:videoPath]; </code></pre> <p>I used the following code to get low quality video </p> <pre><code> - (void)convertVideoToLowQuailtyWithInputURL:(NSURL*)inputURL outputURL:(NSURL*)outputURL handler:(void (^)(AVAssetExportSession*))handler { [[NSFileManager defaultManager] removeItemAtURL:outputURL error:nil]; AVURLAsset *asset = [AVURLAsset URLAssetWithURL:inputURL options:nil]; AVAssetExportSession *exportSession = [[AVAssetExportSession alloc] initWithAsset:asset presetName:AVAssetExportPresetLowQuality]; exportSession.outputURL = outputURL; exportSession.outputFileType = AVFileTypeQuickTimeMovie; [exportSession exportAsynchronouslyWithCompletionHandler:^(void) { if (exportSession.status == AVAssetExportSessionStatusCompleted) { printf("completed\n"); } else { printf("error\n"); NSLog(@"error is %@",exportSession.error); } }]; } </code></pre> <p>I am getting following error when I use large files only. Because when I use small size video file I did not get any error.</p> <pre><code>Error Domain=NSURLErrorDomain Code=-1 "unknown error" UserInfo=0x616d890 {NSErrorFailingURLStringKey=/private/var/mobile/Applications/EE1E6701-EED0-4830-BD1D-7366680713C0/tmp//trim.7mL7VS.MOV, NSErrorFailingURLKey=/private/var/mobile/Applications/EE1E6701-EED0-4830-BD1D-7366680713C0/tmp//trim.7mL7VS.MOV, NSLocalizedDescription=unknown error, NSUnderlyingError=0x2d1460 "The operation couldn’t be completed. (OSStatus error -12935.)", NSURL=/private/var/mobile/Applications/EE1E6701-EED0-4830-BD1D-7366680713C0/tmp//trim.7mL7VS.MOV} </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload