Below Method @ 4 i write in class GPUImageWriter.m to apply multiple filter on one video, for testing purpose i just apply a single static filter on video via code in this method. for first time its working fine and write output with very high battery usage.
but when i restart app without attaching to debugger its goes crash on 40-50%, I trace that its printing log --> (Message from debugger: Terminated due to memory issue,)
1: input video properties below: length: 2min 40sec
2: I add GPUImage using Pod: (pod 'GPUImage')
3: I am calling this Method from Swift VC
call method:
@IBAction func btnEditVideo(_ sender: Any) {
let f1 = GPUImageBrightnessFilter()
let f2 = GPUImageContrastFilter()
f1.brightness = 0.5
let output = videoOutputUrl(deleteIfExist_: true)
let input = videoInputUrl()
if(FileManager.default.fileExists(atPath: input.path)){
GPUImageMovieWriter().writeVideo(input,
withFilters: [f1,f2],
asOutput: output,
progressBlock: { (progress) in
print("\(progress)")
(sender as! UIButton).setTitle("\(progress)", for: .normal)
},
successBlock: {
print("Successful")
let av = AVPlayerViewController()
av.player = AVPlayer(url: output)
self.present(av, animated: true, completion: {
})
})
{ (error) in
print("Failure: \(error)")
}
}
// performSegue(withIdentifier: "vdoEditorSegue", sender: nil)
}
Hello,
Below Method @ 4 i write in class GPUImageWriter.m to apply multiple filter on one video, for testing purpose i just apply a single static filter on video via code in this method. for first time its working fine and write output with very high battery usage.![screen shot 2017-03-06 at 2 27 39 pm](https://cloud.githubusercontent.com/assets/6511623/23608169/288db684-0279-11e7-8a89-e50c60f3e900.png)
but when i restart app without attaching to debugger its goes crash on 40-50%, I trace that its printing log --> (Message from debugger: Terminated due to memory issue,)
1: input video properties below: length: 2min 40sec
2: I add GPUImage using Pod: (pod 'GPUImage') 3: I am calling this Method from Swift VC
call method:
4: Below is Method: