Skip to content

armgit / raea

Public Imported from GitHub
0

Render Anything Engine: tell your AI what to make. Videos, motion graphics, 3D and games as React and TypeScript, rendered on your own GPU. Rust + Bevy, macOS, Linux and Windows.

check: flashing past WCAG 2.3.1 is a P1

James Dimachkie94d344e268de
diff --git a/apps/check/src/lib.rs b/apps/check/src/lib.rs
index 020eb6f0..201aa410 100644
--- a/apps/check/src/lib.rs
+++ b/apps/check/src/lib.rs
@@ -53,7 +53,7 @@ fn flag<'a>(args: &'a [String], name: &str) -> Option<&'a str> {
args.iter().position(|a| a == name).and_then(|i| args.get(i + 1)).map(String::as_str)
}
-pub const USAGE: &str = "raea check VIDEO.mp4 [--manifest render.json] [--words W.json] [--perception P.json] [--shape 16:9|9:16|4:5|1:1] [--platform tiktok|reels|shorts] [--taste taste.ts|DIR] [-o check.json] (an export against the floor: clipped text, contrast, safe areas, freezes, cues, loudness, blotching, a placeholder brand kit; P0-P3)";
+pub const USAGE: &str = "raea check VIDEO.mp4 [--manifest render.json] [--words W.json] [--perception P.json] [--shape 16:9|9:16|4:5|1:1] [--platform tiktok|reels|shorts] [--taste taste.ts|DIR] [-o check.json] (an export against the floor: clipped text, contrast, safe areas, freezes, flashing, cues, loudness, blotching, a placeholder brand kit; P0-P3)";
/// A rule from the person's taste: a form raea can measure, its value, and the taste line it stands for.
#[derive(Clone, Debug, PartialEq)]
@@ -124,6 +124,7 @@ fn run(args: &[String], tastes: Vec<raea_core_brief::Taste>) -> R<(String, bool)
sound(&video, words.as_deref(), &mut issues, &mut passed)?;
}
freezes(&video, &probe, taste_of(&taste, "still-max"), &mut issues, &mut passed)?;
+ flashing(&video, &probe, &mut issues, &mut passed)?;
blotching(&video, &probe, &mut issues, &mut passed)?;
brand_kit(&[flag(args, "--manifest").unwrap_or(""), video.as_str()], &mut issues, &mut passed);
if let Some(manifest) = &manifest {
diff --git a/apps/check/src/picture.rs b/apps/check/src/picture.rs
index b10f1ee9..28fb8e8e 100644
--- a/apps/check/src/picture.rs
+++ b/apps/check/src/picture.rs
@@ -152,3 +152,336 @@ pub(crate) fn blotching(video: &str, probe: &Probe, issues: &mut Vec<Issue>, pas
}
Ok(())
}
+
+
+/// Flashing past WCAG 2.3.1: more than three flashes in any one second, over enough of the frame to matter. A flash is a
+/// pair of opposing changes in the same pixels, so a shape sliding past isn't one. Each window, a third of the frame wide
+/// and high, stands in for WCAG's quarter of a 10-degree field (the real area depends on the screen and how far away it
+/// is, which a file doesn't say), and a quarter of its pixels must swing together: by 0.10 relative luminance with the
+/// darker end under 0.80, or by 20 of saturated red ((R-G-B)*320, where R/(R+G+B) is at least 0.8). Every decoded frame
+/// counts, on its own timestamp, and the picture is sampled twice, by area and by point, so fine patterns don't average
+/// away. A screen for review, not a Harding or PEAT certification; an interlaced picture isn't split into its fields.
+const FLASH_W: usize = 192;
+const FLASH_MOST: usize = 6;
+const FLASH_PAIR_S: f64 = 1.0 + 1e-9;
+
+struct Swing {
+ at: f64,
+ direction: f32,
+ moved: Vec<bool>,
+ plain: bool,
+ kept: bool,
+}
+
+/// One window's swings in one measure: the ones an opposite swing within a second moves back in the same pixels. The
+/// general measure leaves out swings where another quarter of the window moved the other way at once (a moving pattern).
+struct Swings {
+ by: f32,
+ under: f32,
+ mixed_counts: bool,
+ pivot: Vec<f32>,
+ extreme: Vec<f32>,
+ at: f64,
+ direction: f32,
+ recent: std::collections::VecDeque<Swing>,
+ ends: Vec<f64>,
+}
+
+impl Swings {
+ fn new(by: f32, under: f32, mixed_counts: bool) -> Swings {
+ Swings { by, under, mixed_counts, pivot: Vec::new(), extreme: Vec::new(), at: 0.0, direction: 0.0, recent: Default::default(), ends: Vec::new() }
+ }
+
+ fn moves(&self, a: f32, b: f32, direction: f32) -> bool {
+ (b - a) * direction >= self.by && a.min(b) < self.under
+ }
+
+ fn changed(&self, earlier: &[f32], later: &[f32], direction: f32) -> bool {
+ earlier.iter().zip(later).filter(|(a, b)| self.moves(**a, **b, direction)).count() * 4 >= earlier.len()
+ }
+
+ fn push(&mut self, t: f64, px: &[f32]) {
+ if self.pivot.is_empty() {
+ self.pivot = px.to_vec();
+ self.extreme = px.to_vec();
+ self.at = t;
+ return;
+ }
+ if self.direction == 0.0 {
+ for direction in [1.0, -1.0] {
+ if self.changed(&self.pivot, px, direction) {
+ self.direction = direction;
+ self.extreme = px.to_vec();
+ self.at = t;
+ break;
+ }
+ }
+ return;
+ }
+ let mean = |v: &[f32]| v.iter().sum::<f32>() / v.len() as f32;
+ if self.changed(&self.extreme, px, -self.direction) {
+ self.record();
+ self.pivot = std::mem::replace(&mut self.extreme, px.to_vec());
+ self.at = t;
+ self.direction = -self.direction;
+ } else if (mean(px) - mean(&self.extreme)) * self.direction > 0.0 && self.changed(&self.pivot, px, self.direction) {
+ self.extreme = px.to_vec();
+ }
+ }
+
+ fn record(&mut self) {
+ if !self.changed(&self.pivot, &self.extreme, self.direction) {
+ return;
+ }
+ let moved: Vec<bool> = self.pivot.iter().zip(&self.extreme).map(|(a, b)| self.moves(*a, *b, self.direction)).collect();
+ let plain = self.mixed_counts || !self.changed(&self.pivot, &self.extreme, -self.direction);
+ let (at, direction) = (self.at, self.direction);
+ let mut kept = false;
+ for other in self.recent.iter_mut().rev() {
+ if at - other.at > FLASH_PAIR_S {
+ break;
+ }
+ let same = moved.iter().zip(&other.moved).filter(|(x, y)| **x && **y).count();
+ if other.direction == -direction && same * 4 >= moved.len() {
+ other.kept = true;
+ kept = true;
+ }
+ }
+ self.recent.push_back(Swing { at, direction, moved, plain, kept });
+ while self.recent.front().is_some_and(|s| at - s.at > FLASH_PAIR_S) {
+ self.retire();
+ }
+ }
+
+ /// The oldest swing leaves the second it could still pair within; only the seconds' ends are kept for good.
+ fn retire(&mut self) {
+ if let Some(s) = self.recent.pop_front()
+ && s.plain
+ && s.kept
+ {
+ self.ends.push(s.at);
+ }
+ }
+
+ /// The most swings in any one second, and when that second starts.
+ fn busiest(&mut self) -> (usize, f64) {
+ if self.direction != 0.0 {
+ self.record();
+ self.direction = 0.0;
+ }
+ while !self.recent.is_empty() {
+ self.retire();
+ }
+ self.ends.sort_by(f64::total_cmp);
+ let (mut best, mut from, mut j) = (0, 0.0, 0);
+ for i in 0..self.ends.len() {
+ while self.ends[i] - self.ends[j] >= 1.0 - 1e-9 {
+ j += 1;
+ }
+ if i - j + 1 > best {
+ (best, from) = (i - j + 1, self.ends[j]);
+ }
+ }
+ (best, from)
+ }
+}
+
+/// Frames of two pictures side by side, each `w` by `h` RGB: the area sample and the point sample of one frame.
+pub(crate) struct FlashScreen {
+ w: usize,
+ h: usize,
+ last: Vec<u8>,
+ linear: Vec<f32>,
+ luma: Vec<f32>,
+ red: Vec<f32>,
+ cut: Vec<f32>,
+ windows: Vec<(usize, usize, Swings, Swings)>,
+}
+
+impl FlashScreen {
+ pub(crate) fn new(w: usize, h: usize) -> FlashScreen {
+ let (ww, wh) = (w / 3, h / 3);
+ let places = |size: usize, window: usize| {
+ let mut at: Vec<usize> = (0..=size - window).step_by((size / 6).max(1)).collect();
+ at.push(size - window);
+ at.dedup();
+ at
+ };
+ let mut windows = Vec::new();
+ for sample in 0..2 {
+ for &y in &places(h, wh) {
+ for &x in &places(w, ww) {
+ windows.push((x + sample * w, y, Swings::new(0.10, 0.80, false), Swings::new(20.0, f32::INFINITY, true)));
+ }
+ }
+ }
+ let linear = (0..=255u32)
+ .map(|c| {
+ let c = c as f32 / 255.0;
+ if c <= 0.04045 { c / 12.92 } else { ((c + 0.055) / 1.055).powf(2.4) }
+ })
+ .collect();
+ FlashScreen { w, h, last: Vec::new(), linear, luma: Vec::new(), red: Vec::new(), cut: Vec::new(), windows }
+ }
+
+ pub(crate) fn push(&mut self, rgb: &[u8], t: f64) {
+ if rgb == self.last {
+ return;
+ }
+ self.luma.clear();
+ self.red.clear();
+ for px in rgb.chunks_exact(3) {
+ let (r, g, b) = (self.linear[px[0] as usize], self.linear[px[1] as usize], self.linear[px[2] as usize]);
+ self.luma.push(0.2126 * r + 0.7152 * g + 0.0722 * b);
+ let sum = r + g + b + 1e-9;
+ self.red.push(if r / sum >= 0.8 { ((r - g - b) * 320.0).max(0.0) } else { 0.0 });
+ }
+ let (stride, ww, wh) = (self.w * 2, self.w / 3, self.h / 3);
+ for (x, y, general, saturated) in &mut self.windows {
+ self.cut.clear();
+ for r in 0..wh {
+ self.cut.extend_from_slice(&self.luma[(*y + r) * stride + *x..][..ww]);
+ }
+ general.push(t, &self.cut);
+ self.cut.clear();
+ for r in 0..wh {
+ self.cut.extend_from_slice(&self.red[(*y + r) * stride + *x..][..ww]);
+ }
+ saturated.push(t, &self.cut);
+ }
+ self.last.clear();
+ self.last.extend_from_slice(rgb);
+ }
+
+ /// (swings in the worst second, when it starts, which measure) when past the limit
+ pub(crate) fn finish(mut self) -> Option<(usize, f64, &'static str)> {
+ let mut worst: Option<(usize, f64, &'static str)> = None;
+ for (_, _, general, saturated) in &mut self.windows {
+ for (swings, kind) in [(general, "general"), (saturated, "red")] {
+ let (n, from) = swings.busiest();
+ if n > FLASH_MOST && worst.is_none_or(|w| n > w.0) {
+ worst = Some((n, from, kind));
+ }
+ }
+ }
+ worst
+ }
+}
+
+/// Every decoded frame, once: -fps_mode from FFmpeg 5.1 on, -vsync before it.
+fn passthrough() -> [&'static str; 2] {
+ let head = Command::new("ffmpeg").args(["-hide_banner", "-version"]).output().map(|o| String::from_utf8_lossy(&o.stdout).into_owned()).unwrap_or_default();
+ let version = head.split("version ").nth(1).and_then(|v| {
+ let mut parts = v.trim_start_matches('n').split(|c: char| !c.is_ascii_digit());
+ Some((parts.next()?.parse::<u32>().ok()?, parts.next()?.parse::<u32>().ok()?))
+ });
+ [if version.is_some_and(|v| v < (5, 1)) { "-vsync" } else { "-fps_mode" }, "passthrough"]
+}
+
+/// A frame's number and time from showinfo's log, exact: its `pts` in ticks of the time base. `pts_time` is rounded to six
+/// significant digits, which is enough to push a legal third flash across the one-second line.
+pub(crate) fn showinfo_frame(line: &str, base: Option<(i64, i64)>) -> Option<(usize, f64)> {
+ let rest = line.split(" n:").nth(1)?;
+ let n = rest.split_whitespace().next()?.parse().ok()?;
+ let pts: i64 = rest.split("pts:").nth(1)?.split_whitespace().next()?.parse().ok()?;
+ let (num, den) = base?;
+ Some((n, pts as f64 * num as f64 / den as f64))
+}
+
+pub(crate) fn showinfo_base(line: &str) -> Option<(i64, i64)> {
+ let (num, den) = line.split("config in time_base:").nth(1)?.split(',').next()?.trim().split_once('/')?;
+ Some((num.parse().ok()?, den.parse().ok()?))
+}
+
+/// A line's severity under `-loglevel level+`: the first bracket after any `[context @ address]`. Searching the whole line
+/// would take a file's own metadata for an error when its title happens to say one.
+pub(crate) fn log_level(line: &str) -> Option<&str> {
+ let mut rest = line.trim_start();
+ if rest.starts_with('[') && rest[..rest.find(']')?].contains(" @ ") {
+ rest = rest[rest.find(']')? + 1..].trim_start();
+ }
+ let rest = rest.strip_prefix('[')?;
+ Some(&rest[..rest.find(']')?])
+}
+
+pub(crate) fn flashing(video: &str, probe: &Probe, issues: &mut Vec<Issue>, passed: &mut Vec<String>) -> R<()> {
+ let w = FLASH_W;
+ let h = (((w as f64 * probe.h / probe.w.max(1.0)) / 2.0).round() as usize * 2).max(6);
+ let graph = format!("showinfo,split=2[area][point];[area]scale={w}:{h}:flags=area[a];[point]scale={w}:{h}:flags=neighbor[b];[a][b]hstack=inputs=2,format=rgb24");
+ let sync = passthrough();
+ let mut child = Command::new("ffmpeg")
+ .args(["-hide_banner", "-nostats", "-nostdin", "-loglevel", "level+info", "-i", video, "-map", "0:v:0", "-vf", &graph, sync[0], sync[1], "-f", "rawvideo", "-"])
+ .stdin(std::process::Stdio::null())
+ .stdout(std::process::Stdio::piped())
+ .stderr(std::process::Stdio::piped())
+ .spawn()
+ .map_err(|e| format!("ffmpeg: {e}"))?;
+ let mut out = child.stdout.take().unwrap();
+ let err = child.stderr.take().unwrap();
+ let (times, clock) = std::sync::mpsc::channel();
+ // read apart from the frames, so that neither pipe can fill while the other is being waited on
+ let log = std::thread::spawn(move || {
+ let mut err = std::io::BufReader::new(err);
+ let (mut line, mut base, mut errors, mut first) = (Vec::new(), None, 0usize, String::new());
+ while std::io::BufRead::read_until(&mut err, b'\n', &mut line).is_ok_and(|n| n > 0) {
+ let text = String::from_utf8_lossy(&line);
+ if matches!(log_level(&text), Some("error" | "fatal" | "panic")) {
+ errors += 1;
+ if first.is_empty() {
+ first = text.trim().to_string();
+ }
+ } else if text.trim_start().starts_with("[Parsed_showinfo") {
+ base = showinfo_base(&text).or(base);
+ if let Some(frame) = showinfo_frame(&text, base) {
+ let _ = times.send(frame);
+ }
+ }
+ line.clear();
+ }
+ (errors, first)
+ });
+ let mut screen = FlashScreen::new(w, h);
+ let mut buf = vec![0u8; w * 2 * h * 3];
+ let mut frames = 0;
+ let mut lost = false;
+ while std::io::Read::read_exact(&mut out, &mut buf).is_ok() {
+ // the frame's own line is written before its pixels, so one that doesn't come isn't going to
+ match clock.recv_timeout(std::time::Duration::from_secs(60)) {
+ Ok((n, t)) if n == frames => screen.push(&buf, t),
+ _ => {
+ lost = true;
+ let _ = child.kill();
+ break;
+ }
+ }
+ frames += 1;
+ }
+ drop(out);
+ let status = child.wait().map_err(|e| format!("ffmpeg: {e}"))?;
+ let (errors, first) = log.join().unwrap_or_default();
+ if lost {
+ return Err(format!("{video}: flashing can't be screened, frame {frames} has no timestamp of its own"));
+ }
+ if !status.success() || frames == 0 {
+ return Err(format!("{video}: flashing can't be screened, FFmpeg decoded {frames} frames ({first})"));
+ }
+ if errors > 0 {
+ issues.push(Issue {
+ rule: "decode",
+ p: 1,
+ at: None,
+ says: format!("FFmpeg hit {errors} errors decoding the picture, so it may be damaged and flashing was only screened on what decoded: {first}"),
+ });
+ }
+ match screen.finish() {
+ Some((swings, at, kind)) => issues.push(Issue {
+ rule: "flash",
+ p: 1,
+ at: Some(at),
+ says: format!("{swings} opposing {kind} changes in one second, past WCAG 2.3.1's limit of 3 flashes (6 changes); flashing like this can cause seizures: slow it, shrink it or lower its contrast"),
+ }),
+ None if errors == 0 => passed.push("flashing: no more than 3 flashes a second found (a screen, not a certification)".to_string()),
+ None => {}
+ }
+ Ok(())
+}
diff --git a/apps/check/src/tests.rs b/apps/check/src/tests.rs
index b9b0970b..c15c4c1a 100644
--- a/apps/check/src/tests.rs
+++ b/apps/check/src/tests.rs
@@ -274,3 +274,100 @@ fn a_sign_the_camera_carries_off_isnt_clipped_but_a_title_held_off_is() {
let rules: Vec<_> = issues.iter().map(|i| (i.rule, i.says.split('”').next().unwrap().trim_start_matches('“').to_string())).collect();
assert_eq!(rules, vec![("safe-area", "THE NIGHT MARKET".to_string()), ("clipped", "WIDE".to_string())]);
}
+
+/// a 96x54 picture drawn by `paint(frame index, sample, x, y)`, sample 0 the area sample and 1 the point sample, for
+/// `frames` frames at `fps`
+fn flash_samples(frames: usize, fps: f64, paint: impl Fn(usize, usize, usize, usize) -> [u8; 3]) -> Option<(usize, f64, &'static str)> {
+ let (w, h) = (96, 54);
+ let mut screen = FlashScreen::new(w, h);
+ for f in 0..frames {
+ let mut rgb = Vec::with_capacity(w * 2 * h * 3);
+ for y in 0..h {
+ for sample in 0..2 {
+ for x in 0..w {
+ rgb.extend_from_slice(&paint(f, sample, x, y));
+ }
+ }
+ }
+ screen.push(&rgb, f as f64 / fps);
+ }
+ screen.finish()
+}
+
+fn flash_of(seconds: usize, paint: impl Fn(usize, usize, usize) -> [u8; 3]) -> Option<(usize, f64, &'static str)> {
+ flash_samples(seconds * 60, 60.0, move |f, _, x, y| paint(f, x, y))
+}
+
+/// two colours taking turns `hz` times a second, over a box of the frame
+fn turns(hz: usize, on: [u8; 3], off: [u8; 3], bx: (usize, usize, usize, usize)) -> Option<(usize, f64, &'static str)> {
+ flash_of(3, move |f, x, y| {
+ let inside = x >= bx.0 && x < bx.0 + bx.2 && y >= bx.1 && y < bx.1 + bx.3;
+ if inside && f * hz * 2 / 60 % 2 == 0 { on } else { off }
+ })
+}
+
+#[test]
+fn flashing_is_found_past_three_a_second_and_not_at_it() {
+ let (white, black) = ([255, 255, 255], [0, 0, 0]);
+ let all = (0, 0, 96, 54);
+ assert_eq!(turns(3, white, black, all), None, "three a second is the limit, not past it");
+ let (swings, _, kind) = turns(4, white, black, all).expect("four a second");
+ assert_eq!((swings / 2, kind), (4, "general"));
+ // a small box: under a quarter of any window, and then over it
+ assert_eq!(turns(5, white, black, (40, 20, 10, 10)), None);
+ assert!(turns(5, white, black, (30, 18, 32, 18)).is_some());
+ // too small a change, and both ends too bright for WCAG to count it
+ assert_eq!(turns(5, [60, 60, 60], [30, 30, 30], all), None);
+ assert_eq!(turns(5, [255, 255, 255], [235, 235, 235], all), None);
+ // a dark saturated red: too dim to count as a general flash, past the limit as a red one
+ assert_eq!(turns(5, [150, 0, 0], black, all).map(|t| t.2), Some("red"));
+}
+
+#[test]
+fn a_flash_of_single_frames_counts_at_any_frame_rate() {
+ // 120 fps with one white frame in every 30: four flashes a second, each gone within a sixtieth of a second
+ let found = flash_samples(360, 120.0, |f, _, _, _| if f % 30 == 1 { [255, 255, 255] } else { [0, 0, 0] });
+ assert_eq!(found.map(|(swings, _, kind)| (swings / 2, kind)), Some((4, "general")));
+}
+
+#[test]
+fn a_flash_the_area_sample_averages_away_is_found_in_the_point_sample() {
+ let found = flash_samples(180, 60.0, |f, sample, _, _| {
+ if sample == 0 {
+ return [128, 128, 128];
+ }
+ if f * 5 * 2 / 60 % 2 == 0 { [255, 255, 255] } else { [0, 0, 0] }
+ });
+ assert!(found.is_some(), "the same flash in the point sample alone");
+}
+
+#[test]
+fn a_frame_gets_its_exact_time_from_the_log() {
+ // lines FFmpeg 9.0.2 logged with -loglevel level+info
+ let base = showinfo_base("[Parsed_showinfo_0 @ 000001] [info] config in time_base: 1/15360, frame_rate: 30/1");
+ assert_eq!(base, Some((1, 15360)));
+ let line = "[Parsed_showinfo_0 @ 000001] [info] n: 12 pts: 6144 pts_time:0.4 duration: 512 fmt:yuv420p";
+ assert_eq!(showinfo_frame(line, base), Some((12, 0.4)));
+ // rounded to six significant digits at long times: the ticks stay exact
+ let late = "[Parsed_showinfo_0 @ 000001] [info] n:40000 pts:20480512 pts_time:1333.37 duration: 512";
+ assert_eq!(showinfo_frame(late, base), Some((40000, 20480512.0 / 15360.0)));
+ assert_eq!(showinfo_frame(line, None), None);
+ assert_eq!(showinfo_frame("[info] frame= 300 fps=0.0", base), None);
+}
+
+#[test]
+fn only_a_lines_own_severity_counts_as_an_error() {
+ assert_eq!(log_level("[h264 @ 000001] [error] error while decoding MB 3 5"), Some("error"));
+ assert_eq!(log_level("[error] Conversion failed!"), Some("error"));
+ assert_eq!(log_level("[Parsed_showinfo_0 @ 000001] [info] n: 0 pts: 0"), Some("info"));
+ // a file's own metadata, which FFmpeg prints back at info
+ assert_eq!(log_level("[info] title : [error] harmless title"), Some("info"));
+ assert_eq!(log_level("frame= 300 fps=0.0"), None);
+}
+
+#[test]
+fn a_shape_sliding_past_and_ordinary_cuts_are_not_flashing() {
+ let (white, black) = ([255, 255, 255], [0, 0, 0]);
+ assert_eq!(flash_of(3, move |f, x, _| if x < f { white } else { black }), None, "one wipe across the frame");
+ assert_eq!(flash_of(4, move |f, _, _| if (f / 30) % 2 == 0 { white } else { black }), None, "a cut every half second");
+}
diff --git a/sdk/guides/craft/floor.md b/sdk/guides/craft/floor.md
index e092c889..c23ebb92 100644
--- a/sdk/guides/craft/floor.md
+++ b/sdk/guides/craft/floor.md
@@ -18,6 +18,8 @@ Before you say a piece is done, every line here is true of the last render, not
right 84; Shorts: top 120, bottom 300, right 96). A 4:5 feed frame needs top 110, bottom 170, sides 60; a 1:1 frame
top 70, bottom 120, sides 60; 16:9 top and bottom 120, sides 60. These zones are only where text can't go. Where it
should go is a design choice.
+- **Nothing flashes past the limit.** No more than three flashes in any one second over a sizable part of the frame
+ (WCAG 2.3.1): past that, flashing can cause seizures. A strobe or a fast flicker needs slowing, shrinking or less contrast.
- **Cues land on their words.** A cut, a move or a caption tied to speech starts on the word, timed from the
transcript's word times. Never place one by eye or at a fixed tempo.
- **Every name the voice says is on screen when it says it.** If the narration says "the brief", the brief is visible.
diff --git a/sdk/guides/craft/motion/rendering.md b/sdk/guides/craft/motion/rendering.md
index e79e3d60..5a0300b8 100644
--- a/sdk/guides/craft/motion/rendering.md
+++ b/sdk/guides/craft/motion/rendering.md
@@ -6,7 +6,7 @@
`raea render edit.tsx -o final.mp4 --manifest render.json` and
`raea check final.mp4 --manifest render.json --words words.json --perception perception.json [--platform tiktok]`.
It measures clipped text, text under a platform's buttons, text over the face, captions on too briefly to read,
- caption contrast against the pixels behind them, frozen stretches, cues that miss their word, loudness, a sound that
+ caption contrast against the pixels behind them, frozen stretches, flashing past the limit, cues that miss their word, loudness, a sound that
stops dead or (with `--words`) fights the voice, and encoder blotching in the darks. Each finding is ranked P0 to P3
with its fix; it exits 1 while a P0 or P1 stands, and `-o check.json` writes them for the critique. An
exception in the composition (an unclamped value going NaN, keyframes out of order, a phrase `word()` can't find, a
diff --git a/sdk/guides/craft/rubric.md b/sdk/guides/craft/rubric.md
index 8e64dc7b..eef3827a 100644
--- a/sdk/guides/craft/rubric.md
+++ b/sdk/guides/craft/rubric.md
@@ -3,7 +3,7 @@
A critique has three parts, and the person sees all three on one test item in the feed:
1. **Measured.** `raea check` on the export: clipped text, text under a platform's buttons, captions too brief to
- read, caption contrast, frozen stretches, cues off their words, loudness, blotching in the darks. These are facts;
+ read, caption contrast, frozen stretches, flashing past the limit, cues off their words, loudness, blotching in the darks. These are facts;
a P0 or P1 among them is never argued with.
2. **Judged.** The decision model watches the export (its first minute, with sound) and rates it on the questions
below, each on five levels: poor, weak, acceptable, strong, excellent. It reads the brief's facts and the
diff --git a/sdk/skills/raea/reference/cli.md b/sdk/skills/raea/reference/cli.md
index ee7b5513..d79ece06 100644
--- a/sdk/skills/raea/reference/cli.md
+++ b/sdk/skills/raea/reference/cli.md
@@ -162,7 +162,7 @@ Access: HEADLESS. Arguments besides flags: 1.
```
raea check EDIT.tsx --quick [--shape S] [--platform P] [--taste T] [-o check.json] (three stills of a composition checked for text: clipped, cramped, safe areas, sizes; about a second)
-raea check VIDEO.mp4 [--manifest render.json] [--words W.json] [--perception P.json] [--shape 16:9|9:16|4:5|1:1] [--platform tiktok|reels|shorts] [--taste taste.ts|DIR] [-o check.json] (an export against the floor: clipped text, contrast, safe areas, freezes, cues, loudness, blotching, a placeholder brand kit; P0-P3)
+raea check VIDEO.mp4 [--manifest render.json] [--words W.json] [--perception P.json] [--shape 16:9|9:16|4:5|1:1] [--platform tiktok|reels|shorts] [--taste taste.ts|DIR] [-o check.json] (an export against the floor: clipped text, contrast, safe areas, freezes, flashing, cues, loudness, blotching, a placeholder brand kit; P0-P3)
```
Flags: `--manifest` (1), `--perception` (1), `--platform` (1), `--quick`, `--shape` (1), `--taste` (1), `--words` (1), `-o` (1).