Sweep: crop the timecode band off published streams (re-encode after decode); vgdeband.sh catch-up

The published recording is the game picture + audio + tmcd track, nothing else. Streams without the
band are still remuxed losslessly. vgstrip plan exports TC_BAND and marks the sidecar band_removed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
2026-11-01 13:05:35 -06:00
parent bb09565388
commit 2cd936beaf
8 changed files with 91 additions and 18 deletions

View File

@@ -162,6 +162,11 @@ def plan(path, arrival_ms=None, tz="America/New_York"):
else:
t0 = None; src = "none"
out = {"source": src, "fps": r.get("fps"), "drift_ms": r.get("drift_ms", 0), "samples": r.get("samples", [])}
if src == "strip":
# the band is removed (cropped off in a re-encode) by the sweep once it has been decoded; record it
_, band = geometry(r["width"]) if r.get("width") else geometry(probe(path)[0])
out.update({"band_rows": band, "band_removed": True})
print(f"TC_BAND={band}")
try:
out["gaps"] = find_gaps(path, r.get("fps") or 60.0)
except Exception:
@@ -181,4 +186,6 @@ if __name__ == "__main__":
if len(sys.argv) < 2: print(__doc__); sys.exit(2)
if sys.argv[1] == "plan":
plan(sys.argv[2], int(sys.argv[3]) if len(sys.argv) > 3 and sys.argv[3] else None); sys.exit(0)
if sys.argv[1] == "band": # band rows for a canvas width (vgdeband.sh)
print(geometry(int(sys.argv[2]))[1]); sys.exit(0)
print(json.dumps(analyse(sys.argv[1]), indent=2))