feat(pipeline): frame stage ffmpeg arg builder (content pipeline §3.2)

This commit is contained in:
BenStullsBets
2026-06-24 07:53:28 -07:00
parent 750e87eb0b
commit 642451925f
3 changed files with 52 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
from tools.pipeline.ffmpeg_ops import frame_args
def test_frame_args_trims_scales_pads_and_strips_audio():
args = frame_args(
"src.mp4", "out.mp4",
start=2.0, duration=8.0, width=1920, height=1080, ff="ffmpeg",
)
assert args[0] == "ffmpeg"
assert "-ss" in args and args[args.index("-ss") + 1] == "2.0"
assert "-t" in args and args[args.index("-t") + 1] == "8.0"
assert "-an" in args # audio stripped (bases are video-only)
vf = args[args.index("-vf") + 1]
assert "scale=1920:1080:force_original_aspect_ratio=decrease" in vf
assert "pad=1920:1080" in vf
assert "format=yuv420p" in vf
assert args[-1] == "out.mp4"