Record video with AVAssetWriter: first frames are black
问题 I am recording video (the user also can switch to audio only) with AVAssetWriter . I start the recording when the app is launched. But the first frames are black (or very dark). This also happens when I switch from audio to video. It feels like the AVAssetWriter and/or AVAssetWriterInput are not yet ready to record. How can I avoid this? I don't know if this is a useful info but I also use a GLKView to display the video. func start_new_record(){ do{ try self.file_writer=AVAssetWriter(url: