AI Flow
Public Made by Adomby adom
Adom's AI Flow: a tool to help the AI follow all of the steps it takes to build a board.
Clip blank check says "could not read frames" on a short clip of an idle window: its seeks land after the recorder's last frame
Versions: adom-aiflow 0.2.48 with local patches that do not touch the clip code (the same blank_check is in 0.2.57 and in the repo head, commit 083ebd94) · Adom Bridge for macOS 1.9.232 · macOS (window capture through the Bridge recorder) · KiCad 10.0 · ffmpeg in the container.
What I did. A KiCad run on a Mac. step silkscreen started a window clip of the PCB editor, I ran silkscreen-audit (offline, nothing on screen), then step 3d about 3 s later stopped and pulled the clip. The editor was painted and idle the whole time.
What happened. The clip is marked suspect:
"step": "silkscreen",
"suspect": "could not read frames"
so it is left out of the video and the page says it "filmed nothing usable". The file is fine: it decodes without an error, it is byte for byte the same as the file on the Mac (sha256 matches after pull_file), and AI Flow's own contact sheet for it shows the painted editor in all nine cells.
Why. The recorder writes frames only when the window changes (AI Flow says so itself at capture open and above clip_artifacts). An idle window gives a clip with all of its frames at the head:
ffprobe -show_entries packet=pts_time,duration_time,size,flags
0.000000,0.030000,98325,K__
0.030000,1.273333,21646,___
1.303333,0.038333,132710,KD_ <- discard-flagged, not decoded
format duration = 1.303333
blank_check (crates/adom-aiflow/src/main.rs, 0.2.57 line 1532) takes media_seconds (1.303 s) and seeks with ffmpeg -ss t -i file -frames:v 1 at 0.08, 0.24, 0.41, 0.57, 0.73, 0.90, 1.06 and 1.22 s. Every seek lands after the last decodable frame (0.030 s), so each returns no pixels, total stays 0, and the verdict is could not read frames. The footage is never judged.
The same run's finish clip shows the seek gap too: frames at 0, 0.03, 1.51, 2.51, 4.01 and 5.02 s, duration 6.02 s, and the 8th sample (5.64 s) reads nothing. There it only costs one sample; on a clip shorter than about 1.5 s of an idle window it costs all of them.
Repro. Any window clip of an idle window that is stopped within a second or two on the macOS recorder; or run blank_check on a file whose last decodable frame is earlier than 1/16 of its container duration.
Expected. A clip that decodes is judged on its frames. "could not read frames" should mean a full decode found no frame.
Suggested fix. Sample by decoded frame, not by container time: for example one ffmpeg pass with the crop and scale and select or fps=8/secs, or, when a seek returns nothing, fall back to a full decode (or the last frame before that time). With a full decode this clip gives painted frames and passes 0.2.57's frame_flat. contact_sheet already samples with the fps filter, which is why the sheet shows the window while the check says it could not read it.
Image: frame 2 of the clip (t = 0.030 s), board area pixelated, with the sampling written underneath.
