Closed barche75 closed 4 years ago
//there is the code
print("--- writer STARTED")
videoWriter!.start() print("--- source STARTED") videoSource?.start(progress: { _ in }, completion: { [ weak self ] completed in guard let self = self else { return } if completed { print("--- source COMPLETED") self.videoWriter?.finish { [weak self] in DispatchQueue.main.async { [weak self] in guard let self = self else { return } print("--- writer COMPLETED") let videoItem = AVPlayerItem(url: tempVideoUrl) self.videoPlayer = AVPlayer(playerItem: videoItem) self.videoPlayerLayer = AVPlayerLayer(player: self.videoPlayer) self.videoPlayerLayer!.frame = CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width - 32, height: UIScreen.main.bounds.height - 64) self.videoPlayerLayer!.videoGravity = .resizeAspect self.videoView.layer.addSublayer(self.videoPlayerLayer!) self.videoPlayer?.seek(to: .zero) self.videoPlayer!.play() self.videoWriter = nil self.videoSource = nil } } } else { print("--- source NOT COMPLETED") } })
And this is console output: --- writer STARTED --- source STARTED --- source COMPLETED
Could you please show more code (video source, video writer, filters)?
//there is the code
print("--- writer STARTED")
And this is console output: --- writer STARTED --- source STARTED --- source COMPLETED