GPUImage3
GPUImage3 copied to clipboard
MovieOutput outputs broken frame
Hi, @BradLarson , thanks for all you have been done. I'm a totally heavy user of GPUImage1-3. Recently, I ran into a problem that had been mentioned before:
https://github.com/BradLarson/GPUImage3/issues/44#issuecomment-511658802
As long as you make some work in examples > iOS > SimpleVideoRecorder, you can find it easily.
-
in ViewController, make fileURL global
-
import Photos library and add following codes in the movieOutput?.finishRecording block:
PHPhotoLibrary.shared().performChanges({() -> Void in PHAssetChangeRequest.creationRequestForAssetFromVideo(atFileURL: self.fileURL) }, completionHandler: { _, error -> Void in do { // delete the caches. try FileManager.default.removeItem(at: self.fileURL) } catch { print(error) } })
-
add "Privacy - Photo Library Usage Description" in info.plist.
Then play the output video in Photos app, broken frames randomly show on the screen (in my case, I'm using iPhone6S with iOS 13.3.1, but the same result on the case that I cast the textures from filter to CVPixelBuffer).
Any help would be appreciated. Tanks in advance.