Skip to content

HarnessRouter Community Edition: the self-hosted, Apache-2.0 edition of the unified interface for agent harnesses. Run Codex, Claude Code, Hermes, PI, DSH, and more through one API, with sessions, streaming, files, cancellation, and failure handling. Implements the Unified Harness Protocol (UHP), an open standard. Your keys, your infrastructure.

feat(media): layers above the cut — a clip can now ride over the film without moving it

richard-epsilla5bcd956cddda
diff --git a/gateway/app.py b/gateway/app.py
index ca5cf2f8..b1ecc239 100644
--- a/gateway/app.py
+++ b/gateway/app.py
@@ -9095,7 +9095,11 @@ _MEDIA_MCP_TOOLS = [
{"name": "set_timeline",
"description": ("The cut: which shots, in what order, at what length. ARRAY ORDER IS THE CUT "
- "ORDER — it is never inferred from where things sit on the canvas."),
+ "ORDER — it is never inferred from where things sit on the canvas. "
+ "`overlays` are layers above the cut: each names the second of the film it "
+ "appears at, so adding one never moves the shots underneath. A layer fills "
+ "the frame unless given a smaller `scale`, and the film stays as long as "
+ "its shots — a layer running past the end is trimmed."),
"inputSchema": {"type": "object", "required": ["shots"], "additionalProperties": False,
"properties": {
"shots": {"type": "array", "minItems": 1, "maxItems": 40,
@@ -9117,6 +9121,22 @@ _MEDIA_MCP_TOOLS = [
"minimum": -40,
"maximum": 6,
"default": 0}}}},
+ "overlays": {"type": "array", "maxItems": 12,
+ "items": {"type": "object",
+ "required": ["element_id", "start_s"],
+ "additionalProperties": False,
+ "properties": {
+ "element_id": {"type": "string"},
+ "start_s": {"type": "number", "minimum": 0},
+ "in_s": {"type": "number", "minimum": 0},
+ "out_s": {"type": "number", "minimum": 0},
+ "layer": {"type": "integer", "minimum": 1,
+ "maximum": 8, "default": 1},
+ "scale": {"type": "number", "minimum": 0.05,
+ "maximum": 1, "default": 1},
+ "position": {"enum": ["full", "tl", "tr",
+ "bl", "br", "center"],
+ "default": "full"}}}},
"fps": {"enum": [24, 25, 30], "default": 30},
"resolution": {"enum": ["1920x1080", "1080x1920", "1080x1080"],
"default": "1920x1080"}}}},
@@ -9693,6 +9713,7 @@ async def _media_tool_call(name: str, args: dict, hid: str, sid: str, org: str,
if name == "set_timeline":
shots_in = args.get("shots") or []
audio_in = args.get("audio") or []
+ overlays_in = args.get("overlays") or []
cap = media_plane.capability("export")
max_shots = int(cap.get("max_shots") or 40)
if len(shots_in) > max_shots:
@@ -9728,22 +9749,44 @@ async def _media_tool_call(name: str, args: dict, hid: str, sid: str, org: str,
audio = [{"elementId": str(a.get("element_id") or ""),
"startS": float(a.get("start_s") or 0.0),
"gainDb": float(a.get("gain_db") or 0.0)} for a in audio_in]
+ # A LAYER IS PLACED, NOT QUEUED. An overlay names the moment on the film's clock
+ # where it appears, so adding one never moves the shots underneath it.
+ overlays = []
+ for i, o in enumerate(overlays_in, 1):
+ eid = str(o.get("element_id") or "")
+ el = by_id.get(eid)
+ if not el:
+ warnings.append(f"Layer {i} names {eid}, which is not on the canvas.")
+ continue
+ m = media_plane.media_of(el)
+ a, b, _ = media_plane.shot_window(
+ {"inS": o.get("in_s"), "outS": o.get("out_s")}, m)
+ pos = str(o.get("position") or "full")
+ if pos not in media_plane.OVERLAY_POS:
+ warnings.append(f"Layer {i} asks to sit {pos!r}; it will fill the frame.")
+ pos = "full"
+ overlays.append({"elementId": eid, "layer": max(1, int(o.get("layer") or 1)),
+ "startS": max(0.0, float(o.get("start_s") or 0.0)),
+ "inS": a, "outS": b, "position": pos,
+ "scale": min(1.0, max(0.05, float(o.get("scale") or 1.0)))})
scene["timeline"] = {"v": 1, "fps": int(args.get("fps") or 30),
"resolution": str(args.get("resolution") or "1920x1080"),
# ARRAY ORDER IS THE CUT ORDER. Never derived from canvas
# position: dragging a card would silently re-cut the film.
- "shots": shots, "audio": audio,
+ "shots": shots, "audio": audio, "overlays": overlays,
"updatedAt": int(time.time() * 1000)}
result["total"] = media_plane.timeline_total(scene)
result["ready"] = bool(shots) and all(
media_plane.media_of(by_id.get(s["elementId"], {})).get("status") == "ready"
for s in shots)
result["n"] = len(shots)
+ result["layers"] = len(overlays)
return None
rev, _ = await _media_scene_touch(sid, mutate)
out = {"scene_rev": rev,
- "timeline": {"shots": result.get("n", 0), "fps": int(args.get("fps") or 30),
+ "timeline": {"shots": result.get("n", 0), "layers": result.get("layers", 0),
+ "fps": int(args.get("fps") or 30),
"resolution": str(args.get("resolution") or "1920x1080")},
"total_seconds": result.get("total", 0.0), "ready": bool(result.get("ready"))}
if warnings:
@@ -9807,6 +9850,26 @@ async def _media_export_start(hid: str, sid: str, org: str, entry_id: str,
for a in tl.get("audio") or []]
audio_plan = [a for a in audio_plan if a["media_id"]]
+ # The layers above the cut. A layer whose clip has not landed is refused for the same reason
+ # a shot is: half a film is not a film, and the alternative is exporting it silently missing.
+ overlay_plan: list[dict] = []
+ for i, o in enumerate(tl.get("overlays") or [], 1):
+ m = media_plane.media_of(by_id.get(o.get("elementId")) or {})
+ if not m:
+ continue # the layer names something that is not a clip
+ # STATUS FIRST. Asking for the media id first skipped every layer that had not landed
+ # yet — the export ran, succeeded, and quietly did not contain them.
+ if m.get("status") != "ready" or not m.get("mediaId"):
+ raise media_plane.ExportRefused(
+ f"Layer {i} is still rendering. Every layer has to have landed before the film "
+ f"can be cut.")
+ o_in, o_out, still = media_plane.shot_window(o, m)
+ overlay_plan.append({"media_id": str(m["mediaId"]), "in_s": o_in, "out_s": o_out,
+ "still": still, "start_s": max(0.0, float(o.get("startS") or 0.0)),
+ "layer": max(1, int(o.get("layer") or 1)),
+ "pos": str(o.get("position") or "full"),
+ "scale": float(o.get("scale") or 1.0)})
+
now = int(time.time() * 1000)
job = {"id": "mjob_" + uuid.uuid4().hex[:16], "org": org, "harness": hid, "session": sid,
"entry": entry_id, "capability": "export", "params_json": json.dumps({}), "params": {},
@@ -9817,13 +9880,14 @@ async def _media_export_start(hid: str, sid: str, org: str, entry_id: str,
"shots": len(plan), "planned_seconds": total,
"progress": f"0/{len(plan)} shots", "filename": filename or "film.mp4"}
await _media_job_save(job)
- asyncio.create_task(_media_export_run(job, plan, audio_plan, int(tl.get("fps") or 30),
+ asyncio.create_task(_media_export_run(job, plan, audio_plan, overlay_plan,
+ int(tl.get("fps") or 30),
str(tl.get("resolution") or "1920x1080")))
return job
-async def _media_export_run(job: dict, plan: list[dict], audio_plan: list[dict], fps: int,
- resolution: str) -> None:
+async def _media_export_run(job: dict, plan: list[dict], audio_plan: list[dict],
+ overlay_plan: list[dict], fps: int, resolution: str) -> None:
sid = str(job["session"])
tmp = tempfile.mkdtemp(prefix="hr-media-")
try:
@@ -9850,12 +9914,25 @@ async def _media_export_run(job: dict, plan: list[dict], audio_plan: list[dict],
path = os.path.join(tmp, f"track{j}.{meta.get('ext') or 'wav'}")
pathlib.Path(path).write_bytes(data)
tracks.append({"path": path, "start_s": a["start_s"], "gain_db": a["gain_db"]})
+ layers = []
+ for j, o in enumerate(overlay_plan):
+ meta = await _media_meta(sid, o["media_id"]) or {}
+ data = await _blob_get(_media_blob(sid, o["media_id"], str(meta.get("ext") or "mp4")),
+ kb=BLOB_KB)
+ if not data:
+ raise media_plane.ExportRefused(f"Layer {j + 1} is no longer readable.")
+ path = os.path.join(tmp, f"layer{j}.{meta.get('ext') or 'mp4'}")
+ pathlib.Path(path).write_bytes(data)
+ layers.append({**o, "path": path,
+ "has_audio": bool(media_plane.probe_file(path).get("has_audio"))})
out_path = os.path.join(tmp, "film.mp4")
info = await media_plane.to_thread(media_plane.assemble, shots, tracks, fps=fps,
- resolution=resolution, out_path=out_path)
+ resolution=resolution, out_path=out_path,
+ overlays=layers)
data = pathlib.Path(out_path).read_bytes()
await _media_job_land(job, data)
- print(f"[media] {sid}: exported {len(shots)} shots, {info['seconds']}s", flush=True)
+ print(f"[media] {sid}: exported {len(shots)} shots"
+ f"{f' + {len(layers)} layers' if layers else ''}, {info['seconds']}s", flush=True)
except Exception as e: # noqa: BLE001
job.update({"status": "failed", "error": str(e)})
await _media_job_save(job)
diff --git a/gateway/media_plane.py b/gateway/media_plane.py
index 62ad4291..070c4ba5 100644
--- a/gateway/media_plane.py
+++ b/gateway/media_plane.py
@@ -1500,14 +1500,39 @@ class ExportRefused(MediaError):
"""The film cannot be assembled, and the sentence says what would fix it."""
+# Where an overlay sits when it is not filling the frame, as a fraction of the frame, and the
+# inset that keeps a corner off the very edge. Five places, because five is what a menu can offer
+# and what the preview can draw exactly — a free-form x/y belongs to a canvas with drag handles,
+# and building the field before the handles is building a promise.
+OVERLAY_POS = {"full": None, "tl": (0.0, 0.0), "tr": (1.0, 0.0), "bl": (0.0, 1.0),
+ "br": (1.0, 1.0), "center": (0.5, 0.5)}
+OVERLAY_INSET = 0.03
+
+
+def _overlay_xy(pos: str, scale: float) -> tuple[str, str]:
+ """ffmpeg x:y for an overlay of `scale` of the frame, in one of the named places."""
+ at = OVERLAY_POS.get(pos) or OVERLAY_POS["center"]
+ fx, fy = at
+ pad = f"{OVERLAY_INSET}*W"
+ x = "(W-w)/2" if fx == 0.5 else (pad if fx == 0.0 else f"W-w-{pad}")
+ y = "(H-h)/2" if fy == 0.5 else (pad if fy == 0.0 else f"H-h-{pad}")
+ return x, y
+
+
def assemble(shots: list[dict], audio: list[dict], *, fps: int, resolution: str,
- out_path: str, on_progress=None) -> dict:
+ out_path: str, overlays: list[dict] | None = None, on_progress=None) -> dict:
"""Cut the shots together into one file. Returns {seconds, width, height, bytes}.
LETTERBOX, NEVER STRETCH. Every shot is scaled to fit inside the timeline's own declared
resolution and padded to it — not resized to whatever the first clip happened to be, which
distorts an entire film because one shot was shot in portrait.
+ THE SHOTS ARE THE FILM'S SPINE AND THE OVERLAYS SIT ON TOP OF IT. An overlay is placed at a
+ time rather than queued in an order, so adding one never moves anything underneath it — that
+ is the whole difference between a second layer and another shot. The film is as long as its
+ spine: an overlay hanging off the end is trimmed, because a layer above cannot lengthen what
+ it is layered over.
+
THEN THE OUTPUT IS PROBED AND ITS DURATION COMPARED WITH THE PLAN. A mismatch fails the job
and reports both numbers. An assembled duration nobody checks is an assembled duration nobody
notices is wrong.
@@ -1577,18 +1602,59 @@ def assemble(shots: list[dict], audio: list[dict], *, fps: int, resolution: str,
if on_progress:
on_progress(i, len(shots))
- filters.append(f"{concat_in}concat=n={len(shots)}:v=1:a=1[vout][acat]")
+ filters.append(f"{concat_in}concat=n={len(shots)}:v=1:a=1[vcat][acat]")
+
+ # ── the layers above the spine ───────────────────────────────────────────────
+ # Composited in `layer` order, so what the timeline draws on top is what ends up on top.
+ # Each one is seeked to its own in-point and then shifted to the moment on the FILM'S clock
+ # where the cut places it; `enable` keeps it off screen the rest of the time.
+ last_video, over_audio, n_in = "vcat", [], len(shots)
+ ordered = sorted(enumerate(overlays or []), key=lambda p: (int(p[1].get("layer") or 1), p[0]))
+ for j, (_, ov) in enumerate(ordered):
+ o_in = max(0.0, float(ov.get("in_s") or 0.0))
+ o_out = float(ov.get("out_s") or 0.0)
+ at = max(0.0, float(ov.get("start_s") or 0.0))
+ span = o_out - o_in
+ if span <= 0 or at >= planned:
+ continue # nothing to draw, or entirely past the end of the film
+ span = min(span, planned - at) # the spine is the film; a layer cannot extend it
+ k, n_in = n_in, n_in + 1
+ if ov.get("still"):
+ inputs += ["-loop", "1", "-t", f"{span:.3f}", "-i", ov["path"]]
+ else:
+ inputs += ["-ss", f"{o_in:.3f}", "-to", f"{o_in + span:.3f}", "-i", ov["path"]]
+ scale = min(1.0, max(0.05, float(ov.get("scale") or 1.0)))
+ pos = str(ov.get("pos") or "full")
+ box = f"{int(W * scale)}:{int(H * scale)}"
+ filters.append(f"[{k}:v]scale={box}:force_original_aspect_ratio=decrease,setsar=1,"
+ f"fps={fps},format=yuva420p,setpts=PTS-STARTPTS+{at:.3f}/TB[ov{j}]")
+ x, y = _overlay_xy(pos if scale < 1.0 else "center", scale)
+ filters.append(f"[{last_video}][ov{j}]overlay={x}:{y}:eof_action=pass:"
+ f"enable='between(t,{at:.3f},{at + span:.3f})'[vov{j}]")
+ last_video = f"vov{j}"
+ if ov.get("has_audio"):
+ over_audio.append({"input": k, "start_s": at, "gain_db": ov.get("gain_db") or 0.0})
+ filters.append(f"[{last_video}]null[vout]")
+
last_audio = "acat"
- if audio:
+ beds = list(audio or [])
+ if beds or over_audio:
mix_in = "[acat]"
- for j, tr in enumerate(audio):
- k = len(shots) + j
+ for j, tr in enumerate(beds):
+ k, n_in = n_in, n_in + 1
inputs += ["-i", tr["path"]]
delay = int(max(0.0, float(tr.get("start_s") or 0.0)) * 1000)
gain = float(tr.get("gain_db") or 0.0)
filters.append(f"[{k}:a]adelay={delay}|{delay},volume={gain}dB[m{j}]")
mix_in += f"[m{j}]"
- filters.append(f"{mix_in}amix=inputs={len(audio) + 1}:duration=first:"
+ # An overlay's own sound comes with it. A talking head dropped onto a layer that plays
+ # silent is a layer that lost half of what was dropped on it.
+ for j, tr in enumerate(over_audio):
+ delay = int(tr["start_s"] * 1000)
+ filters.append(f"[{tr['input']}:a]adelay={delay}|{delay},"
+ f"volume={float(tr['gain_db'])}dB[mo{j}]")
+ mix_in += f"[mo{j}]"
+ filters.append(f"{mix_in}amix=inputs={len(beds) + len(over_audio) + 1}:duration=first:"
f"dropout_transition=0,alimiter=limit=0.95[aout]")
last_audio = "aout"
@@ -1627,7 +1693,7 @@ def new_scene(title: str = "") -> dict:
"elements": [], "appState": {"viewBackgroundColor": "#ffffff", "gridSize": None},
"files": {},
"timeline": {"v": 1, "fps": 30, "resolution": "1920x1080", "shots": [], "audio": [],
- "updatedAt": int(time.time() * 1000)},
+ "overlays": [], "updatedAt": int(time.time() * 1000)},
"meta": {"title": title, "rev": 0}}
diff --git a/gateway/tests/test_media_mcp.py b/gateway/tests/test_media_mcp.py
index c37c916e..8ad4c586 100644
--- a/gateway/tests/test_media_mcp.py
+++ b/gateway/tests/test_media_mcp.py
@@ -2083,6 +2083,55 @@ def test_the_timeline_is_explicit_order_and_warns_honestly(client, harness, sess
assert [s["elementId"] for s in scene["timeline"]["shots"]] == [b, a]
+@needs_ffmpeg
+def test_a_layer_rides_over_the_cut_without_moving_it(client, harness, session, provider):
+ """A second layer, end to end through the agent's own tools.
+
+ Two one-second shots make a two-second film. Putting a layer over the second of them leaves
+ it a two-second film — that is the entire point of a layer, as against a third shot — and the
+ layer is stored placed at a moment rather than queued in an order.
+ """
+ tok = _cred(harness, session)
+ a, b = _two_ready_clips(client, tok, provider, session)
+ out = _ok(_call(client, tok, "set_timeline", {
+ "shots": [{"element_id": a}, {"element_id": b}],
+ "overlays": [{"element_id": a, "start_s": 1.0, "scale": 0.4, "position": "br"}],
+ "resolution": "1920x1080", "fps": 24}))
+ assert out["total_seconds"] == 2.0, out # the layer did not lengthen the film
+ assert out["timeline"]["layers"] == 1, out
+ scene = asyncio.run(app._media_scene_read(session))
+ stored = scene["timeline"]["overlays"]
+ assert stored == [{"elementId": a, "layer": 1, "startS": 1.0, "inS": 0.0, "outS": 1.0,
+ "position": "br", "scale": 0.4}], stored
+
+ job = _ok(_call(client, tok, "export_timeline", {}))
+ for _ in range(120):
+ rec = asyncio.run(app._media_job_get(job["job_id"]))
+ if rec["status"] != "running":
+ break
+ time.sleep(0.5)
+ assert rec["status"] == "succeeded", rec.get("error")
+ assert abs(rec["seconds"] - 2.0) < 0.5, rec
+
+
+def test_a_layer_that_has_not_landed_refuses_the_export_like_a_shot(client, harness, session,
+ provider):
+ """Half a film is not a film. A layer still rendering stops the export saying so, rather
+ than delivering the cut with the layer silently missing from it."""
+ tok = _cred(harness, session)
+ a, _b = _two_ready_clips(client, tok, provider, session)
+ provider.fail["dreamina-seedance-2-5-hc"] = (400, {"message": "no"})
+ pending = _ok(_call(client, tok, "generate_video", {"prompt": "later", "seconds": 6}))
+ eid = _ok(_call(client, tok, "place",
+ {"items": [{"job_id": pending["job_id"]}]}))["placed"][0]["element_id"]
+ _ok(_call(client, tok, "set_timeline", {
+ "shots": [{"element_id": a}],
+ "overlays": [{"element_id": eid, "start_s": 0.0}]}))
+ err = _call(client, tok, "export_timeline", {})
+ assert err.get("isError"), err
+ assert "Layer 1 is still rendering" in json.dumps(err), err
+
+
@needs_ffmpeg
def test_export_letterboxes_and_validates_its_own_duration(client, harness, session, provider):
"""Invariants 22 and 23. One 9:16 shot in position 1 must not distort the film, and an
@@ -2191,6 +2240,91 @@ def test_a_still_is_held_for_its_full_window_whatever_the_file_says_it_is(monkey
assert abs(float(got["seconds"]) - 3.0) < 0.25, got
+def _pixel_at(path: str, t: float, x: int, y: int) -> tuple[int, int, int]:
+ """What colour the film actually shows at a moment. Reading the picture is the only way to
+ know a layer was composited — ffmpeg exits 0 for a filter chain that drew nothing.
+
+ Straight to rawvideo: an 8x8 crop rather than 1x1, because the png encoder rejects a
+ one-pixel image outright and the test would fail for a reason that has nothing to do with
+ the film.
+ """
+ raw = subprocess.run(["ffmpeg", "-nostdin", "-v", "error", "-ss", str(t), "-i", path,
+ "-frames:v", "1", "-vf", f"crop=8:8:{x - 4}:{y - 4}",
+ "-f", "rawvideo", "-pix_fmt", "rgb24", "-"],
+ capture_output=True, check=True).stdout
+ assert raw, f"no frame at {t}s of {path}"
+ return tuple(raw[:3])
+
+
+@needs_ffmpeg
+def test_an_overlay_is_on_screen_only_while_the_cut_says_it_is():
+ """A second layer, read out of the finished film.
+
+ The spine is blue for six seconds. A red clip is laid over the middle two. Before and after
+ those two seconds the frame is blue; during them it is red — and the film is still six
+ seconds long, because a layer above cannot lengthen what it is layered over.
+ """
+ with tempfile.TemporaryDirectory() as d:
+ base = os.path.join(d, "base.mp4")
+ Path(base).write_bytes(_mp4(6.0))
+ top = os.path.join(d, "top.mp4")
+ subprocess.run(["ffmpeg", "-nostdin", "-y", "-f", "lavfi",
+ "-i", "color=c=red:s=128x72:d=2", "-c:v", "libx264", "-pix_fmt",
+ "yuv420p", "-t", "2", top], capture_output=True, check=True)
+ out = os.path.join(d, "out.mp4")
+ got = media_plane.assemble(
+ [{"path": base, "in_s": 0.0, "out_s": 6.0, "still": False}], [],
+ overlays=[{"path": top, "start_s": 2.0, "in_s": 0.0, "out_s": 2.0, "layer": 1}],
+ fps=24, resolution="320x180", out_path=out)
+ assert abs(float(got["seconds"]) - 6.0) < 0.3, got
+ mid = (160, 90)
+ before, during, after = (_pixel_at(out, 1.0, *mid), _pixel_at(out, 3.0, *mid),
+ _pixel_at(out, 5.0, *mid))
+ assert before[2] > before[0] and after[2] > after[0], (before, after) # blue spine
+ assert during[0] > during[2], during # red layer on top
+
+
+@needs_ffmpeg
+def test_an_overlay_hanging_off_the_end_is_trimmed_not_refused():
+ """The film is as long as its spine. An overlay that starts one second before the end and
+ runs for four does not produce a nine-second film with three seconds of nothing under it."""
+ with tempfile.TemporaryDirectory() as d:
+ base, top = os.path.join(d, "b.mp4"), os.path.join(d, "t.mp4")
+ Path(base).write_bytes(_mp4(3.0))
+ Path(top).write_bytes(_mp4(4.0))
+ out = os.path.join(d, "out.mp4")
+ got = media_plane.assemble(
+ [{"path": base, "in_s": 0.0, "out_s": 3.0, "still": False}], [],
+ overlays=[{"path": top, "start_s": 2.0, "in_s": 0.0, "out_s": 4.0, "layer": 1}],
+ fps=24, resolution="320x180", out_path=out)
+ assert abs(float(got["seconds"]) - 3.0) < 0.3, got
+
+
+@needs_ffmpeg
+def test_layers_composite_in_the_order_the_timeline_stacks_them():
+ """What the timeline draws on top is what ends up on top — layer 2 covers layer 1."""
+ with tempfile.TemporaryDirectory() as d:
+ base = os.path.join(d, "b.mp4")
+ Path(base).write_bytes(_mp4(3.0))
+ made = {}
+ for name, colour in (("one", "red"), ("two", "green")):
+ p = os.path.join(d, f"{name}.mp4")
+ subprocess.run(["ffmpeg", "-nostdin", "-y", "-f", "lavfi",
+ "-i", f"color=c={colour}:s=128x72:d=2", "-c:v", "libx264",
+ "-pix_fmt", "yuv420p", "-t", "2", p], capture_output=True, check=True)
+ made[name] = p
+ out = os.path.join(d, "out.mp4")
+ media_plane.assemble(
+ [{"path": base, "in_s": 0.0, "out_s": 3.0, "still": False}], [],
+ # Written in the reverse of the order they stack, so passing the list through
+ # unsorted would put red on top and fail.
+ overlays=[{"path": made["two"], "start_s": 0.0, "in_s": 0, "out_s": 2.0, "layer": 2},
+ {"path": made["one"], "start_s": 0.0, "in_s": 0, "out_s": 2.0, "layer": 1}],
+ fps=24, resolution="320x180", out_path=out)
+ px = _pixel_at(out, 1.0, 160, 90)
+ assert px[1] > px[0], px # green (layer 2) won
+
+
def test_shot_window_answers_for_a_still_the_same_way_however_the_shot_was_written():
"""The three writers that fed the export each had their own idea of a still's length: one
wrote outS 0, one left it out, one measured the file. All three mean 'hold it'."""