How to create a anAudioSampleBuffer for CMSampleBufferGetFormatDescription in iOS Swift
问题 I have been working on video compression in iOS Swift, and following this SO's answer. It is working fine until I change this piece of code's file format to .mp4 let videoWriter = try! AVAssetWriter(outputURL: outputURL as URL, fileType: AVFileType.mov) There are reasons that I need the output in .mp4 file format. So when I do that it crashes the app. And gives me this error, 2020-04-27 18:20:52.573614+0500 BrightCaster[7847:1513728] *** Terminating app due to uncaught exception