From 78cebdc857a8eb4fe23f049280b1369b64b9c222 Mon Sep 17 00:00:00 2001 From: Miguel Angel Simon Sierra Date: Fri, 30 Oct 2026 05:04:04 -0400 Subject: [PATCH] test(engine): the rotated-clip fixture builds on ffmpeg older than 6 --- .../src/services/videoFrameExtractor.test.ts | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/packages/engine/src/services/videoFrameExtractor.test.ts b/packages/engine/src/services/videoFrameExtractor.test.ts index c3240ab21f..304a854262 100644 --- a/packages/engine/src/services/videoFrameExtractor.test.ts +++ b/packages/engine/src/services/videoFrameExtractor.test.ts @@ -4446,18 +4446,11 @@ describe.skipIf(!HAS_FFMPEG)("a clip stored on a non-square pixel grid", () => { it("keeps the display shape of a rotated clip, whose autorotate swaps the pixel aspect", async () => { const rotated = join(FIXTURE_DIR, "rotated.mp4"); - const synth = await runFfmpeg([ - "-y", - "-v", - "error", - "-display_rotation:v:0", - "90", - "-i", - SOURCE, - "-c", - "copy", - rotated, - ]); + // `-display_rotation` is an ffmpeg 6 input option; older builds take the same rotation as metadata. + const rotateWith = (args: string[]) => + runFfmpeg(["-y", "-v", "error", ...args, "-c", "copy", rotated]); + let synth = await rotateWith(["-display_rotation:v:0", "90", "-i", SOURCE]); + if (!synth.success) synth = await rotateWith(["-i", SOURCE, "-metadata:s:v:0", "rotate=90"]); expect(synth.success).toBe(true); const outDir = join(FIXTURE_DIR, "out-rot"); mkdirSync(outDir, { recursive: true });