0

I wnat to save video on Camera Roll

self.videopath=@"/var/mobile/Applications/AE75E729-7F10-478B-9DAF-E730EB4231D1/Documents/Videos/12.mp4"

1st Approach:

UISaveVideoAtPathToSavedPhotosAlbum(self.videopath, nil, NULL, NULL);

2nd Approach:

NSURL *movieURL = [NSURL fileURLWithPath:self.videopath];


                    ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];
                 [library writeVideoAtPathToSavedPhotosAlbum:movieURL
                                             completionBlock:^(NSURL *assetURL, NSError *error){NSLog(@"complete ");}];

None of these two solution is working for me . Thanks in advance

zohaibkhan
  • 227
  • 1
  • 2
  • 12
  • possible duplicate of [How to save video from document directory to gallery?](http://stackoverflow.com/questions/17781375/how-to-save-video-from-document-directory-to-gallery) – Kartik Nov 11 '14 at 06:42
  • try with nil not NULL UISaveVideoAtPathToSavedPhotosAlbum(sourcePath,nil,nil,nil); – Kartik Nov 11 '14 at 06:43
  • @kartik Thanks for you quick response . I have already tried How to save video from document directory to gallery? thats solution but not working for me . and as you suggest UISaveVideoAtPathToSavedPhotosAlbum(sourcePath,nil,nil,nil); That one is also not working for me – zohaibkhan Nov 11 '14 at 07:04
  • check your movieURL is it making proper and file is exist at that path or not. because some time movieURL returns nil if url is not making proper. – Kartik Nov 12 '14 at 04:44
  • @kartik i can see the movie in orgainzer . and path is fine , i hav tested by playing on mpmoviecontroller from that path – zohaibkhan Nov 12 '14 at 06:32

0 Answers0