From 879684ce25303ff4cb1cb4c8d48abebdffb96a19 Mon Sep 17 00:00:00 2001 From: Ethanfel Date: Thu, 18 Jun 2026 14:58:56 +0200 Subject: [PATCH] fix: audio extract duration for LTX-2 frame-exact clips Co-Authored-By: Claude Fable 5 --- tests/test_utils.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_utils.py b/tests/test_utils.py index 46f7877..b451151 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -484,3 +484,12 @@ def test_ffmpeg_foley_unchanged(): assert "-r" not in cmd and "-frames:v" not in cmd assert "crop=trunc" not in cmd[cmd.index("-vf")+1] + +# --- LTX-2 audio extract frame-exact duration --- + +def test_audio_extract_ltx2_duration(): + frames, fps = 201, 25 + cmd = build_audio_extract_command("/in/v.mp4", 0.0, "/out/clip_001", + duration=frames / fps) + assert "-t" in cmd + assert cmd[cmd.index("-t") + 1] == str(frames / fps)