d4rk{newton_sorcerer_patema_inverted}
Summary
Each image is a "movie barcode": one pixel column per second of a film, each column filled with that second's average frame colour. The image width is the film's runtime in seconds. The task is to identify each film from its colour-over-time signature alone. The winning approach is to correlate the barcode against thumbnails of candidate films, using the exact runtime as a hard filter: archive.org generates one thumbnail per minute for every uploaded video, so for a candidate file you can reconstruct a coarse colour-per-timestamp trace and compute the normalised cross-correlation (NCC) against the barcode. A correct film scores 0.85–0.97; a wrong film scores 0.05–0.35. The gap is wide enough that there is no ambiguity once the right film is tested.
Solution / Exploit
1. What the images are
All three PNGs are 500 px tall with no metadata, no extra chunks and no trailing data. Every column is a single flat colour (vertical standard deviation is exactly 0), so the only information is one RGB value per column.
The widths (6281, 7291, 5930) look like durations in seconds — about 105, 122 and 99 minutes. That reading was confirmed later: the correct copy of each film has a file length equal to the barcode width to the second. So the task reduces to: given the mean colour of every second of a film, name the film.
| File | Width (s) | Runtime | Film |
|---|---|---|---|
| movie1.png | 6281 | 1:44:41 | Newton (2017) |
| movie2.png | 7291 | 2:01:31 | Sorcerer (1977) |
| movie3.png | 5930 | 1:38:50 | Patema Inverted (2013) |
2. The title hint
"boxdletter" is "letterboxd" with the halves swapped. The author handle pr4njal is a
Letterboxd username, and that profile has 48 watched films. One of them is Patema Inverted,
which gave the first identification. The profile only solves one of the three: Newton and
Sorcerer are not on it, and no Letterboxd account was found for the second author.
3. Building a matcher
Two public sources give roughly the same signal as the barcode for a known film without downloading it:
- archive.org generates one thumbnail per minute for every uploaded video
(
<item>.thumbs/<name>_000060.jpg,_000120.jpg, ...). The number in the filename is the timestamp in seconds. - YouTube storyboards:
yt-dlp -j <url>listsstoryboardformats, which are sprite sheets of evenly spaced frames.
For each thumbnail take the mean RGB; compare it to the barcode averaged over a few columns at the same timestamp; compute the NCC over the whole film with a small offset search to absorb different studio-logo lengths.
1def ncc(a, b):
2 a = a - a.mean(0); b = b - b.mean(0)
3 return float((a*b).sum() / (np.linalg.norm(a) * np.linalg.norm(b) + 1e-9))
4
5def score(p, times, t):
6 best = (-1, 0)
7 for off in range(-150, 151, 3): # offset search over the whole film
8 ok = [(i, int(x+off)) for i, x in enumerate(times) if 0 <= x+off < len(t)-8]
9 if len(ok) < 20: continue
10 a = np.array([t[x:x+8].mean(0) for _, x in ok]) # barcode averaged over 8 columns
11 b = p[[i for i, _ in ok]]
12 s = ncc(a, b)
13 if s > best[0]: best = (s, off)
14 return best
The archive.org matcher (boxd_ia_match.py) walks an item's metadata, keeps original video
files, and downloads every <stem>_<seconds>.jpg thumbnail concurrently:
1def item(ident, targets):
2 md = json.loads(get('https://archive.org/metadata/' + ident))
3 files = md.get('files', [])
4 vids = [f for f in files if f.get('length') and f.get('source') == 'original']
5 for v in vids:
6 L = float(v['length']) # or parse h:mm:ss
7 if not (5000 < L < 9500): continue
8 stem = v['name'].rsplit('.', 1)[0]
9 th = sorted([f['name'] for f in files if f.get('format') == 'Thumbnail'
10 and f['name'].split('/')[-1].startswith(stem.split('/')[-1] + '_')])
11 if len(th) < 40: continue
12 def one(n):
13 im = Image.open(io.BytesIO(get('https://archive.org/download/%s/%s'
14 % (ident, urllib.parse.quote(n))))).convert('RGB')
15 return np.asarray(im, dtype=np.float32).mean((0, 1))
16 with ThreadPoolExecutor(12) as ex:
17 cols = list(ex.map(one, th))
18 times = [int(re.search(r'_(\d+)\.jpg$', n).group(1)) for n in th]
19 ...
Calibration on known answers: correct film 0.85–0.97, wrong film 0.05–0.35. The YouTube
version (boxd_yt_storyboard.py) pulls the storyboard sprite sheets and tiles them into a
per-frame colour trace:
1def storyboard(vid):
2 j = json.loads(subprocess.check_output(['yt-dlp', '-j',
3 'https://www.youtube.com/watch?v=' + vid], stderr=subprocess.DEVNULL))
4 sb = [f for f in j['formats'] if f.get('format_note') == 'storyboard']
5 f = max(sb, key=lambda f: f['rows']*f['columns']*len(f['fragments']) if f['width'] <= 160 else 0)
6 cols = []; tw, th = f['width'], f['height']
7 for fr in f['fragments']:
8 im = Image.open(io.BytesIO(urllib.request.urlopen(fr['url']).read())).convert('RGB')
9 a = np.asarray(im, dtype=np.float32)
10 for r in range(a.shape[0]//th):
11 for c in range(a.shape[1]//tw):
12 cols.append(a[r*th:(r+1)*th, c*tw:(c+1)*tw].mean((0, 1)))
13 return np.array(cols), j['duration']
4. Movie 3 — Patema Inverted
Found on pr4njal's Letterboxd. Two archive.org copies are exactly 5930 s long and score 0.93 and 0.89.
5. Movie 1 — Newton
The barcode opens with a flat light block followed by a yellow-toned logo, which reads as an
Indian censor certificate and an Eros / Colour Yellow ident. Testing roughly 105-minute Hindi
films from that distributor gave Newton (2017) at 0.95–0.97 against a 6272 s YouTube
upload (LA_Vv9PEfaI).
6. Movie 2 — Sorcerer
This one took most of the time. What the barcode shows:
- 18 s of black at the start and no bright studio logos
- muted khaki and dark brown for the first 60%
- about 18 minutes of teal then deep blue at 60–72%
- olive green at 72–88%
- a second short deep-blue block, then 44 s of pure black at 92%
- only about 3 minutes of end credits
Nothing on the author's profile matched, so the search had to be done blind. The useful observation was that the barcode width equals the file length exactly, which turns runtime into a strong filter:
- Download the public IMDb dataset (
title.basics.tsv.gz,title.ratings.tsv.gz). - Keep films with a runtime of 121 or 122 minutes and at least 800 votes: 870 films.
- For each title, search archive.org and keep video files within 100 s of 7291 s.
- Score each kept file's thumbnails against the barcode.
boxd_ia_brute.py does steps 3 and 4, searching each title and keeping only copies inside
[7291-100, 7291+100]:
1titles = json.load(open(sys.argv[1]))
2LO, HI = 7291-100, 7291+100
3t2 = ia.T['movie2']
4
5def work(title):
6 m = re.match(r'(.*) \((\d{4})\)$', title)
7 name = m.group(1) if m else title
8 q = re.sub(r'[^\w\s]', ' ', name).strip()
9 ...
10 for ident in ids:
11 md = json.loads(ia.get('https://archive.org/metadata/' + ident))
12 for v in md.get('files', []):
13 if v.get('source') != 'original' or not v.get('length'): continue
14 L = plen(v)
15 if not (LO < L < HI): continue
16 ...
17 s = ia.score(np.array(cols), times, t2) # subsampled thumbs for speed
Sorcerer (William Friedkin, 1977) came out at 0.89 on a 7290.65 s file. Nothing else passed 0.36.
Full check on the finalists:
$ python3 boxd_ia_match.py -tmovie1,movie2,movie3 "Sorcerer 1977"
sorcerer-1977_202501 len 7291 1=0.08 2=0.90 3=0.21
sorcerer.-1977.1080p.-blu-ray...-rarbg len 7291 1=0.07 2=0.85 3=0.21
sorcerer-1977 (different cut) len 7215 1=0.16 2=0.65 3=0.12
Three archive.org copies of Sorcerer, each exactly 7291 s (sorcerer-1977_202501 and two
RARBG BluRay items), score 0.90 / 0.85 / 0.85; the 7215 s copy scores 0.65. Cross-checks:
Sorcerer scores 0.07 on movie1 and 0.21 on movie3. In hindsight the barcode fits the film:
the dark prologue vignettes, the night-time truck drive and rope-bridge crossing in the rain
(the blue block), and the jungle (the green).
Reproduce:
python3 boxd_ia_match.py -tmovie1,movie2,movie3 "Sorcerer 1977"
7. Flag
Titles lowercased, spaces to underscores, no years, in file order:
d4rk{newton_sorcerer_patema_inverted}
Flag(s)
d4rk{newton_sorcerer_patema_inverted}
Flag confirmed correct by the user.
Notes / Pitfalls
- Pre-built barcode galleries. About 5,400 reference barcodes were scraped from fan sites. Only Patema Inverted was in them.
- The author's Letterboxd for movies 1 and 2. Kahaani fits the runtime and sits in pr4njal's "thrillers" list, which made it a tempting wrong answer; it scores 0.15. The rest of that profile (films, watchlist, likes, list) — The Reader, A Separation, Talaash, The Witch Part 1, I Robot, Haseen Dillruba, Maquia, Darlings, Black Swan, Table No. 21 — all scored 0.1–0.3. Sorcerer is not on that profile; only Patema Inverted is.
- Accounts pr4njal follows. One had logged Newton; its ~1,300-film list had no match for movie 2.
- Guessing from the palette. The Sky Crawlers, Sympathy for Mr. Vengeance, The Ghazi Attack, Tumbbad and others all scored under 0.35.
- Wikidata. A 120–123 min list (first 700 of 3000) gave no hit.
- Wide YouTube sweep. Searching for uploads within 30 s of 7291 s found about 200 candidates, none matching.
- Subsampled scores are noisy. The brute force uses every third thumbnail and produced false scores up to 0.45–0.58; always re-run the full comparison on a candidate before believing a "ruled out".
- Validate the matcher on a known answer before trusting it. An early version of the comparison was broken and produced false exclusions.
Lessons
- Check whether image dimensions encode something. Here width = seconds, and the exact runtime was the filter that made a blind search possible.
- Validate the matcher on a known answer before trusting any "ruled out".
- Subsampled scores are noisy; always re-run the full comparison on a candidate.
- When OSINT hints run out, a public dataset plus a hard numeric filter beats guessing.