Give it a script, a shot plan or just a topic; get back film clips, photos and recordings
from archive.org that fit each beat, saved in source/<identifier>/, with a contact
sheet per film and a refs/sources.md that says why each one is public domain. Free:
archive.org's public catalog needs no account or key. Everything runs locally through
hn4a's exec; no model is needed.
1. List what each beat needs
From the script, write per beat: the subject (a person, a place, an event, a mood), the era, and what kind of asset would carry it (moving film, a still, a period recording). Name real people exactly. Mark the beats where only a stand-in is possible.
2. Know the rights rule before searching (US, recompute each year)
Archive.org's "public domain" labels are often wrong: check the date and the kind of work yourself, and record the evidence.
| Kind | Public domain in year Y if |
|---|---|
| Films, photos, books, printed music, compositions | published in or before Y − 96 (2026: 1930 and earlier) |
| Sound recordings (78s, cylinders) | published in or before Y − 101 (2026: 1925 and earlier) |
| Any year | US federal government work (for example National Archives films) |
| 1931–1963 works | only with evidence the copyright was not renewed (Prelinger Archives ephemera is a common case); note the evidence |
- A film's soundtrack goes with the film, but the song it plays has its own date: a 1940s short of a 1931 song carries that song's copyright. Use the picture, and put different public-domain music under it.
- The 78rpm collections hold many records published after 1925 that are labelled public domain: leave those out.
3. Search the catalog
Archive.org's catalog search is the advancedsearch.php page on archive.org, which
returns JSON for a query (q), the fields asked for (fl[]), a row count (rows) and
output=json. Ask for identifier, title, date, mediatype, licenseurl and collection, and
print one line per result. Run several queries in one turn. Queries that worked:
- By title and date:
title:("black and tan") AND mediatype:movies - By subject and era:
jazz AND mediatype:movies AND date:[1900-01-01 TO 1930-12-31] - By collection:
collection:prelinger AND (soundie OR swing). National Archives Ford films appear asfc-fc-*, Library of Congress recordings asloc-jukebox-*, dated 78s as<year>-USA-Archives-*. - Audio by tune:
title:("maple leaf rag") AND mediatype:audio AND date:[1890-01-01 TO 1925-12-31] - Places:
(new orleans) AND date:[1890-01-01 TO 1925-12-31] AND mediatype:(movies OR image)
Images are thin on archive.org for many topics (searches return maps and modern photos); expect film frames to stand in for stills.
4. Save the chosen items
hn4a's yt-dlp reads archive.org item pages and picks the item's main video or audio file:
exec("yt-dlp", ["-o", "source/%(id)s/original.%(ext)s", "https://archive.org/details/<identifier>"], cwd=<job>, wait=false)
Start every item at once; eleven items (1.2 GB) took about 6 minutes. To see what it will
fetch first, add --simulate --print "%(id)s %(ext)s %(filesize)s". Keep each item's
page URL, date and license field for the sources file.
5. Look before choosing
Make a contact sheet per film: 36 frames evenly spaced, each labelled with its time
(ffmpeg -ss t -frames:v 1 -vf scale=320:-2, tiled with Pillow), and read it. Then pull
a strip of frames every 2 s around each moment you plan to use, to find where the shot
really starts and ends.
What the sheets caught on one job:
- National Archives Ford films open with a 7 s slate: start at 8.4 s or later.
- A "locomotive" timestamp from the sheet landed on a coal tipple 4 s later; a strip at 2 s steps found the train at 112–117 s.
- Some "films" are a still of a record label for the whole length: useful as audio only.
- Pillarboxed 1920x1080 transfers hold a 4:3 picture:
cropdetect=24:2:0finds it.
6. Match honestly and record
- Never caption someone who isn't on screen. When no public-domain footage of a person exists, say so to the person and use performance film labelled "Illustrative", or credit who is really there.
- Avoid footage that would mislead under the line it plays under.
- Write
refs/sources.md: per asset, what it's used for, the item URL, the year, and why it's public domain (which row of the rule above).
Check it
Every asset in refs/sources.md passes a row of the rule with its evidence; every planned
moment was seen on a strip; nothing captioned as a person shows someone else.


