From 8a1d90dc700cdd48a1e596d6ed13f9808b8a9860 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 20 Dec 2024 10:47:28 +0100 Subject: [PATCH] Fix audio desync regression --- packages/ffmpeg/src/ffmpeg-vod.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/ffmpeg/src/ffmpeg-vod.ts b/packages/ffmpeg/src/ffmpeg-vod.ts index 6fecbd1e7..62e0f480a 100644 --- a/packages/ffmpeg/src/ffmpeg-vod.ts +++ b/packages/ffmpeg/src/ffmpeg-vod.ts @@ -207,9 +207,13 @@ export class FFmpegVOD { withVideo: !options.separatedAudio || !!options.resolution }) } else { + // If we cannot copy codecs, we do not copy them at all to prevent issues like audio desync + // See for example https://github.com/Chocobozzz/PeerTube/issues/6438 await this.buildVODCommand({ ...options, + canCopyAudio: false, + canCopyVideo: false, videoStreamOnly: options.separatedAudio && !!options.resolution }) }