frame of reference: a video's dimensions, two ffprobe keys in one word
huntress ctf 2026, day 18 · metadata forensics · all three modes
tools used: archive and metadata toolkit and timed-attempt pipeline.
the prompt: "clips, previews, and screen recordings have been mixed together. use stream geometry to identify originals, crops, and the recording that could not have come from the claimed device." the single asked one field of one clip; the timed modes added it to the earlier days' fields.
the key insight: media-primary-video-dimensions names the primary video stream, as yesterday's audio field did, but dimensions is not a key a media prober prints. it is two of them, width and height, written as one value. a reader that maps the property's words to one key crashes on it; a reader that knows the composites answers it from the same probe.
challenge shape
single 1 field d18-video-001-media-primary-video-dimensions
time trial 23 fields the same field beside every earlier day's fields
mastery 115 fields five bundles of those
the question: "determine media.primary_video_dimensions for video-001.mp4", answer kind exact_text (the artifact-derived value only; the literal none when the field is absent). nothing in the question spells the shape of a dimension; the grader took the image days' form. the timed modes also carried the day's synthesis field (four named members' filenames in ascending sha-256 order, compact json).
artifact anatomy
the member is an mp4 (an ftyp box with the isom brand): one h264 video stream (320x180 pixels in every mode, at 10 frames a second, square pixels, no rotation), one aac audio stream, half a second long, a title tag on the container and an encoder tag on the video stream that names a software encoder. the stored frame and the coded frame are the same size.
extraction method
the day 17 reader took the property's last words as ffprobe's key with dashes for underscores and read it off the primary stream of that kind (hear me out). dimensions is no such key. the reader now tries, in order:
- the key as ffprobe prints it, on the stream's own fields, its tags (
encoder,language,handler_name) and its side data; - a composite built from the keys the words name:
def dimensions(stream): # the stored frame
return f"{stream['width']}x{stream['height']}"
def display_dimensions(stream): # what a player shows: width scaled by the
num, den = ratio(stream.get("sample_aspect_ratio", "1:1")) # sample aspect
if num <= 0 or den <= 0 or num == den:
return dimensions(stream)
return f"{round(stream['width'] * num / den)}x{stream['height']}"
def rotated_dimensions(stream): # after the container's rotation
if rotation_degrees(stream) % 180:
return f"{stream['height']}x{stream['width']}"
return dimensions(stream)
the other composites: the coded frame, the rotation (side data or the rotate tag), the orientation, the frame rate as a number and as the stored rational, the display aspect ratio, the duration in seconds, the codec, the pixel format, the frame count, whether the coded frame carries padding; for the container, its duration, size, major brand, title and stream count;
- a near miss: every key whose words cover the asked ones, ranked in the stream's own order (
ratereads the frame rate and the bit rate); - nothing: a crash that names the keys the stream has, so the fix is one line off that list.
validation and answer formatting
the answer is the two integers as ffprobe prints them, width first, joined with a lowercase x and nothing else: WIDTHxHEIGHT, no spaces, no px, the same serialization the jpeg and png dimension fields took on days 4 and
- by hand:
ffprobe -v error -select_streams v:0 -show_entries stream=width,height \
-of csv=s=x:p=0 video-001.mp4
a composite whose input is missing (a frame rate of an audio stream) crashes naming the input; it never reads a neighbouring key. the crop and device questions in the prompt are verdicts across clips that no key names: the reader exposes the facts a verdict needs (stored, coded, display and rotated frame, the encoder tag, the brand) and leaves the label to a handler written from the question's own words.
failed approaches and pivots
- the race: the reader crashed, the single was answered by running ffprobe by hand and reading the two numbers off its output, then the composition was typed into a handler so the timed modes could reproduce it. the hand read took 17s; the handler, 22s more. the lesson is in the tooling: the composite belongs in the reader, and a crash should show the keys that exist.
automation across modes
the time trial and the mastery asked the same property of fresh clips; the prober reads each member's own bytes, once per member.
lessons
- a property name can be a composite of a tool's keys, not one of them: when a lane asks a tool's vocabulary, prepare the composites a question would name, not only the keys the tool prints.
- a crash on a missing key should list the keys present: the fix is then a one-line composition, not a tool run.
solve times
public scoreboard · day 18 finish: 1st
- 0:18.7single#10 of 179 solvers
- 0:43.5time trial#9 of 173 solvers
- 0:45.5mastery#6 of 172 solvers
- #1team day finishof 155 teams that cleared it, in 0:45.5
- #5single orderof the day's 5, by our flag time
from the public scoreboard: 09:00 et release to our flag; the table below counts from our attempt's start.
from the mode's first attempt start to its flag (server times).
| mode | work to flag | attempts | wrong submits |
|---|---|---|---|
| single | 18.1s | 1 | 0 |
| time trial | 0.7s | 1 | 0 |
| mastery | 0.8s | 1 | 0 |
the clock
server timer of the winning attempt; used is attempt start to flag, left is what remained on the clock.
| mode | time available | time used | time left |
|---|---|---|---|
| time trial | 50.0s | 0.7s | 49.3s |
| mastery | 170.0s | 0.8s | 169.2s |
where we got stuck
- the single: the reader looked
dimensionsup as a key and crashed; the two numbers were read off ffprobe by hand and flagged at 18.1s, and the timed modes then waited 24s for the composition to be written down so they could reproduce it.
flags: single, time trial, and mastery [redacted].
{generated by a clanker}