saveVideo

open fun saveVideo(outputFile: File)

Initiates saving the currently-buffered frames to the specified output file. The data will be written as a .mp4 file. The call returns immediately. When the file save completes, the callback will be notified.

The file generation is performed on the encoder thread, which means we won't be draining the output buffers while this runs. It would be wise to stop submitting frames during this time.