{"action":"opened","issue":{"url":"https://api.github.com/repos/rFlex/SCRecorder/issues/402","repository_url":"https://api.github.com/repos/rFlex/SCRecorder","labels_url":"https://api.github.com/repos/rFlex/SCRecorder/issues/402/labels{/name}","comments_url":"https://api.github.com/repos/rFlex/SCRecorder/issues/402/comments","events_url":"https://api.github.com/repos/rFlex/SCRecorder/issues/402/events","html_url":"https://github.com/rFlex/SCRecorder/issues/402","id":237787206,"number":402,"title":"trying to export video with file url","user":{"login":"razan1994alali","id":20578884,"avatar_url":"https://avatars2.githubusercontent.com/u/20578884?v=3","gravatar_id":"","url":"https://api.github.com/users/razan1994alali","html_url":"https://github.com/razan1994alali","followers_url":"https://api.github.com/users/razan1994alali/followers","following_url":"https://api.github.com/users/razan1994alali/following{/other_user}","gists_url":"https://api.github.com/users/razan1994alali/gists{/gist_id}","starred_url":"https://api.github.com/users/razan1994alali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/razan1994alali/subscriptions","organizations_url":"https://api.github.com/users/razan1994alali/orgs","repos_url":"https://api.github.com/users/razan1994alali/repos","events_url":"https://api.github.com/users/razan1994alali/events{/privacy}","received_events_url":"https://api.github.com/users/razan1994alali/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-06-22T09:38:05Z","updated_at":"2017-06-22T09:38:05Z","closed_at":null,"body":"I want to add filter to an existing video I used the SCRecorder and instead of:\r\n\r\n[_player setItemByAsset:_recordSession.assetRepresentingSegments];\r\n\r\nI used : \r\n\r\n[_player setItemByUrl: videoURL];\r\n\r\nthe problem is when I'm trying to export the video this error occurs:\r\n\r\nError: Error Domain=NSURLErrorDomain Code=-1100 \"The requested URL was not found on this server.\" UserInfo={NSLocalizedDescription=The requested URL was not found on this server., NSErrorFailingURLStringKey=file:///var/mobile/Containers/Data/Application/35B1F4D9-6EE2-40DE-9745-F2DB2030DB41/Documents/1498123324.mov, NSErrorFailingURLKey=file:///var/mobile/Containers/Data/Application/35B1F4D9-6EE2-40DE-9745-F2DB2030DB41/Documents/1498123324.mov, NSURL=file:///var/mobile/Containers/Data/Application/35B1F4D9-6EE2-40DE-9745-F2DB2030DB41/Documents/1498123324.mov, NSUnderlyingError=0x174252ff0 {Error Domain=NSPOSIXErrorDomain Code=2 \"No such file or directory\"}}\r\n\r\nto export the file I used this code :\r\n\r\n- (void)saveToCameraRoll {\r\n\tNSString *fileName = videoURL.lastPathComponent;\r\n\tNSArray *dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);\r\n\tNSString *docsDir = [dirPaths objectAtIndex:0];\r\n\tNSString *videoPath = [NSString stringWithFormat:@\"%@/%@\",docsDir,fileName];\r\n\tNSURL *urlPath = [NSURL fileURLWithPath:[NSString stringWithFormat:@\"%@\", videoPath]];\r\n\tNSURL *assetUrl = urlPath;\r\n\tAVAsset *asset = [AVAsset assetWithURL:assetUrl];\r\n\tSCFilter *exportFilter = [self.filterSwitcherView.selectedFilter copy];\r\n\tSCAssetExportSession *exportSession = [[SCAssetExportSession alloc] initWithAsset:asset];\r\n\texportSession.outputUrl = assetUrl;\r\n\texportSession.videoConfiguration.filter = exportFilter;\r\n\texportSession.videoConfiguration.preset = SCPresetHighestQuality;\r\n\texportSession.audioConfiguration.preset = SCPresetHighestQuality;\r\n\texportSession.videoConfiguration.maxFrameRate = 35;\r\n\texportSession.outputFileType = AVFileTypeMPEG4;\r\n\texportSession.delegate = self;\r\n\texportSession.contextType = SCContextTypeAuto;\r\n\tself.exportSession = exportSession;\r\n\tself.exportView.hidden = NO;\r\n\tself.exportView.alpha = 0;\r\n\tCGRect frame =  self.progressView.frame;\r\n\tframe.size.width = 0;\r\n\tself.progressView.frame = frame;\r\n\t[UIView animateWithDuration:0.3 animations:^{\r\n\t\tself.exportView.alpha = 1;\r\n\t}];\r\n\t[exportSession exportAsynchronouslyWithCompletionHandler:^{\r\n\t\tif (exportSession.error == nil) {\r\n\t\t\tNSLog(@\"Success\");\r\n\t\t} else {\r\n\t\t\tNSLog(@\"Error: %@\", exportSession.error);\r\n\t\t}\r\n\t\tdispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{\r\n\t\t\t[self saveToCameraRoll];\r\n\t\t});\r\n\t}];\r\n}\r\n\r\nhow can I solve this error?\r\nthank you in advance."}}
{"actor":{"display_login":"razan1994alali"}}