yumoqing 68806e1190 fix: use fragmented MP4 for crash-safe HLS live stream recording
-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.
2026-06-29 23:58:31 +08:00
2026-06-28 17:48:50 +08:00

StreamRecorder

Description
No description provided
Readme 78 KiB
Languages
Swift 100%