-movflags +faststart requires ffmpeg to write moov atom at the end, which fails when SIGINT interrupts a live HLS recording — the mp4 file has no moov atom and is unplayable (0 bytes effective). Switch to -movflags +frag_keyframe+empty_moov+default_base_moof (fragmented MP4): moov atom written immediately at file start, each segment is self-contained. Even if ffmpeg is killed mid-recording, the file remains fully playable with both video and audio intact. Verified: HLS live stream (CBS News) → 45s 1280x720 h264 + AAC 48kHz, 13MB, SIGINT-safe. Local files unaffected.
StreamRecorder
Description
Languages
Swift
100%