We use the standard MP4v2 library combined with custom functions to generate MP4 files from video. However, in the case of abnormal power failure, MP4 files will be damaged and cannot be played. We want to save data to files in real time or every few seconds, including moov format information, so that MP4 files can be used normally when power failure occurs. Is there any good way? Thank you