Closed t3b123 closed 2 years ago
Can you send me the original video?
I don't have the video because this is from a user. However, it to do with editing a video. Once you edit the video and you are trying to export it. it creates this type of issue. I think its the way how the video being exported creates this issue.
Is there a way to reproduce this issue?
one of the user said he saved the video from tiktok. so i think its the way the video being formatted. just a note, when I was talking to the user he said the preview its fine even if he edit the video. but as soon as he hit "Finish" it will say processing failed. or some users will get half screen video like the one above
So the problem occurs on the file called VideoEditorViewController+ToolView.swift it seems like the error happens here // if videoURL != nil { // ProgressHUD.hide(forView: self?.view, animated: true) // self?.editFinishCallBack(urlConfig) // self?.backAction() // }else { // self?.showErrorHUD() THIS IS what makes the processing fails // }
Maybe its to do with the url or the way you export the video is wrong
The location of the problem is found, the next version will fix this problem
You can modify the code in this place of the source code to solve this problem first
Line 71 of CustomVideoCompositionInstruction.swift
guard let instruction = request.videoCompositionInstruction as? CustomVideoCompositionInstruction,
let trackID = instruction.requiredSourceTrackIDs?.first as? CMPersistentTrackID,
let pixelBuffer = request.sourceFrame(byTrackID: trackID) else {
return nil
}
change into
guard let instruction = request.videoCompositionInstruction as? CustomVideoCompositionInstruction,
let trackID = instruction.requiredSourceTrackIDs?.first as? CMPersistentTrackID else {
return nil
}
guard let pixelBuffer = request.sourceFrame(byTrackID: trackID) else {
return renderContext?.newPixelBuffer()
}
Sometime when a user select a video and they want to export the video they will get a video like the one above.