fix: re-encode audio to AAC instead of copy for mp4 compatibility

-c copy may produce mp4 files with AC3/DTS/FLAC audio that macOS
AVPlayer cannot decode, resulting in silent playback.
Change to -c:v copy -c:a aac -b:a 192k to preserve video quality
while ensuring universally playable audio.
This commit is contained in:
yumoqing 2026-06-29 23:51:19 +08:00
parent 7d89a332ff
commit 7263f2d837

View File

@ -56,7 +56,9 @@ public final class FFmpegRecorder: StreamRecorderEngine {
args += ["-t", String(duration)]
}
args += [
"-c", "copy",
"-c:v", "copy",
"-c:a", "aac",
"-b:a", "192k",
"-movflags", "+faststart",
outputPath
]