fix(content): crop NASA burned-in captions off the cosmos Orion clip
The cosmos primary is NASA/JPL's "Orion: Dust and Death" — an annotated
visualization with lower-third captions ("DUST FILAMENT", "BLUE BUBBLE", …)
burned in throughout, so trimming can't avoid them (only ~4s of our window is
caption-free). The candidate-pool doc wrongly called it text-free.
- build_pool_manifest.decaption_cosmos(): crops the cosmos base/master to the
top 66% of frame height (16:9 preserved, center-x, ~1.5x tighter framing),
re-fit to 1920x1080 — the recorded, reproducible form of the fix (media is
gitignored). Applied in place; re-ran generate_media() so the cosmos-orbit /
abyss-cosmos transitions use the cropped base.
- docs/content-candidate-pool.md: correct the "text-free" note; document the crop.
269 passed, 2 skipped. De-caption verified by-eye on both caption moments;
final look to be confirmed by the operator.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -28,15 +28,24 @@ stays non‑commercial**.
|
||||
| id | clip | source | window (s) | license / credit |
|
||||
|----|------|--------|-----------|------------------|
|
||||
| `cosmos` | Orion Nebula flythrough | NASA/JPL‑Caltech — https://images.nasa.gov/details/JPL-20221122-SOLSYSf-0001-Orion%20Dust%20and%20Death | ~30–54 | PD (17 U.S.C. §105) |
|
||||
|
||||
> ⚠️ **Orion is NOT text-free.** The source is the *annotated* "Orion: Dust and
|
||||
> Death" visualization — NASA burns lower-third captions in throughout
|
||||
> ("DUST FILAMENT", "BLUE BUBBLE", …), so trimming can't avoid them. We crop past
|
||||
> them: `simulator/build_pool_manifest.py:decaption_cosmos()` keeps the top 66% of
|
||||
> the frame (16:9 preserved, ~1.5× tighter framing) and re-fits to 1920×1080. Run
|
||||
> it ONCE after (re)sourcing the Orion clip, then re-run `generate_media()` so the
|
||||
> cosmos-orbit / abyss-cosmos transitions use the cropped base.
|
||||
| `cosmos_galaxies` | Flying Through Galaxies | NASA SVS — https://svs.gsfc.nasa.gov/vis/a010000/a014900/a014950/14950_Galaxies_FlyThrough_4k.mp4 | 8–32 | PD |
|
||||
| `cosmos_hudf` | Hubble Ultra Deep Field zoom | NASA SVS — https://svs.gsfc.nasa.gov/vis/a030000/a030600/a030687/hudf-b-1920x1080p30.mov | 20–44 | CC‑BY‑class — credit **NASA, ESA, STScI** |
|
||||
| `cosmos_xdf` | eXtreme Deep Field flythrough | NASA SVS — https://svs.gsfc.nasa.gov/vis/a030000/a030600/a030681/hxdf_fly-b-1920x1080p30.mov | 2–26 | CC‑BY‑class — credit **NASA, ESA, STScI** |
|
||||
|
||||
> ⚠️ **DISCREPANCY to fix next session.** Operator selected cosmos **#1, #3
|
||||
> (Orion), #4, #5**. During processing, **#6 Galaxy Traverse was run by mistake
|
||||
> instead of #3 Orion**. The Orion clip (#3) is text‑free and already lives at
|
||||
> instead of #3 Orion**. The Orion clip (#3) lives at
|
||||
> `simulator/sample_media/cosmos/base.mp4` (the prior real base), so the pool above
|
||||
> is correct. **`cosmos_traverse` is an UNSELECTED extra on disk — drop it** (or
|
||||
> is correct — but it carries burned-in captions (see the Orion note above; now
|
||||
> cropped out). **`cosmos_traverse` is an UNSELECTED extra on disk — drop it** (or
|
||||
> confirm with operator). The current ring scale id is `cosmos`; when the pool is
|
||||
> wired, `cosmos` becomes one pool member.
|
||||
|
||||
|
||||
@@ -408,6 +408,35 @@ def generate_media() -> None:
|
||||
print(f"generated transitions/{a}-{b}.mp4 (+ .rev) from real bases")
|
||||
|
||||
|
||||
# Fraction of frame HEIGHT kept (from the top) to drop the NASA burned-in
|
||||
# lower-third captions on the cosmos Orion clip ("DUST FILAMENT", "BLUE BUBBLE",
|
||||
# …). The "Orion: Dust and Death" visualization is captioned throughout, so
|
||||
# trimming can't avoid them — we crop past them instead. ~1.5x tighter framing.
|
||||
COSMOS_CAPTION_KEEP = 0.66
|
||||
|
||||
|
||||
def decaption_cosmos() -> None:
|
||||
"""Re-crop the cosmos Orion base/master IN PLACE to remove NASA's burned-in
|
||||
lower-third caption band, keeping 16:9 (crop width to match, center-x, top-
|
||||
anchored) then re-fitting to 1920x1080. Run ONCE after (re)sourcing the Orion
|
||||
clip — re-running would crop again. Media is gitignored, so this is the
|
||||
recorded, reproducible form of the operation."""
|
||||
ff = _ffmpeg()
|
||||
f = COSMOS_CAPTION_KEEP
|
||||
vf = f"crop=iw*{f}:ih*{f}:iw*{(1 - f) / 2}:0,scale=1920:1080"
|
||||
for name, crf in (("base", "20"), ("master", "18")):
|
||||
p = MEDIA / "cosmos" / f"{name}.mp4"
|
||||
if not p.exists():
|
||||
continue
|
||||
tmp = p.with_suffix(".decap.mp4")
|
||||
subprocess.run([
|
||||
ff, "-y", "-i", str(p), "-vf", vf,
|
||||
"-c:v", "libx264", "-crf", crf, "-pix_fmt", "yuv420p", "-an", str(tmp),
|
||||
], check=True, capture_output=True)
|
||||
tmp.replace(p)
|
||||
print(f"de-captioned cosmos/{name}.mp4 (kept top {int(f * 100)}%)")
|
||||
|
||||
|
||||
def main(argv: list[str]) -> None:
|
||||
manifest = build_manifest()
|
||||
MANIFEST.write_text(json.dumps(manifest, indent=2, ensure_ascii=False) + "\n")
|
||||
|
||||
Reference in New Issue
Block a user