[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-108735":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":13,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":13,"stars7d":13,"stars30d":14,"stars90d":13,"forks30d":13,"starsTrendScore":13,"compositeScore":15,"rankGlobal":8,"rankLanguage":8,"license":16,"archived":17,"fork":17,"defaultBranch":18,"hasWiki":17,"hasPages":17,"topics":19,"createdAt":8,"pushedAt":20,"updatedAt":21,"readmeContent":22,"aiSummary":23,"trendingCount":13,"starSnapshotCount":13,"syncStatus":24,"lastSyncTime":25,"discoverSource":26},108735,"video-edit","0xSero\u002Fvideo-edit","0xSero",null,"Python",91,5,1,0,17,41.03,"MIT License",false,"main",[],"2026-11-04 19:38:21","2026-11-22 11:45:04","# video-edit\n\nAn agent skill + script kit that turns a raw screen\u002FOBS\u002Ftalk recording into a tight,\nupload-ready video: transcript-driven cuts, dead-air and static-screen removal, redaction\nof on-screen leaks, privacy cuts, a mastered audio track, and a verified render.\n\nBuilt for one specific workflow — a 45–90 minute macOS screen recording (OBS, screen +\nwebcam) that has to become a 20–30 minute YouTube upload without leaking a hostname, an\nAPI key, or five minutes of a cursor sitting still. Everything here runs locally.\n\n> The surgical decisions (what to cut, which tangent is boring, where the opening is) are\n> made by an agent reading the transcript. The scripts turn those decisions into a\n> reproducible render with hard verification gates.\n\n## What it actually fixes\n\n| Problem in the raw recording | What the kit does |\n| --- | --- |\n| 30 minutes of \"nothing happening\" | frame-difference analysis flags visually static windows; that is not the same as silence |\n| typing, fans, video playback | pause cuts are gated on RMS of the *enhanced* track, never on raw `silencedetect` |\n| a tailnet hostname scrolling past in a terminal | whole-pane blur windows, then OCR of the *output* at 4 fps must find zero leaks |\n| an off-limits moment (hand at the face, leaving the desk, face filling the frame) | Apple Vision hand-pose + face detection surfaces candidate clusters; a human\u002Fagent looks at the sheets before cutting |\n| harsh mic, uneven levels | DeepFilterNet3 → EQ → de-esser → compressor → two-pass loudnorm to −16 LUFS |\n| a choppy, black first 30 seconds | the opening is a deliberate decision, and the delivered file is re-checked frame by frame |\n\n## Requirements\n\n- macOS 14+ (Apple Silicon recommended). Three steps are macOS-only: Apple Vision OCR,\n  Vision hand\u002Fface pose, and `h264_videotoolbox`.\n- `ffmpeg` \u002F `ffprobe` (6.0+; developed against 9.x), `python3` 3.10+\n- `python3 -m pip install mlx-whisper deepfilternet pillow numpy soundfile pyobjc-framework-Vision pyobjc-framework-Quartz`\n- Optional: `torchaudio` (only needed if the source audio is not 48 kHz)\n\nLinux is not supported as-is: the OCR and pose passes need a replacement (Tesseract \u002F\nMediaPipe) and `h264_videotoolbox` becomes `libx264`. The EDL, audio and verification\nlogic are portable.\n\n## Install\n\n```bash\ngit clone git@github.com:0xSero\u002Fvideo-edit.git ~\u002F.agents\u002Fskills\u002Fvideo-edit\n# or, for Claude Code's skill dir:\nln -s ~\u002Fprojects\u002Fvideo-edit ~\u002F.claude\u002Fskills\u002Fvideo-edit\n```\n\nThe skill is inert until an agent reads `SKILL.md`; the scripts work standalone too.\n\n## Quick start\n\n```bash\nW=\u002Ftmp\u002Fedit && mkdir -p $W\nbash scripts\u002Fprep.sh ~\u002FDesktop\u002F\"2026-09-02 08-34-19.mov\" $W   # audio, transcript, frames\npython3 scripts\u002Ftranscript_txt.py $W > $W\u002Ftranscript.txt      # read this, decide keep ranges\npython3 scripts\u002Fdf_enhance.py $W\u002Forig48.wav $W\u002Fdf_enhanced.wav\n$EDITOR $W\u002Fjob.json                                            # keep\u002Fcuts\u002Fblur\u002Fboxes\u002Fchapters\npython3 scripts\u002Fbuild_edl.py $W\u002Fjob.json                       # -> segments.json\npython3 scripts\u002Frender.py    $W\u002Fjob.json                       # -> the delivered mp4\npython3 scripts\u002Fverify_output.py $W\u002Fjob.json                   # gate: exits 1 on any problem\npython3 scripts\u002Fchapters.py  $W\u002Fjob.json                       # timestamps in output time\n```\n\n`scripts\u002Fselftest.sh [workdir]` runs all of the above on a synthesized recording (`say`\nspeech + real silences) and asserts the gate in both directions — use it to check an\ninstall, or to validate a change to any script:\n\n```bash\nbash scripts\u002Fselftest.sh \u002Ftmp\u002Fved-selftest\n```\n\nThe fixture carries fake PII: a `*.ts.net` hostname banner (0–8 s) covered by a blur\nwindow, and a fake API key (12–16 s) left visible on purpose. The test asserts that the\nsource frame really OCRs the hostname, that the delivered file reports `leaks: 0` in the\nblurred window, and that re-running the gate over the key's window **exits 1 with hits** —\na gate that cannot fail proves nothing.\n\n## job.json\n\n`scripts\u002Fjob.example.json` is a complete example. Times are **source seconds**.\n\n| key | meaning |\n| --- | --- |\n| `workdir` | the prep directory; every script chdirs here |\n| `output` | output filename, relative to `workdir` |\n| `keep` | `[[start, end], ...]` — the content decisions, in order, non-overlapping |\n| `cuts` | `[[start, end], ...]` — privacy cuts subtracted from `keep` |\n| `pause` | `{\"max\": 0.7, \"keep\": 0.4, \"loud_db\": -26}` — inside keeps, pauses longer than `max` are shortened to `keep`; only where enhanced RMS stays under `loud_db` |\n| `blur` | `[{\"t0\", \"t1\"}]` — source windows to blur whole panes (scrolling terminal output) |\n| `blur_regions` | `[[x, y, w, h]]` — panes to blur, in source pixels. **Required** whenever `blur` is set |\n| `boxes` | `[{\"x\",\"y\",\"w\",\"h\",\"t0\",\"t1\"}]` — static text to fill with solid colour |\n| `audio_chain` | ffmpeg filter chain applied before loudnorm (default: highpass\u002FEQ\u002Fde-esser\u002Fcompressor) |\n| `loudnorm` | `{\"I\": -16, \"TP\": -1.5, \"LRA\": 11}` |\n| `render_groups` | parallel encode buckets (4 is a good default; bounds are cached) |\n| `video_bitrate`, `encoder` | `14M`, `h264_videotoolbox` |\n| `verify_windows` | extra `[[start, end]]` source ranges to OCR in the output |\n| `chapters` | `[[source_seconds, \"Title\"]]` |\n\nFrame rate and resolution are probed from the source, not configured — a mismatch there\nsilently retimes the whole video.\n\n## The scripts\n\n| script | role |\n| --- | --- |\n| `prep.sh` | extracts `orig48.wav` \u002F `mono16.wav`, starts whisper, 0.5 fps frames, webcam crop, overview sheet. Never writes to the source |\n| `overview.py` | contact sheet of sampled frames |\n| `build_edl.py` | `keep` − `cuts`, pause tightening on the enhanced track, frame-grid snapping → `segments.json` |\n| `render.py` | grouped parallel h264 encode (filter script per group, restartable), concat, audio cut with fades, two-pass loudnorm, mux with both audio tracks |\n| `ocr_scan.py` | Apple Vision OCR + PII patterns (`run` \u002F `scan` \u002F `dense`) |\n| `cam_flags.py` | Vision hand-pose and face rectangles over the webcam crop → candidate clusters |\n| `df_enhance.py` | DeepFilterNet3 in 120 s chunks with crossfades, plus a torchaudio-import shim |\n| `verify_output.py` | the gate: frame count, both audio tracks, OCR of the output around every redaction window |\n| `chapters.py` | chapter list remapped to output time |\n| `transcript_txt.py` | transcript as one timestamped line per segment |\n\n### Restartability\n\n`render.py` splits the timeline into `render_groups` buckets, caches the bucket bounds in\n`group_bounds.json` and each group's filter script in `vf_\u003Cn>.txt`. A rerun skips any group\nwhose filter script and frame count are unchanged, so a failed 2-hour render resumes\ninstead of restarting. Use `--force` after changing the source, `--dry` to inspect the\nffmpeg commands.\n\n### Why the verification gate exists\n\nA render that \"looks fine\" is not evidence. `verify_output.py` independently re-derives\nthe expected frame count from `segments.json`, compares both audio track durations against\nthe video, and re-OCRs the finished file — because the one leak that ever shipped was a\nhostname that appeared *between* two OCR samples of the source. Frames are what gets\nuploaded, so frames are what get checked.\n\n## Conventions the kit assumes\n\n- OBS-style recordings, CFR 30\u002F60 fps, screen + webcam-in-corner (crop defaults to the\n  bottom-right 540×320 of a 1080p frame, scaled for other resolutions; override with\n  `WEBCAM_CROP=w:h:x:y` or skip with `SKIP_CAM=1`).\n- The talk is in `WHISPER_LANG` (default `en`), word timestamps on.\n- The output keeps two audio tracks: enhanced (default) and the untouched mic, so the\n  person who can actually hear the result can compare.\n- 1080p unless told otherwise; 4K doubles render time for a screen recording.\n\n## Troubleshooting\n\n| symptom | cause \u002F fix |\n| --- | --- |\n| `mlx_whisper: command not found` | `prep.sh` continues without a transcript; re-run whisper manually on `mono16.wav` |\n| `torchaudio.backend` ImportError | `df_enhance.py` shims it; if you hit it elsewhere, import order matters |\n| ffmpeg \"Cannot allocate memory\" | too many `between()` terms in one filter graph — lower `render_groups` |\n| group frame mismatch | `render.py` refuses to concat; inspect `render_\u003Cn>.log`, usually a `-ss` before a non-keyframe with a broken decoder |\n| leak still visible | scrolling text between samples: add the whole pane to `blur_regions` and widen the window 2 s each side |\n| audio track shorter than video | a segment ran past EOF; `render.py` prints a padding warning |\n| `cp` hits a TCC\u002Fsandbox prompt on `~\u002FDownloads` | deliver with `\u002Fbin\u002Fcp` outside the sandbox |\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n","这是一个面向 macOS 的本地化视频后期处理工具包，专为将长时屏幕\u002F摄像头录制（如 OBS 录屏）自动化精简为紧凑、合规的上传成品而设计。核心功能包括：基于 Whisper 转录的智能剪辑决策、帧差法检测静态画面、增强音频流驱动的静音段识别、Apple Vision OCR 辅助的敏感信息（如主机名、API 密钥）模糊遮蔽、手部\u002F人脸姿态检测辅助隐私裁切，以及 DeepFilterNet3 驱动的端到端音频母带处理与 LUFS 标准化。所有处理均在本地完成，不依赖云端服务，强调隐私安全与可复现性。适用于技术创作者、开发者教程制作者及需快速产出合规 YouTube 视频的 macOS 用户。",2,"2026-11-24 04:35:05","CREATED_QUERY"]