Python
Twitch reaction clips: keyless Twitch streams and chat, auto facecam, react layout with box and outline titles
Bodila5167acdb4391fa
diff --git a/README.md b/README.mdindex 4dea872..c7d93c8 100644--- a/README.md+++ b/README.md@@ -8,7 +8,7 @@<p align="center">GTA 6 is about to break the internet. Claude Code watches the biggest streams, catches the second chat explodes and hands you a ready-to-post vertical clip. Campaigns pay per 1,000 views. You just hit post.</p>-<p align="center"><img src="https://img.shields.io/badge/Claude_Code-plugin-e8457f" alt="Claude Code: plugin"> <img src="https://img.shields.io/badge/skills-15-e8457f" alt="skills: 15"> <img src="https://img.shields.io/badge/clips-1080x1920-e8457f" alt="clips: 1080x1920"> <img src="https://img.shields.io/badge/languages-5-e8457f" alt="languages: 5"></p>+<p align="center"><img src="https://img.shields.io/badge/Claude_Code-plugin-e8457f" alt="Claude Code: plugin"> <img src="https://img.shields.io/badge/skills-16-e8457f" alt="skills: 16"> <img src="https://img.shields.io/badge/clips-1080x1920-e8457f" alt="clips: 1080x1920"> <img src="https://img.shields.io/badge/languages-5-e8457f" alt="languages: 5"></p><p align="center"><img src="https://img.shields.io/badge/GTA_6-Nov_19-e8457f" alt="GTA 6: Nov 19"> <img src="https://img.shields.io/badge/license-MIT-e8457f" alt="license: MIT"></p><p align="center"><sub>Unofficial fan project. Not affiliated with Rockstar Games, Take-Two or Anthropic.</sub></p><p align="center"><a href="#first-run-paste-this-into-claude-code">Quick start</a> · <a href="#two-ways-to-make-money">Make money</a> · <a href="#whats-inside">Skills</a> · <a href="#the-rules-that-make-clips-win">Clip rules</a> · <a href="#run-the-scripts-yourself">Scripts</a></p>@@ -59,6 +59,7 @@ No income is promised. Your result depends on speed, picks and hooks, and the sc| `stream-finder` | Who is streaming GTA 6 right now, ranked by viewers || `moment-finder` | Best 15 to 40 s moments, scored by loudness spikes, hype words, YouTube "most replayed" and chat spikes || `live-mode` | Records a live stream and cuts a clip every time chat explodes |+| `twitch-reaction` | Reaction clips like the viral ones: the streamer's face on top, the game below, a big title on the seam. Finds the top GTA 6 Twitch streams with no account, reads chat and finds the webcam by itself || `clip-cutter` | 1080x1920 clip: word-by-word captions, hook box, credit line, -14 LUFS. Fill, blurred background or facecam on top || `hook-writer` | 3 hook options per clip || `rule-check` | Length, format, credit, hashtags and banned content checked before you post |diff --git a/requirements.txt b/requirements.txtindex 682c894..4fc5a73 100644--- a/requirements.txt+++ b/requirements.txt@@ -4,3 +4,4 @@ requests>=2.31yt-dlp[default]>=2026.10.26deep-translator>=1.11edge-tts>=6.1+opencv-python-headless>=4.9diff --git a/scripts/cut.py b/scripts/cut.pyindex fd04a0a..8f38584 100644--- a/scripts/cut.py+++ b/scripts/cut.py@@ -3,8 +3,8 @@1080x1920, 30 fps, word-by-word burned captions, hook box in the first seconds, credit line,loudness normalised to -14 LUFS. Writes jobs/<id>/edits/clip_<n>.mp4 + .json (metadata for check.py).-usage: python cut.py jobs/<id> --pick 1 [--layout fill|blur|facecam] [--hook "TEXT"] [--credit "@creator"]- [--cam x:y:w:h] (facecam box as fractions of the source frame, default bottom-right 0.70:0.68:0.30:0.32)+usage: python cut.py jobs/<id> --pick 1 [--layout fill|blur|facecam|react] [--hook "TEXT"] [--credit "@creator"]+ [--cam auto|x:y:w:h] [--title "TEXT" --title-style box|outline --title-secs 0] [--captions word|bubble|none]"""import argparse, sysfrom pathlib import Path@@ -23,7 +23,17 @@ def esc(s):return s.replace("\\", "").replace("{", "(").replace("}", ")").replace("\n", " ")-def build_ass(words, s0, e0, hook, credit, cap_y):+def wrap(text, width):+ lines, cur = [], ''+ for wd in text.split():+ if cur and len(cur) + 1 + len(wd) > width:+ lines.append(cur); cur = wd+ else:+ cur = (cur + ' ' + wd).strip()+ return lines + ([cur] if cur else [])+++def build_ass(words, s0, e0, hook, credit, cap_y, title=None, caps='word'):hdr = f"""[Script Info]ScriptType: v4.00+PlayResX: {W}@@ -35,6 +45,9 @@ Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour,Style: Cap,Arial Black,92,&H00FFFFFF,&H0000E5FF,&H00000000,&H64000000,-1,0,0,0,100,100,0,0,1,7,3,5,60,60,0,1Style: Hook,Arial Black,68,&H00000000,&H00000000,&H00FFFFFF,&H00FFFFFF,-1,0,0,0,100,100,0,0,3,18,0,8,70,70,170,1Style: Credit,Arial,40,&H00FFFFFF,&H00FFFFFF,&H00000000,&H78000000,-1,0,0,0,100,100,0,0,1,3,1,2,40,40,90,1+Style: TitleBox,Arial Black,66,&H00000000,&H00000000,&H00FFFFFF,&H00FFFFFF,-1,0,0,0,100,100,0,0,1,0,0,5,40,40,0,1+Style: TitleOut,Arial Black,80,&H00FFFFFF,&H00FFFFFF,&H00000000,&H64000000,-1,0,0,0,100,100,0,0,1,9,2,8,50,50,0,1+Style: Bubble,Arial,58,&H00000000,&H00000000,&H00FFFFFF,&H00FFFFFF,-1,0,0,0,100,100,0,0,3,16,0,5,60,60,0,1[Events]Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text@@ -62,7 +75,23 @@ Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Textt = esc(x["w"].upper())parts.append("{\\c&H0000E5FF&}" + t + "{\\c&H00FFFFFF&}" if j == k else t)pop = "{\\fscx112\\fscy112\\t(0,90,\\fscx100\\fscy100)}" if k == 0 else ""+ if caps == 'bubble':+ if k == 0:+ txt = esc(' '.join(x['w'] for x in g)).strip()+ txt = txt[:1].upper() + txt[1:]+ ev.append(f"Dialogue: 0,{ts(a)},{ts(g_end - s0)},Bubble,,0,0,0,,{{\\pos({W // 2},{cap_y})}}{pop}{txt}")+ continueev.append(f"Dialogue: 0,{ts(a)},{ts(b)},Cap,,0,0,0,,{{\\pos({W // 2},{cap_y})}}{pop}{' '.join(parts)}")+ if title: # reaction title: (style, text, y, seconds)+ st, text, ty, secs = title+ end = (e0 - s0) if secs <= 0 else secs+ lines = wrap(esc(text), 26 if st == 'box' else 24)+ body = '\\N'.join(lines)+ if st == 'box':+ ev.append(f"Dialogue: 2,{ts(0)},{ts(end)},TitleBox,,0,0,0,,{{\\pos({W // 2},{ty})}}{body}")+ else:+ ev.append(f"Dialogue: 2,{ts(0)},{ts(end)},TitleOut,,0,0,0,,{{\\pos({W // 2},{ty})\\an8}}{body}")+ hook = ''if hook:ev.append(f"Dialogue: 1,{ts(0)},{ts(hook_end)},Hook,,0,0,0,,{{\\fad(0,180)\\fscx92\\fscy92\\t(0,120,\\fscx100\\fscy100)}}{esc(hook)}")if credit:@@ -70,16 +99,26 @@ Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Textreturn hdr + "\n".join(ev) + "\n"-CAP_Y = {"fill": 1380, "blur": 1460, "facecam": 1120}+CAP_Y = {"fill": 1380, "blur": 1460, "facecam": 1120, "react": 1560}+TOP = int(H * 0.38) # react layout: facecam height-def video_filter(layout, cam, ass):+def video_filter(layout, cam, ass, band=None, cam_side='right'):"""Layout + burned-caption filter graph ending in [vo]. Reused by translate.py."""if layout == "fill":v = f"[0:v]scale=-2:{H},crop={W}:{H}[v]"elif layout == "blur":v = (f"[0:v]split[a][b];[a]scale=-2:{H},crop={W}:{H},boxblur=24:2,eq=brightness=-0.08[bg];"f"[b]scale={W}:-2[fg];[bg][fg]overlay=(W-w)/2:(H-h)/2-80[v]")+ elif layout == 'react':+ x, y, w, h = map(float, cam.split(':'))+ gx = 'iw-ow' if cam_side == 'left' else '0' # crop the gameplay away from the webcam corner+ v = (f"[0:v]split[a][b];[a]crop=iw*{w}:ih*{h}:iw*{x}:ih*{y},scale={W}:{TOP}:force_original_aspect_ratio=increase,"+ f"crop={W}:{TOP}[cam];[b]scale=-2:{H - TOP},crop={W}:{H - TOP}:{gx}:0[game];[cam][game]vstack[v]")+ if band:+ y0, bh, secs = band+ en = f":enable='lte(t,{secs})'" if secs > 0 else ''+ v = v[:-3] + f"[v0];[v0]drawbox=x=0:y={y0}:w=iw:h={bh}:color=white@1:t=fill{en}[v]"else:x, y, w, h = map(float, cam.split(":"))v = (f"[0:v]split[a][b];[a]crop=iw*{w}:ih*{h}:iw*{x}:ih*{y},scale={W}:{int(H * 0.38)}:force_original_aspect_ratio=increase,"@@ -91,9 +130,13 @@ def video_filter(layout, cam, ass):def main():ap = argparse.ArgumentParser()ap.add_argument("job"); ap.add_argument("--pick", type=int, default=1)- ap.add_argument("--layout", choices=["fill", "blur", "facecam"], default="blur")+ ap.add_argument("--layout", choices=["fill", "blur", "facecam", "react"], default="blur")+ ap.add_argument("--title", default="", help="reaction title, e.g. 'Speed REALIZED why GTA 6 took 13 YEARS'")+ ap.add_argument("--title-style", choices=["box", "outline"], default="box")+ ap.add_argument("--title-secs", type=float, default=0, help="0 = whole clip")+ ap.add_argument("--captions", choices=["word", "bubble", "none"], default="word")ap.add_argument("--hook", default=""); ap.add_argument("--credit", default="")- ap.add_argument("--cam", default="0.70:0.68:0.30:0.32")+ ap.add_argument("--cam", default="auto", help="auto (find the webcam) or x:y:w:h fractions")ap.add_argument("--start", type=float); ap.add_argument("--end", type=float)a = ap.parse_args()d = Path(a.job); c = load_json(d / "candidates.json")@@ -101,17 +144,46 @@ def main():s0 = a.start if a.start is not None else pick["start"]; e0 = a.end if a.end is not None else pick["end"]words = load_json(d / "transcript.json")out = d / "edits"; out.mkdir(exist_ok=True)- cap_y = CAP_Y[a.layout]+ layout, cam, side = a.layout, a.cam, 'right'+ if layout in ('react', 'facecam') and cam == 'auto':+ from facecam import find_cam+ r = find_cam(c['source'], s0, e0)+ if r.get('mode') in ('cam', 'face'):+ bx = list(r['box'])+ if r['mode'] == 'face': # no webcam frame: widen the face crop so it is not a blurry close-up+ cx, cy = bx[0] + bx[2] / 2, bx[1] + bx[3] / 2+ bw, bh = min(1.0, bx[2] * 2.6), min(1.0, bx[3] * 2.2)+ bx = [min(max(0.0, cx - bw / 2), 1 - bw), min(max(0.0, cy - bh / 2), 1 - bh), bw, bh]+ cam = ':'.join(f'{v:.4f}' for v in bx)+ side = 'left' if r['box'][0] + r['box'][2] / 2 < 0.5 else 'right'+ print(f"facecam: {r.get('mode')} box {cam} ({r.get('summary', '')})")+ else:+ print(f"facecam: no stable face found ({r.get('reason', '')}), using the blur layout")+ layout = 'blur'+ elif layout in ('react', 'facecam') and cam != 'auto':+ side = 'left' if float(cam.split(':')[0]) + float(cam.split(':')[2]) / 2 < 0.5 else 'right'+ cap_y = CAP_Y[layout]+ title, band = None, None+ if a.title and layout == 'react':+ n = len(wrap(a.title, 26 if a.title_style == 'box' else 24))+ if a.title_style == 'box':+ bh = n * 78 + 44+ band = (TOP - bh // 2, bh, a.title_secs)+ title = ('box', a.title, TOP, a.title_secs)+ else:+ title = ('outline', a.title, TOP + 40, a.title_secs)ass = out / f"clip_{a.pick}.ass"- ass.write_text(build_ass(words, s0, e0, a.hook, a.credit, cap_y), encoding="utf-8")- v = video_filter(a.layout, a.cam, ass)+ caps = a.captions+ cap_words = words if caps != 'none' else []+ ass.write_text(build_ass(cap_words, s0, e0, a.hook, a.credit, cap_y, title=title, caps=caps), encoding="utf-8")+ v = video_filter(layout, cam, ass, band=band, cam_side=side)mp4 = out / f"clip_{a.pick}.mp4"run([tool("ffmpeg"), "-y", "-v", "error", "-ss", f"{s0:.2f}", "-to", f"{e0:.2f}", "-i", c["source"],"-filter_complex", v, "-map", "[vo]", "-map", "0:a?", "-af", "loudnorm=I=-14:TP=-1.5:LRA=11","-c:v", "libx264", "-preset", "medium", "-crf", "20", "-pix_fmt", "yuv420p", "-c:a", "aac", "-b:a", "160k","-ar", "48000", "-movflags", "+faststart", str(mp4)])info = c.get("info", {})- save_json(out / f"clip_{a.pick}.json", {"file": str(mp4), "start": s0, "end": e0, "layout": a.layout, "hook": a.hook,+ save_json(out / f"clip_{a.pick}.json", {"file": str(mp4), "start": s0, "end": e0, "layout": layout, "hook": a.hook or a.title, "title": a.title, "cam": cam,"credit": a.credit, "source_url": info.get("webpage_url"), "source_title": info.get("title"),"source_channel": info.get("channel") or info.get("uploader")})print(mp4)diff --git a/scripts/facecam.py b/scripts/facecam.pynew file mode 100644index 0000000..2316b82--- /dev/null+++ b/scripts/facecam.py@@ -0,0 +1,297 @@+"""Find the streamer's webcam box in a video.++usage: python facecam.py <video> [--start S --end E] [--json out.json] [--debug out.jpg]+importable: find_cam(video, start=None, end=None) -> dict++Returns one of+ {"mode":"cam", "box":[x,y,w,h] (fractions of the frame), "face":[x,y,w,h], "confidence":0..1, "reason":...}+ {"mode":"face", "box":[...], ...} no clean rectangle, tight 16:9-ish crop around the face+ {"mode":"none", "reason":...} no stable face: callers should fall back to the blur layout+Fractions plug straight into cut.py --cam x:y:w:h.++Method: YuNet face detection on ~12 sampled frames, keep the face cluster that stays at the same spot in most+frames (in-game faces move). Then grow a rectangle around that face using a median-of-frames edge map:+the webcam border is a straight, static line, so its edge response survives the median while gameplay edges blur out.+"""+import argparse, json, os, subprocess, sys, urllib.request+from pathlib import Path++import cv2+import numpy as np++MODEL_URL = "https://github.com/opencv/opencv_zoo/raw/main/models/face_detection_yunet/face_detection_yunet_2023mar.onnx"+MODEL = Path(os.environ.get("LOCALAPPDATA", Path.home() / ".cache")) / "gtavi-claudecode" / "models" / "face_detection_yunet_2023mar.onnx"+N_FRAMES = 12+MAX_W = 1280 # analysis width+++def model_path():+ if not MODEL.exists() or MODEL.stat().st_size < 100_000:+ MODEL.parent.mkdir(parents=True, exist_ok=True)+ tmp = MODEL.with_suffix(".part")+ urllib.request.urlretrieve(MODEL_URL, tmp)+ tmp.replace(MODEL)+ return str(MODEL)+++def duration(video):+ cap = cv2.VideoCapture(str(video))+ n = cap.get(cv2.CAP_PROP_FRAME_COUNT); fps = cap.get(cv2.CAP_PROP_FPS) or 30+ cap.release()+ return n / fps if n > 0 else 0+++def sample_frames(video, start, end, n=N_FRAMES):+ """Grab n frames evenly across [start,end] with cv2 (seek by time)."""+ dur = duration(video)+ s = max(0.0, start or 0.0)+ e = min(end if end is not None else dur, dur) if dur else (end or s + 20)+ if e <= s:+ e = s + 1+ cap = cv2.VideoCapture(str(video))+ frames = []+ for i in range(n):+ t = s + (e - s) * (i + 0.5) / n+ cap.set(cv2.CAP_PROP_POS_MSEC, t * 1000)+ ok, f = cap.read()+ if ok and f is not None:+ h, w = f.shape[:2]+ if w > MAX_W:+ f = cv2.resize(f, (MAX_W, int(h * MAX_W / w)), interpolation=cv2.INTER_AREA)+ frames.append(f)+ cap.release()+ return frames+++def detect_faces(frames):+ det = cv2.FaceDetectorYN.create(model_path(), "", (320, 320), 0.7, 0.3, 5000)+ out = []+ for f in frames:+ h, w = f.shape[:2]+ det.setInputSize((w, h))+ _, faces = det.detect(f)+ out.append([] if faces is None else [tuple(map(float, r[:4])) + (float(r[14]),) for r in faces])+ return out+++def iou(a, b):+ ax2, ay2, bx2, by2 = a[0] + a[2], a[1] + a[3], b[0] + b[2], b[1] + b[3]+ iw = max(0, min(ax2, bx2) - max(a[0], b[0])); ih = max(0, min(ay2, by2) - max(a[1], b[1]))+ inter = iw * ih+ return inter / (a[2] * a[3] + b[2] * b[3] - inter + 1e-9)+++def stable_face(dets, n):+ """Cluster detections by position; return (median face box, hits) of the best stable cluster."""+ best = None+ flat = [(i, d) for i, ds in enumerate(dets) for d in ds]+ for _, seed in flat:+ members = {}+ for i, d in flat:+ # same webcam face: centre within ~1.3 face widths (streamers sway) and similar size+ dx = (seed[0] + seed[2] / 2) - (d[0] + d[2] / 2); dy = (seed[1] + seed[3] / 2) - (d[1] + d[3] / 2)+ if (dx * dx + dy * dy) ** 0.5 < 1.3 * max(seed[2], d[2]) and 0.6 < d[2] / seed[2] < 1.67:+ if i not in members or d[4] > members[i][4]:+ members[i] = d+ if best is None or len(members) > len(best):+ best = members+ if not best:+ return None, 0+ arr = np.array(list(best.values()))+ return np.median(arr[:, :4], axis=0), len(best)+++def edge_map(frames):+ """Median over frames of gradient magnitude per frame: keeps only static edges."""+ gs = []+ for f in frames:+ g = cv2.cvtColor(f, cv2.COLOR_BGR2GRAY)+ g = cv2.GaussianBlur(g, (3, 3), 0)+ gx = cv2.Sobel(g, cv2.CV_32F, 1, 0, ksize=3); gy = cv2.Sobel(g, cv2.CV_32F, 0, 1, ksize=3)+ gs.append((gx, gy))+ mx = np.median(np.abs([a for a, _ in gs]), axis=0)+ my = np.median(np.abs([b for _, b in gs]), axis=0)+ # edges are 2-3 px thick after scaling: take the max over 1 px neighbours across the edge direction+ mx = np.maximum(mx, np.maximum(np.roll(mx, 1, 1), np.roll(mx, -1, 1)))+ my = np.maximum(my, np.maximum(np.roll(my, 1, 0), np.roll(my, -1, 0)))+ return mx, my+++def find_rect(frames, face):+ """Expand from the face outward to the strongest static straight edges on each side.+ Returns (x0,y0,x1,y1, score) or None. Static edges: vertical lines (|gx|) for left/right, horizontal (|gy|) for top/bottom."""+ h, w = frames[0].shape[:2]+ gx, gy = edge_map(frames)+ fx, fy, fw, fh = face+ cx, cy = fx + fw / 2, fy + fh / 2+ # also demand the line to be temporally static in intensity (low variance across frames) along its length+ gray = np.array([cv2.cvtColor(f, cv2.COLOR_BGR2GRAY) for f in frames]).astype(np.float32)+ # the cam interior (face) is also dynamic, so static means: the edge exists in the median, with a long run+ thr_v = max(20.0, np.percentile(gx, 99.0) * 0.35)+ thr_h = max(20.0, np.percentile(gy, 99.0) * 0.35)++ def run_len(line_mask):+ # longest continuous run (allowing small gaps) in a 1-D boolean array+ best = cur = gap = 0+ for v in line_mask:+ if v:+ cur += 1 + gap; gap = 0; best = max(best, cur)+ elif cur and gap < 4:+ gap += 1+ else:+ cur = gap = 0+ return best++ # Candidate extents: face-relative search windows+ def search(axis_edges, lo, hi, other_lo, other_hi, thr, vertical):+ """Best static edge position in [lo,hi) judged over the span [other_lo,other_hi)."""+ cands = []+ for p in range(max(lo, 1), min(hi, (w if vertical else h) - 1)):+ sl = axis_edges[other_lo:other_hi, p] if vertical else axis_edges[p, other_lo:other_hi]+ m = sl > thr+ if m.mean() < 0.4:+ continue+ frac = run_len(m) / max(1, other_hi - other_lo)+ if frac < 0.4: # a real border is one long straight line, not text or furniture+ continue+ cands.append((p, frac * float(sl.mean())))+ if not cands:+ return None, 0+ top = max(sc for _, sc in cands)+ # near-best lines: take the outermost (the webcam frame is outside inner furniture lines)+ strong = [(p, sc) for p, sc in cands if sc >= 0.9 * top]+ ref = cx if vertical else cy+ after = lo > ref+ return max(strong, key=lambda t: t[0] if after else -t[0])++ # span used to judge vertical lines: the face's height band extended; horizontal lines: face's width band+ ys0, ys1 = int(max(0, cy - fh * 2.5)), int(min(h, cy + fh * 2.5))+ xs0, xs1 = int(max(0, cx - fw * 4)), int(min(w, cx + fw * 4))+ # sides limited to sane webcam size: box between 1.6x and 8x face width+ def sides(ys0, ys1, xs0, xs1):+ return (search(gx, int(cx - fw * 10), int(fx - fw * 0.1), ys0, ys1, thr_v, True),+ search(gx, int(fx + fw * 1.1), int(cx + fw * 10), ys0, ys1, thr_v, True),+ search(gy, int(cy - fh * 4.5), int(fy - fh * 0.1), xs0, xs1, thr_h, False),+ search(gy, int(fy + fh * 1.1), int(cy + fh * 4.5), xs0, xs1, thr_h, False))+ (L, sL), (R, sR), (T, sT), (B, sB) = sides(ys0, ys1, xs0, xs1)+ # refine: judge each line over the full extent of the box found so far (overlays and room furniture do not span it)+ for _ in range(2):+ if None in (L, R, T, B):+ break+ (L2, sL), (R2, sR), (T2, sT), (B2, sB) = sides(T, B, L, R)+ L, R, T, B = (L2 if L2 is not None else L), (R2 if R2 is not None else R), (T2 if T2 is not None else T), (B2 if B2 is not None else B)+ # frame borders count as edges (cam docked to a corner)+ notes = []+ if L is None and fx - fw * 10 < 3: L = 0; sL = 1; notes.append("L=frame")+ if R is None and cx + fw * 10 > w - 3: R = w; sR = 1; notes.append("R=frame")+ if T is None and cy - fh * 4.5 < 3: T = 0; sT = 1; notes.append("T=frame")+ if B is None and cy + fh * 4.5 > h - 3: B = h; sB = 1; notes.append("B=frame")+ found = [x is not None for x in (L, R, T, B)]+ weak = [n for n, s, t in (("L", sL, thr_v), ("R", sR, thr_v), ("T", sT, thr_h), ("B", sB, thr_h)) if s < 0.9 * t]+ return dict(L=L, R=R, T=T, B=B, found=found, notes=notes, weak=len(weak))+++def refine_with_frame_edges(rect, w, h, face):+ """If cam is docked to a frame edge, snap sides that are within a few px or close to the frame edge."""+ return rect+++def where(box):+ x, y, bw, bh = box+ cx, cy = x + bw / 2, y + bh / 2+ v = "top" if cy < 0.4 else "bottom" if cy > 0.6 else "middle"+ hz = "left" if cx < 0.4 else "right" if cx > 0.6 else "center"+ return f"{v}-{hz} {round(bw * 100)}% x {round(bh * 100)}%"+++def find_cam(video, start=None, end=None):+ frames = sample_frames(video, start, end)+ if len(frames) < 4:+ return {"mode": "none", "confidence": 0.0, "reason": f"could only read {len(frames)} frames"}+ h, w = frames[0].shape[:2]+ dets = detect_faces(frames)+ face, hits = stable_face(dets, len(frames))+ need = max(3, int(len(frames) * 0.5))+ total = sum(len(d) for d in dets)+ if face is None or hits < need:+ return {"mode": "none", "confidence": 0.0, "faces_seen": total,+ "reason": f"no face stable across frames (best cluster {hits}/{len(frames)}, need {need})"}+ fx, fy, fw, fh = face+ fracface = [round(fx / w, 4), round(fy / h, 4), round(fw / w, 4), round(fh / h, 4)]+ if fw / w > 0.5:+ return {"mode": "none", "confidence": 0.0, "face": fracface,+ "reason": "stable face is huge (full-frame talking head, not a webcam overlay)"}+ stab = hits / len(frames)++ r = find_rect(frames, face)+ L, R, T, B = r["L"], r["R"], r["T"], r["B"]+ n_found = sum(r["found"])+ # snap sides near frame borders+ m = 0.01 * w+ if L is not None and L < m: L = 0+ if R is not None and R > w - m: R = w+ if T is not None and T < 0.01 * h: T = 0+ if B is not None and B > h - 0.01 * h: B = h+ ok = L is not None and R is not None and T is not None and B is not None+ if ok:+ bw, bh = R - L, B - T+ # sane webcam: smaller than 60% of frame width/height, contains the face+ contains = L <= fx and R >= fx + fw and T <= fy and B >= fy + fh+ sane = 0.08 < bw / w < 0.6 and 0.08 < bh / h < 0.7 and contains and bw > fw * 1.2 and bh > fh * 1.2+ if sane:+ box = [round(L / w, 4), round(T / h, 4), round(bw / w, 4), round(bh / h, 4)]+ conf = round(min(1.0, 0.55 + 0.25 * stab + 0.2 * (1 if n_found == 4 else 0.5)), 2)+ return {"mode": "cam", "box": box, "face": fracface, "confidence": conf,+ "reason": f"face stable in {hits}/{len(frames)} frames, rectangle edges found on {n_found}/4 sides {r['notes']}",+ "summary": f"cam: {where(box)}"}+ # fallback: tight 16:9 crop around the face (about 3x face width)+ cw = min(w, fw * 3.2); ch = cw * 9 / 16+ if ch < fh * 1.8:+ ch = fh * 1.8; cw = ch * 16 / 9+ ccx, ccy = fx + fw / 2, fy + fh * 0.55+ x0 = min(max(0, ccx - cw / 2), w - cw); y0 = min(max(0, ccy - ch / 2), h - ch)+ box = [round(x0 / w, 4), round(y0 / h, 4), round(cw / w, 4), round(ch / h, 4)]+ conf = round(min(0.8, 0.35 + 0.4 * stab), 2)+ return {"mode": "face", "box": box, "face": fracface, "confidence": conf,+ "reason": f"face stable in {hits}/{len(frames)} frames but no clean rectangle ({n_found}/4 sides found); face-centred crop",+ "summary": f"face (no cam border): {where(box)}"}+++def draw_debug(video, res, out, start=None, end=None):+ frames = sample_frames(video, start, end, 3)+ if not frames:+ return+ f = frames[len(frames) // 2].copy()+ h, w = f.shape[:2]+ if res.get("box"):+ x, y, bw, bh = res["box"]+ col = (0, 255, 0) if res["mode"] == "cam" else (0, 200, 255)+ cv2.rectangle(f, (int(x * w), int(y * h)), (int((x + bw) * w), int((y + bh) * h)), col, 4)+ if res.get("face"):+ x, y, bw, bh = res["face"]+ cv2.rectangle(f, (int(x * w), int(y * h)), (int((x + bw) * w), int((y + bh) * h)), (255, 0, 0), 2)+ cv2.putText(f, f"{res['mode']} conf={res.get('confidence')}", (20, 40), cv2.FONT_HERSHEY_SIMPLEX, 1.1, (0, 0, 255), 3)+ cv2.imwrite(str(out), f)+++def main():+ ap = argparse.ArgumentParser()+ ap.add_argument("video"); ap.add_argument("--start", type=float); ap.add_argument("--end", type=float)+ ap.add_argument("--json"); ap.add_argument("--debug", help="write a JPG with the box drawn")+ a = ap.parse_args()+ res = find_cam(a.video, a.start, a.end)+ if res["mode"] == "none":+ line = f"no webcam found ({res['reason']}) -> use the blur layout"+ else:+ line = f"{res['summary']} (confidence {res['confidence']}; {res['reason']}) -> --cam {':'.join(f'{v:.3f}' for v in res['box'])}"+ print(line)+ if a.json:+ Path(a.json).write_text(json.dumps(res, indent=1), encoding="utf-8")+ if a.debug:+ draw_debug(a.video, res, a.debug, a.start, a.end)+++if __name__ == "__main__":+ main()++diff --git a/scripts/live.py b/scripts/live.pyindex c5a203b..c8208b6 100644--- a/scripts/live.py+++ b/scripts/live.py@@ -1,4 +1,5 @@-"""Record a YouTube live stream and auto-cut clips when live chat spikes.+"""Record a YouTube or Twitch (twitch.tv/<login>, no key) live stream and auto-cut clips when live chat spikes.+Twitch chat is read via anonymous IRC (twitch.py) instead of yt-dlp live_chat.Records the stream in 60 s segments into jobs/<id>/live/, reads live chat as it arrives, and on a chatspike cuts [spike-before, spike+after] into live/spike_<n>.mp4 and appends a row to live/spikes.md.@@ -94,6 +95,42 @@ class ChatTail:return [w for w, _ in cnt.most_common(n)]+class TwitchTail(ChatTail):+ """Same counters as ChatTail, fed from the JSON lines twitch.irc_chat appends to chat.twitch.jsonl."""++ def poll(self):+ f = self.d / "chat.twitch.jsonl"+ try:+ with open(f, "rb") as fh:+ fh.seek(self.pos.get(f.name, 0))+ data = fh.read()+ except OSError:+ return+ if not data:+ return+ self.pos[f.name] = self.pos.get(f.name, 0) + len(data)+ buf = self.buf.get(f.name, b"") + data+ *lines, rest = buf.split(b"\n")+ self.buf[f.name] = rest+ for ln in lines:+ try:+ m = json.loads(ln)+ ts, txt = float(m["t"]), (m["text"] or "").strip()+ except Exception:+ continue+ if ts < self.start - 5 or not txt or NOISE.search(txt):+ continue+ s = int(ts)+ self.raw[s] += 1+ self.wgt[s] += 2 if HYPE.search(txt) else 1+ self.words.setdefault(s, []).append(txt)+++def twitch_login(url):+ m = re.match(r"https?://(?:www\.|m\.)?twitch\.tv/([A-Za-z0-9_]+)/?(?:[?#].*)?$", url)+ return m.group(1).lower() if m and m.group(1).lower() not in ("videos", "directory") else None++class Recorder:def __init__(self, ld, url, minutes):self.ld, self.csv = ld, ld / "segments.csv"@@ -179,7 +216,7 @@ def main():d = job_dir(a.url)ld = d / "live"ld.mkdir(exist_ok=True)- for f in list(ld.glob("seg_*.ts")) + list(ld.glob("chat.live_chat.json*")) + [ld / "segments.csv"]:+ for f in list(ld.glob("seg_*.ts")) + list(ld.glob("chat.live_chat.json*")) + [ld / "segments.csv", ld / "chat.twitch.jsonl"]:f.unlink(missing_ok=True)spikes_md = ld / "spikes.md"if not spikes_md.exists():@@ -189,11 +226,20 @@ def main():end_at = start + a.minutes * 60 + 30rec = Recorder(ld, a.url, a.minutes)- chat = subprocess.Popen(ytdlp_base() + ["--skip-download", "--write-subs", "--sub-langs", "live_chat",- "-o", str(ld / "chat"), a.url],- stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL,- creationflags=getattr(subprocess, "CREATE_NEW_PROCESS_GROUP", 0))- tail = ChatTail(ld, start)+ login = twitch_login(a.url)+ if login:+ import threading, twitch+ stop_chat = threading.Event()+ chat_thread = threading.Thread(target=twitch.irc_chat, args=(login, ld / "chat.twitch.jsonl", stop_chat), daemon=True)+ chat_thread.start()+ chat = None+ tail = TwitchTail(ld, start)+ else:+ chat = subprocess.Popen(ytdlp_base() + ["--skip-download", "--write-subs", "--sub-langs", "live_chat",+ "-o", str(ld / "chat"), a.url],+ stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL,+ creationflags=getattr(subprocess, "CREATE_NEW_PROCESS_GROUP", 0))+ tail = ChatTail(ld, start)pending, last_spike, spikes = [], 0.0, 0print(f"recording {a.minutes:g} min -> {ld} (Ctrl+C to stop)", flush=True)@@ -235,7 +281,10 @@ def main():print("stopping...", flush=True)finally:rec.stop()- if chat.poll() is None:+ if login:+ stop_chat.set()+ chat_thread.join(5)+ elif chat.poll() is None:chat.terminate()try: chat.wait(10)except subprocess.TimeoutExpired: chat.kill()diff --git a/scripts/secrets.py b/scripts/secrets_map.pysimilarity index 95%rename from scripts/secrets.pyrename to scripts/secrets_map.pyindex 001ff6c..1d2b509 100644--- a/scripts/secrets.py+++ b/scripts/secrets_map.py@@ -4,12 +4,12 @@ Entries live in secrets.csv. Nothing is posted unless its status is "verified".Exploits, money glitches, duplication tricks, leaks and "play early" content are never collected.usage:- python secrets.py scan jobs/<id> propose unverified entries from the transcript- python secrets.py add --name N --where W --how H --category place --channel C --url U- python secrets.py verify <id> --by "played it myself on 2026-11-20"- python secrets.py wrong <id>- python secrets.py posts --out secrets-posts.md tip posts + carousel from VERIFIED entries only- python secrets.py map --out secrets.md table grouped by category+ python secrets_map.py scan jobs/<id> propose unverified entries from the transcript+ python secrets_map.py add --name N --where W --how H --category place --channel C --url U+ python secrets_map.py verify <id> --by "played it myself on 2026-11-20"+ python secrets_map.py wrong <id>+ python secrets_map.py posts --out secrets-posts.md tip posts + carousel from VERIFIED entries only+ python secrets_map.py map --out secrets.md table grouped by category"""import argparse, csv, datetime as dt, difflib, re, sysfrom pathlib import Path@@ -195,7 +195,7 @@ def cmd_posts(a):out = ["# Secrets posts (verified entries only)", "","Check each tip once more in game before posting. Credit line stays on every post. No hashtags on X.", ""]if not ready:- out.append("No verified entries yet. Run `secrets.py verify <id> --by ...` after you checked one in game.")+ out.append("No verified entries yet. Run `secrets_map.py verify <id> --by ...` after you checked one in game.")for r in ready:steps = [s.strip() for s in re.split(r"(?<=[.;])\s+|\n", r["how"]) if s.strip()][:4]body = "\n".join(f"{i}. {s}" for i, s in enumerate(steps, 1)) or r["how"]diff --git a/scripts/streams.py b/scripts/streams.pyindex f04efef..df1c242 100644--- a/scripts/streams.py+++ b/scripts/streams.py@@ -1,7 +1,7 @@"""Find live streams about a topic, ranked by concurrent viewers.usage: python streams.py --query "gta 6" --limit 20 --out streams.md-YouTube always. Twitch only if TWITCH_CLIENT_ID and TWITCH_TOKEN are set. Kick is tried once, skipped silently on failure.+YouTube always. Twitch always (Helix if TWITCH_CLIENT_ID and TWITCH_TOKEN are set, else keyless public GQL). Kick is tried once, skipped silently on failure.Viewer counts are exactly what the platform returned at run time."""import argparse, json, os, sys, time@@ -55,10 +55,23 @@ def youtube(query, limit):return out+def twitch_nokey(game="Grand Theft Auto VI", limit=20):+ """No account/API key: Twitch public web GQL (see twitch.py)."""+ import twitch as tw+ try:+ rows = tw.top_streams(game, limit)+ except Exception as e:+ print(f"twitch (no key) failed: {e}", file=sys.stderr)+ return []+ now = time.time()+ return [{"platform": "Twitch", "channel": r["login"], "title": r["title"], "url": r["url"], "viewers": r["viewers"],+ "live_for": fmt_dur(now - tw.started_ts(r["created_at"])) if tw.started_ts(r["created_at"]) else ""} for r in rows]++def twitch(query):cid, tok = os.environ.get("TWITCH_CLIENT_ID"), os.environ.get("TWITCH_TOKEN")if not (cid and tok):- return None+ return twitch_nokey()import requestsh = {"Client-Id": cid, "Authorization": f"Bearer {tok}"}try:@@ -106,6 +119,8 @@ def main():a = ap.parse_args()sections = [("YouTube", youtube(a.query, a.limit))]t = twitch(a.query)+ if t:+ t = sorted(t, key=lambda r: r["viewers"] or -1, reverse=True)[:a.limit]if t is not None:sections.append(("Twitch", t))k = kick(a.query)diff --git a/scripts/twitch.py b/scripts/twitch.pynew file mode 100644index 0000000..c873419--- /dev/null+++ b/scripts/twitch.py@@ -0,0 +1,141 @@+"""Twitch helpers that need no account and no API key.++top_streams(): Twitch's public web GQL endpoint with the public web Client-Id (same one yt-dlp uses).+irc_chat(): anonymous IRC read-only chat (justinfan nick, no password).+vod_chat(): not implemented, see note at the bottom.+"""+import json, random, socket, ssl, sys, threading, time+from datetime import datetime, timezone++GQL = "https://gql.twitch.tv/gql"+CLIENT_ID = "kimne78kx3ncx6brgo4mv6wki5h1ko"++try:+ import truststore+ truststore.inject_into_ssl()+except Exception:+ pass+++def gql(query, variables=None):+ import requests+ r = requests.post(GQL, json={"query": query, "variables": variables or {}},+ headers={"Client-Id": CLIENT_ID}, timeout=15)+ r.raise_for_status()+ return r.json()+++_Q_GAME = """query($name:String!,$n:Int!){ game(name:$name){ displayName streams(first:$n){ edges{ node{+ title viewersCount createdAt previewImageURL(width:640,height:360) broadcaster{ login displayName } } } } } }"""+_Q_SEARCH = """query($q:String!){ searchCategories(userQuery:$q,first:5){ edges{ node{ ... on Game{ name displayName } } } } }"""+++def _rows(game):+ out = []+ for e in ((game.get("streams") or {}).get("edges") or []):+ n = e.get("node") or {}+ b = n.get("broadcaster") or {}+ if not b.get("login"):+ continue+ out.append({"login": b["login"], "name": b.get("displayName") or b["login"], "title": n.get("title") or "",+ "viewers": n.get("viewersCount") or 0, "created_at": n.get("createdAt"),+ "preview": n.get("previewImageURL"), "url": f"https://twitch.tv/{b['login']}"})+ return out+++def top_streams(game="Grand Theft Auto VI", limit=20):+ """Live streams of a Twitch category, sorted by viewers (desc). Empty list if the category is unknown/offline."""+ names = [game]+ try:+ d = gql(_Q_SEARCH, {"q": game})+ for e in ((d.get("data") or {}).get("searchCategories") or {}).get("edges") or []:+ nm = (e.get("node") or {}).get("name")+ if nm and nm not in names:+ names.append(nm)+ except Exception as ex:+ print(f"twitch category search failed: {ex}", file=sys.stderr)+ if game.lower() != "gta vi":+ names.append("Grand Theft Auto VI" if "grand theft" not in game.lower() else "GTA VI")+ for nm in names:+ try:+ g = ((gql(_Q_GAME, {"name": nm, "n": int(limit)}).get("data") or {}).get("game"))+ except Exception as ex:+ print(f"twitch gql failed: {ex}", file=sys.stderr)+ continue+ if g:+ rows = _rows(g)+ if rows:+ return sorted(rows, key=lambda r: r["viewers"], reverse=True)+ return []+++def started_ts(iso):+ try:+ return datetime.strptime(iso, "%Y-%m-%dT%H:%M:%SZ").replace(tzinfo=timezone.utc).timestamp()+ except Exception:+ return None+++def _parse_privmsg(line):+ """'@tags :[email protected] PRIVMSG #chan :text' -> (user, text) or None"""+ tags = ""+ if line.startswith("@"):+ tags, _, line = line.partition(" ")+ if " PRIVMSG " not in line:+ return None+ prefix, _, rest = line.partition(" PRIVMSG ")+ user = prefix.lstrip(":").split("!")[0]+ for t in tags.lstrip("@").split(";"):+ if t.startswith("display-name=") and t[13:]:+ user = t[13:]+ _, _, text = rest.partition(" :")+ return user, text.strip()+++def irc_chat(channel, out_path, stop_event=None, host="irc.chat.twitch.tv", port=6697):+ """Append {t, user, text} JSON lines to out_path until stop_event is set. Reconnects on drop.+ Uses TLS (6697); falls back to plain 6667 if TLS fails."""+ stop_event = stop_event or threading.Event()+ channel = channel.lower().lstrip("#")+ use_tls = True+ with open(out_path, "a", encoding="utf-8", buffering=1) as out:+ while not stop_event.is_set():+ sock = None+ try:+ raw = socket.create_connection((host, port if use_tls else 6667), timeout=15)+ sock = ssl.create_default_context().wrap_socket(raw, server_hostname=host) if use_tls else raw+ sock.settimeout(5)+ sock.sendall(f"NICK justinfan{random.randint(10000, 99999)}\r\n".encode())+ sock.sendall(f"JOIN #{channel}\r\n".encode())+ buf = b""+ while not stop_event.is_set():+ try:+ data = sock.recv(4096)+ except socket.timeout:+ continue+ if not data:+ break+ buf += data+ *lines, buf = buf.split(b"\r\n")+ for ln in lines:+ s = ln.decode("utf-8", "replace")+ if s.startswith("PING"):+ sock.sendall(("PONG" + s[4:] + "\r\n").encode())+ continue+ m = _parse_privmsg(s)+ if m and m[1]:+ out.write(json.dumps({"t": time.time(), "user": m[0], "text": m[1]}, ensure_ascii=False) + "\n")+ except (OSError, ssl.SSLError) as ex:+ if use_tls and not isinstance(ex, socket.timeout):+ use_tls = False # maybe TLS is blocked; try plain 6667 next+ finally:+ if sock:+ try: sock.close()+ except OSError: pass+ stop_event.wait(3)+++def vod_chat(video_id):+ """Not implemented: VideoCommentsByOffsetOrCursor is only served through a persisted-query sha256 hash+ that cannot be verified offline here, and plain-text queries for it are rejected."""+ raise NotImplementedError("Twitch VOD chat needs a persisted-query hash; not supported")diff --git a/skills/campaign-finder/SKILL.md b/skills/campaign-finder/SKILL.mdindex 074ccaa..414ebc4 100644--- a/skills/campaign-finder/SKILL.md+++ b/skills/campaign-finder/SKILL.md@@ -7,7 +7,9 @@ description: Find live GTA 6 and gaming clipping campaigns on Whop Content RewarRead pages live. Do not rely on memory; payouts and budgets change daily.-1. Open `https://whop.com/discover/` and search "GTA 6", "GTA VI", "gaming clipping", "content rewards". Also check the Content Rewards listings you can see without logging in. Use the browser tools or fetch the pages.+1. Check these sources, using the browser tools or by fetching the pages:+ - Whop Content Rewards: `https://whop.com/discover/` (search "GTA 6", "GTA VI", "gaming clipping", "content rewards") and the public campaign pages on `https://contentrewards.com/` (campaign links look like `contentrewards.com/c/campaigns/<id>`).+ - Clip (Clip Tech, LLC): `https://www.clip.tech/clippers` lists live campaigns with the rate per 1K views and the share of budget left, without login. The campaign briefs and rules live in their Discord, so ask the human to paste them. Their terms say payouts are Net 30 after a campaign ends and depend on the client paying; tell the human this in one line.2. For each campaign that looks live, open its page and record:- name and creator or brand- platforms accepteddiff --git a/skills/hook-writer/SKILL.md b/skills/hook-writer/SKILL.mdindex be00c59..f2c3d4d 100644--- a/skills/hook-writer/SKILL.md+++ b/skills/hook-writer/SKILL.md@@ -16,6 +16,16 @@ Write 3 options per clip. Sentence case. Short: 3 to 9 words fit the hook box.- Question: "Would you survive this chase?"- Naming the streamer or creator when they are known: "Even [name] didn't see this coming"+## Reaction titles (twitch-reaction layout)++For a streamer's reaction clip the title sits on the seam between face and game for the whole clip. Formula: streamer name + reaction verb + what they reacted to, with CAPS on 2 or 3 key words.++- "Speed REALIZED why GTA 6 took ROCKSTAR 13 YEARS"+- "Kai LOST IT when the cops showed up in GTA 6"+- "Fighting Cops in GTA 6" (outlined style: short, 3 to 6 words)++Describe what happens on screen. Never put words in the streamer's mouth: no quotes they did not say, no made-up opinions. Emojis are optional, at most 2.+## What does not work- Bare labels: "GTA 6 clip", "Funny moment"diff --git a/skills/secrets-map/SKILL.md b/skills/secrets-map/SKILL.mdindex 1f7c9e9..87dfaf7 100644--- a/skills/secrets-map/SKILL.md+++ b/skills/secrets-map/SKILL.md@@ -9,7 +9,7 @@ Entries live in `secrets.csv` (id, category, name, where, how, source_channel, s## Commands-Run from the project folder with `.venv\Scripts\python scripts\secrets.py ...` (`--csv path` before the subcommand to use another file).+Run from the project folder with `.venv\Scripts\python scripts\secrets_map.py ...` (`--csv path` before the subcommand to use another file).- `scan jobs/<id>`: reads `transcript.json` and `info.json`, finds secret-type mentions (hidden, secret, easter egg, money, cash, stash, collectible, rare car, location, spawn, unlock) and adds them as `unverified` with a quote and a `?t=` link to the source. Duplicates are skipped. Exploit-type mentions are skipped and printed.- `add --name N --where W --how H --category place --channel C --url U`: manual entry.diff --git a/skills/twitch-reaction/SKILL.md b/skills/twitch-reaction/SKILL.mdnew file mode 100644index 0000000..ce4987f--- /dev/null+++ b/skills/twitch-reaction/SKILL.md@@ -0,0 +1,35 @@+---+name: twitch-reaction+description: Watch the biggest GTA 6 Twitch streamer and make reaction clips: face on top, game below, big title. Use when the user wants streamer reaction clips, "face on top" clips, Twitch clips, or asks who is streaming GTA 6 right now.+---++# Twitch reaction clips++Face on top, game below, a big title on the seam. The format of most viral GTA 6 streamer clips.++## 1. Find the streamer (no Twitch account or key needed)++`python "${CLAUDE_PLUGIN_ROOT}/scripts/streams.py" --query "gta 6"` lists the top live Grand Theft Auto VI streams on Twitch and YouTube, ranked by viewers. Pick a streamer who runs a clipping campaign (check `campaigns.md`), or one whose clips you have permission to post.++## 2. Get the moment++- Live: `python "${CLAUDE_PLUGIN_ROOT}/scripts/live.py" https://twitch.tv/<login> --minutes 60` records the stream, reads Twitch chat anonymously and cuts a clip every time chat explodes.+- After the fact: `python "${CLAUDE_PLUGIN_ROOT}/scripts/moments.py" <twitch VOD or clip URL> --top 8` scores the VOD and writes `candidates.md`.++## 3. Cut the reaction clip++```+python "${CLAUDE_PLUGIN_ROOT}/scripts/cut.py" jobs/<id> --pick 1 --layout react --cam auto \+ --title "Speed REALIZED why GTA 6 took ROCKSTAR 13 YEARS" --title-style box --captions bubble --credit "@<streamer>"+```++- `--cam auto` finds the streamer's webcam itself (face detection plus the webcam frame around it). It prints where it found the cam. If it finds no stable face it falls back to the blur layout and says so. Check the first frame once; if the crop is wrong, pass `--cam x:y:w:h` fractions.+- `--title-style box`: white band with bold black text on the seam. `--title-style outline`: white text with a thick black outline across the top of the game, for short titles ("Fighting Cops in GTA 6").+- `--captions bubble`: white speech bubble ("Oh my god!"). `word`: word-by-word captions. `none`: title only.+- Write the title with `hook-writer` (reaction titles section).++## Rules++- Clip a streamer only inside their campaign or with permission. Credit every clip.+- Titles describe what happened. Never invent a quote or an opinion.+- Run `rule-check` before posting. No spoilers in the title during launch week.