Note that there are some explanatory texts on larger screens.

plurals
  1. POios 7 video saving issue
    primarykey
    data
    text
    <p>Im saving the video to photolibrary.Its works for previous ios ,In ios 7 videoAtPathIsCompatibleWithSavedPhotosAlbum this line allways false</p> <p>here is my code any one can help me.</p> <pre><code>NSString *myPathDocs = [documentsDirectory stringByAppendingPathComponent:@"NewmergeVideo.mov"]; BOOL fileExists = [[NSFileManager defaultManager] fileExistsAtPath:myPathDocs]; if (fileExists) { [[NSFileManager defaultManager] removeItemAtPath: myPathDocs error:NULL]; } NSURL *url = [NSURL fileURLWithPath:myPathDocs]; NSLog(@"%@",url); AVAssetExportSession *exporter = [[AVAssetExportSession alloc] initWithAsset:mixComposition presetName:AVAssetExportPresetHighestQuality]; exporter.outputURL=url; //[exporter setVideoComposition:MainCompositionInst]; exporter.outputFileType = AVFileTypeQuickTimeMovie; [exporter exportAsynchronouslyWithCompletionHandler:^ { dispatch_async(dispatch_get_main_queue(), ^{ [self _exportDidFinish:exporter]; }); }]; </code></pre> <p>here is save code</p> <pre><code>- (void)_exportDidFinish:(AVAssetExportSession*)session { NSURL *outputURL = session.outputURL; ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init]; NSLog(@"%@",outputURL); if ([library videoAtPathIsCompatibleWithSavedPhotosAlbum:outputURL]) { [library writeVideoAtPathToSavedPhotosAlbum:outputURL completionBlock:^(NSURL *assetURL, NSError *error){ dispatch_async(dispatch_get_main_queue(), ^{ if (error) { NSLog(@"writeVideoToAssestsLibrary failed: %@", error); }else{ NSLog(@"Writing3"); } }); }]; } [library release]; } </code></pre> <p>in previous ios nsurl file://localhost/var/mobile/Applications/99B72CBA-A426-4F04-B7B2-2B61F0B0C513/Documents/NewmergeVideo.mov</p> <p>in ios 7 nsurl file:///var/mobile/Applications/791244EE-771B-46C9-BD57-BA0BE6CACD3C/Documents/NewmergeVideo.mov</p>
    singulars
    1. This table or related slice is empty.
    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.
    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