[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71NCCDGPMDQKDP3N8SP9ZRN":3,"skill-same:01M71NCCDGPMDQKDP3N8SP9ZRN":109},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":49,"commitSha":50,"skillDirectory":51,"forksCount":52,"repositoryHtmlUrl":53,"repositoryHomepageUrl":6,"ownerHtmlUrl":54,"ownerBlogUrl":6,"ownerDescription":55,"updatedAt":56,"install":57,"resources":70},"01M71NCCDGPMDQKDP3N8SP9ZRN","ascii-video",null,"Production pipeline for ASCII art video — any format. Converts video\u002Faudio\u002Fimages\u002Fgenerative input into colored ASCII character video output (MP4, GIF, image sequence). Covers: video-to-ASCII conversion, audio-reactive music visualizers, generative ASCII art animations, hybrid video+audio reactive, text\u002Flyrics overlays, real-time terminal rendering. Use when users request: ASCII video, text art video, terminal-style video, character art animation, retro text visualization, audio visualizer in ASCII, converting video to ASCII art, matrix-style effects, or any animated ASCII output.","q2805187159\u002FAnvil","q2805187159","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F105276843?v=4","01M71KF4TN999VNJX9FY9QT06A","铁甲勇士宋小宝","01M71KF4V97XXQ7AGES97R4Q9F",3,"MIT","https:\u002F\u002Fgithub.com\u002Fq2805187159\u002FAnvil\u002Fblob\u002Fmain\u002Fskills\u002Fcreative\u002Fascii-video\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000016","图像与多媒体","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"Video","ascii video","ascii","images","when","generative","request","effects","overlays","video to ascii","time","Art","image","conversion","text","Audio","Animation","pipeline","visualization","terminal","2026-11-10 10:56:23",false,"---\nname: ascii-video\ndescription: \"Production pipeline for ASCII art video — any format. Converts video\u002Faudio\u002Fimages\u002Fgenerative input into colored ASCII character video output (MP4, GIF, image sequence). Covers: video-to-ASCII conversion, audio-reactive music visualizers, generative ASCII art animations, hybrid video+audio reactive, text\u002Flyrics overlays, real-time terminal rendering. Use when users request: ASCII video, text art video, terminal-style video, character art animation, retro text visualization, audio visualizer in ASCII, converting video to ASCII art, matrix-style effects, or any animated ASCII output.\"\n---\n\n# ASCII Video Production Pipeline\n\n## Creative Standard\n\nThis is visual art. ASCII characters are the medium; cinema is the standard.\n\n**Before writing a single line of code**, articulate the creative concept. What is the mood? What visual story does this tell? What makes THIS project different from every other ASCII video? The user's prompt is a starting point — interpret it with creative ambition, not literal transcription.\n\n**First-render excellence is non-negotiable.** The output must be visually striking without requiring revision rounds. If something looks generic, flat, or like \"AI-generated ASCII art,\" it is wrong — rethink the creative concept before shipping.\n\n**Go beyond the reference vocabulary.** The effect catalogs, shader presets, and palette libraries in the references are a starting vocabulary. For every project, combine, modify, and invent new patterns. The catalog is a palette of paints — you write the painting.\n\n**Be proactively creative.** Extend the skill's vocabulary when the project calls for it. If the references don't have what the vision demands, build it. Include at least one visual moment the user didn't ask for but will appreciate — a transition, an effect, a color choice that elevates the whole piece.\n\n**Cohesive aesthetic over technical correctness.** All scenes in a video must feel connected by a unifying visual language — shared color temperature, related character palettes, consistent motion vocabulary. A technically correct video where every scene uses a random different effect is an aesthetic failure.\n\n**Dense, layered, considered.** Every frame should reward viewing. Never flat black backgrounds. Always multi-grid composition. Always per-scene variation. Always intentional color.\n\n## Modes\n\n| Mode | Input | Output | Reference |\n|------|-------|--------|-----------|\n| **Video-to-ASCII** | Video file | ASCII recreation of source footage | `references\u002Finputs.md` § Video Sampling |\n| **Audio-reactive** | Audio file | Generative visuals driven by audio features | `references\u002Finputs.md` § Audio Analysis |\n| **Generative** | None (or seed params) | Procedural ASCII animation | `references\u002Feffects.md` |\n| **Hybrid** | Video + audio | ASCII video with audio-reactive overlays | Both input refs |\n| **Lyrics\u002Ftext** | Audio + text\u002FSRT | Timed text with visual effects | `references\u002Finputs.md` § Text\u002FLyrics |\n| **TTS narration** | Text quotes + TTS API | Narrated testimonial\u002Fquote video with typed text | `references\u002Finputs.md` § TTS Integration |\n\n## Stack\n\nSingle self-contained Python script per project. No GPU required.\n\n| Layer | Tool | Purpose |\n|-------|------|---------|\n| Core | Python 3.10+, NumPy | Math, array ops, vectorized effects |\n| Signal | SciPy | FFT, peak detection (audio modes) |\n| Imaging | Pillow (PIL) | Font rasterization, frame decoding, image I\u002FO |\n| Video I\u002FO | ffmpeg (CLI) | Decode input, encode output, mux audio |\n| Parallel | concurrent.futures | N workers for batch\u002Fclip rendering |\n| TTS | ElevenLabs API (optional) | Generate narration clips |\n| Optional | OpenCV | Video frame sampling, edge detection |\n\n## Pipeline Architecture\n\nEvery mode follows the same 6-stage pipeline:\n\n```\nINPUT → ANALYZE → SCENE_FN → TONEMAP → SHADE → ENCODE\n```\n\n1. **INPUT** — Load\u002Fdecode source material (video frames, audio samples, images, or nothing)\n2. **ANALYZE** — Extract per-frame features (audio bands, video luminance\u002Fedges, motion vectors)\n3. **SCENE_FN** — Scene function renders to pixel canvas (`uint8 H,W,3`). Composes multiple character grids via `_render_vf()` + pixel blend modes. See `references\u002Fcomposition.md`\n4. **TONEMAP** — Percentile-based adaptive brightness normalization. See `references\u002Fcomposition.md` § Adaptive Tonemap\n5. **SHADE** — Post-processing via `ShaderChain` + `FeedbackBuffer`. See `references\u002Fshaders.md`\n6. **ENCODE** — Pipe raw RGB frames to ffmpeg for H.264\u002FGIF encoding\n\n## Creative Direction\n\n### Aesthetic Dimensions\n\n| Dimension | Options | Reference |\n|-----------|---------|-----------|\n| **Character palette** | Density ramps, block elements, symbols, scripts (katakana, Greek, runes, braille), project-specific | `architecture.md` § Palettes |\n| **Color strategy** | HSV, OKLAB\u002FOKLCH, discrete RGB palettes, auto-generated harmony, monochrome, temperature | `architecture.md` § Color System |\n| **Background texture** | Sine fields, fBM noise, domain warp, voronoi, reaction-diffusion, cellular automata, video | `effects.md` |\n| **Primary effects** | Rings, spirals, tunnel, vortex, waves, interference, aurora, fire, SDFs, strange attractors | `effects.md` |\n| **Particles** | Sparks, snow, rain, bubbles, runes, orbits, flocking boids, flow-field followers, trails | `effects.md` § Particles |\n| **Shader mood** | Retro CRT, clean modern, glitch art, cinematic, dreamy, industrial, psychedelic | `shaders.md` |\n| **Grid density** | xs(8px) through xxl(40px), mixed per layer | `architecture.md` § Grid System |\n| **Coordinate space** | Cartesian, polar, tiled, rotated, fisheye, Möbius, domain-warped | `effects.md` § Transforms |\n| **Feedback** | Zoom tunnel, rainbow trails, ghostly echo, rotating mandala, color evolution | `composition.md` § Feedback |\n| **Masking** | Circle, ring, gradient, text stencil, animated iris\u002Fwipe\u002Fdissolve | `composition.md` § Masking |\n| **Transitions** | Crossfade, wipe, dissolve, glitch cut, iris, mask-based reveal | `shaders.md` § Transitions |\n\n### Per-Section Variation\n\nNever use the same config for the entire video. For each section\u002Fscene:\n- **Different background effect** (or compose 2-3)\n- **Different character palette** (match the mood)\n- **Different color strategy** (or at minimum a different hue)\n- **Vary shader intensity** (more bloom during peaks, more grain during quiet)\n- **Different particle types** if particles are active\n\n### Project-Specific Invention\n\nFor every project, invent at least one of:\n- A custom character palette matching the theme\n- A custom background effect (combine\u002Fmodify existing building blocks)\n- A custom color palette (discrete RGB set matching the brand\u002Fmood)\n- A custom particle character set\n- A novel scene transition or visual moment\n\nDon't just pick from the catalog. The catalog is vocabulary — you write the poem.\n\n## Workflow\n\n### Step 1: Creative Vision\n\nBefore any code, articulate the creative concept:\n\n- **Mood\u002Fatmosphere**: What should the viewer feel? Energetic, meditative, chaotic, elegant, ominous?\n- **Visual story**: What happens over the duration? Build tension? Transform? Dissolve?\n- **Color world**: Warm\u002Fcool? Monochrome? Neon? Earth tones? What's the dominant hue?\n- **Character texture**: Dense data? Sparse stars? Organic dots? Geometric blocks?\n- **What makes THIS different**: What's the one thing that makes this project unique?\n- **Emotional arc**: How do scenes progress? Open with energy, build to climax, resolve?\n\nMap the user's prompt to aesthetic choices. A \"chill lo-fi visualizer\" demands different everything from a \"glitch cyberpunk data stream.\"\n\n### Step 2: Technical Design\n\n- **Mode** — which of the 6 modes above\n- **Resolution** — landscape 1920x1080 (default), portrait 1080x1920, square 1080x1080 @ 24fps\n- **Hardware detection** — auto-detect cores\u002FRAM, set quality profile. See `references\u002Foptimization.md`\n- **Sections** — map timestamps to scene functions, each with its own effect\u002Fpalette\u002Fcolor\u002Fshader config\n- **Output format** — MP4 (default), GIF (640x360 @ 15fps), PNG sequence\n\n### Step 3: Build the Script\n\nSingle Python file. Components (with references):\n\n1. **Hardware detection + quality profile** — `references\u002Foptimization.md`\n2. **Input loader** — mode-dependent; `references\u002Finputs.md`\n3. **Feature analyzer** — audio FFT, video luminance, or synthetic\n4. **Grid + renderer** — multi-density grids with bitmap cache; `references\u002Farchitecture.md`\n5. **Character palettes** — multiple per project; `references\u002Farchitecture.md` § Palettes\n6. **Color system** — HSV + discrete RGB + harmony generation; `references\u002Farchitecture.md` § Color\n7. **Scene functions** — each returns `canvas (uint8 H,W,3)`; `references\u002Fscenes.md`\n8. **Tonemap** — adaptive brightness normalization; `references\u002Fcomposition.md`\n9. **Shader pipeline** — `ShaderChain` + `FeedbackBuffer`; `references\u002Fshaders.md`\n10. **Scene table + dispatcher** — time → scene function + config; `references\u002Fscenes.md`\n11. **Parallel encoder** — N-worker clip rendering with ffmpeg pipes\n12. **Main** — orchestrate full pipeline\n\n### Step 4: Quality Verification\n\n- **Test frames first**: render single frames at key timestamps before full render\n- **Brightness check**: `canvas.mean() > 8` for all ASCII content. If dark, lower gamma\n- **Visual coherence**: do all scenes feel like they belong to the same video?\n- **Creative vision check**: does the output match the concept from Step 1? If it looks generic, go back\n\n## Critical Implementation Notes\n\n### Brightness — Use `tonemap()`, Not Linear Multipliers\n\nThis is the #1 visual issue. ASCII on black is inherently dark. **Never use `canvas * N` multipliers** — they clip highlights. Use adaptive tonemap:\n\n```python\ndef tonemap(canvas, gamma=0.75):\n    f = canvas.astype(np.float32)\n    lo, hi = np.percentile(f[::4, ::4], [1, 99.5])\n    if hi - lo \u003C 10: hi = lo + 10\n    f = np.clip((f - lo) \u002F (hi - lo), 0, 1) ** gamma\n    return (f * 255).astype(np.uint8)\n```\n\nPipeline: `scene_fn() → tonemap() → FeedbackBuffer → ShaderChain → ffmpeg`\n\nPer-scene gamma: default 0.75, solarize 0.55, posterize 0.50, bright scenes 0.85. Use `screen` blend (not `overlay`) for dark layers.\n\n### Font Cell Height\n\nmacOS Pillow: `textbbox()` returns wrong height. Use `font.getmetrics()`: `cell_height = ascent + descent`. See `references\u002Ftroubleshooting.md`.\n\n### ffmpeg Pipe Deadlock\n\nNever `stderr=subprocess.PIPE` with long-running ffmpeg — buffer fills at 64KB and deadlocks. Redirect to file. See `references\u002Ftroubleshooting.md`.\n\n### Font Compatibility\n\nNot all Unicode chars render in all fonts. Validate palettes at init — render each char, check for blank output. See `references\u002Ftroubleshooting.md`.\n\n### Per-Clip Architecture\n\nFor segmented videos (quotes, scenes, chapters), render each as a separate clip file for parallel rendering and selective re-rendering. See `references\u002Fscenes.md`.\n\n## Performance Targets\n\n| Component | Budget |\n|-----------|--------|\n| Feature extraction | 1-5ms |\n| Effect function | 2-15ms |\n| Character render | 80-150ms (bottleneck) |\n| Shader pipeline | 5-25ms |\n| **Total** | ~100-200ms\u002Fframe |\n\n## References\n\n| File | Contents |\n|------|----------|\n| `references\u002Farchitecture.md` | Grid system, resolution presets, font selection, character palettes (20+), color system (HSV + OKLAB + discrete RGB + harmony generation), `_render_vf()` helper, GridLayer class |\n| `references\u002Fcomposition.md` | Pixel blend modes (20 modes), `blend_canvas()`, multi-grid composition, adaptive `tonemap()`, `FeedbackBuffer`, `PixelBlendStack`, masking\u002Fstencil system |\n| `references\u002Feffects.md` | Effect building blocks: value field generators, hue fields, noise\u002FfBM\u002Fdomain warp, voronoi, reaction-diffusion, cellular automata, SDFs, strange attractors, particle systems, coordinate transforms, temporal coherence |\n| `references\u002Fshaders.md` | `ShaderChain`, `_apply_shader_step()` dispatch, 38 shader catalog, audio-reactive scaling, transitions, tint presets, output format encoding, terminal rendering |\n| `references\u002Fscenes.md` | Scene protocol, `Renderer` class, `SCENES` table, `render_clip()`, beat-synced cutting, parallel rendering, design patterns (layer hierarchy, directional arcs, visual metaphors, compositional techniques), complete scene examples at every complexity level, scene design checklist |\n| `references\u002Finputs.md` | Audio analysis (FFT, bands, beats), video sampling, image conversion, text\u002Flyrics, TTS integration (ElevenLabs, voice assignment, audio mixing) |\n| `references\u002Foptimization.md` | Hardware detection, quality profiles, vectorized patterns, parallel rendering, memory management, performance budgets |\n| `references\u002Ftroubleshooting.md` | NumPy broadcasting traps, blend mode pitfalls, multiprocessing\u002Fpickling, brightness diagnostics, ffmpeg issues, font problems, common mistakes |\n","# ASCII Video Production Pipeline\n\n## Creative Standard\n\nThis is visual art. ASCII characters are the medium; cinema is the standard.\n\n**Before writing a single line of code**, articulate the creative concept. What is the mood? What visual story does this tell? What makes THIS project different from every other ASCII video? The user's prompt is a starting point — interpret it with creative ambition, not literal transcription.\n\n**First-render excellence is non-negotiable.** The output must be visually striking without requiring revision rounds. If something looks generic, flat, or like \"AI-generated ASCII art,\" it is wrong — rethink the creative concept before shipping.\n\n**Go beyond the reference vocabulary.** The effect catalogs, shader presets, and palette libraries in the references are a starting vocabulary. For every project, combine, modify, and invent new patterns. The catalog is a palette of paints — you write the painting.\n\n**Be proactively creative.** Extend the skill's vocabulary when the project calls for it. If the references don't have what the vision demands, build it. Include at least one visual moment the user didn't ask for but will appreciate — a transition, an effect, a color choice that elevates the whole piece.\n\n**Cohesive aesthetic over technical correctness.** All scenes in a video must feel connected by a unifying visual language — shared color temperature, related character palettes, consistent motion vocabulary. A technically correct video where every scene uses a random different effect is an aesthetic failure.\n\n**Dense, layered, considered.** Every frame should reward viewing. Never flat black backgrounds. Always multi-grid composition. Always per-scene variation. Always intentional color.\n\n## Modes\n\n| Mode | Input | Output | Reference |\n|------|-------|--------|-----------|\n| **Video-to-ASCII** | Video file | ASCII recreation of source footage | `references\u002Finputs.md` § Video Sampling |\n| **Audio-reactive** | Audio file | Generative visuals driven by audio features | `references\u002Finputs.md` § Audio Analysis |\n| **Generative** | None (or seed params) | Procedural ASCII animation | `references\u002Feffects.md` |\n| **Hybrid** | Video + audio | ASCII video with audio-reactive overlays | Both input refs |\n| **Lyrics\u002Ftext** | Audio + text\u002FSRT | Timed text with visual effects | `references\u002Finputs.md` § Text\u002FLyrics |\n| **TTS narration** | Text quotes + TTS API | Narrated testimonial\u002Fquote video with typed text | `references\u002Finputs.md` § TTS Integration |\n\n## Stack\n\nSingle self-contained Python script per project. No GPU required.\n\n| Layer | Tool | Purpose |\n|-------|------|---------|\n| Core | Python 3.10+, NumPy | Math, array ops, vectorized effects |\n| Signal | SciPy | FFT, peak detection (audio modes) |\n| Imaging | Pillow (PIL) | Font rasterization, frame decoding, image I\u002FO |\n| Video I\u002FO | ffmpeg (CLI) | Decode input, encode output, mux audio |\n| Parallel | concurrent.futures | N workers for batch\u002Fclip rendering |\n| TTS | ElevenLabs API (optional) | Generate narration clips |\n| Optional | OpenCV | Video frame sampling, edge detection |\n\n## Pipeline Architecture\n\nEvery mode follows the same 6-stage pipeline:\n\n```\nINPUT → ANALYZE → SCENE_FN → TONEMAP → SHADE → ENCODE\n```\n\n1. **INPUT** — Load\u002Fdecode source material (video frames, audio samples, images, or nothing)\n2. **ANALYZE** — Extract per-frame features (audio bands, video luminance\u002Fedges, motion vectors)\n3. **SCENE_FN** — Scene function renders to pixel canvas (`uint8 H,W,3`). Composes multiple character grids via `_render_vf()` + pixel blend modes. See `references\u002Fcomposition.md`\n4. **TONEMAP** — Percentile-based adaptive brightness normalization. See `references\u002Fcomposition.md` § Adaptive Tonemap\n5. **SHADE** — Post-processing via `ShaderChain` + `FeedbackBuffer`. See `references\u002Fshaders.md`\n6. **ENCODE** — Pipe raw RGB frames to ffmpeg for H.264\u002FGIF encoding\n\n## Creative Direction\n\n### Aesthetic Dimensions\n\n| Dimension | Options | Reference |\n|-----------|---------|-----------|\n| **Character palette** | Density ramps, block elements, symbols, scripts (katakana, Greek, runes, braille), project-specific | `architecture.md` § Palettes |\n| **Color strategy** | HSV, OKLAB\u002FOKLCH, discrete RGB palettes, auto-generated harmony, monochrome, temperature | `architecture.md` § Color System |\n| **Background texture** | Sine fields, fBM noise, domain warp, voronoi, reaction-diffusion, cellular automata, video | `effects.md` |\n| **Primary effects** | Rings, spirals, tunnel, vortex, waves, interference, aurora, fire, SDFs, strange attractors | `effects.md` |\n| **Particles** | Sparks, snow, rain, bubbles, runes, orbits, flocking boids, flow-field followers, trails | `effects.md` § Particles |\n| **Shader mood** | Retro CRT, clean modern, glitch art, cinematic, dreamy, industrial, psychedelic | `shaders.md` |\n| **Grid density** | xs(8px) through xxl(40px), mixed per layer | `architecture.md` § Grid System |\n| **Coordinate space** | Cartesian, polar, tiled, rotated, fisheye, Möbius, domain-warped | `effects.md` § Transforms |\n| **Feedback** | Zoom tunnel, rainbow trails, ghostly echo, rotating mandala, color evolution | `composition.md` § Feedback |\n| **Masking** | Circle, ring, gradient, text stencil, animated iris\u002Fwipe\u002Fdissolve | `composition.md` § Masking |\n| **Transitions** | Crossfade, wipe, dissolve, glitch cut, iris, mask-based reveal | `shaders.md` § Transitions |\n\n### Per-Section Variation\n\nNever use the same config for the entire video. For each section\u002Fscene:\n- **Different background effect** (or compose 2-3)\n- **Different character palette** (match the mood)\n- **Different color strategy** (or at minimum a different hue)\n- **Vary shader intensity** (more bloom during peaks, more grain during quiet)\n- **Different particle types** if particles are active\n\n### Project-Specific Invention\n\nFor every project, invent at least one of:\n- A custom character palette matching the theme\n- A custom background effect (combine\u002Fmodify existing building blocks)\n- A custom color palette (discrete RGB set matching the brand\u002Fmood)\n- A custom particle character set\n- A novel scene transition or visual moment\n\nDon't just pick from the catalog. The catalog is vocabulary — you write the poem.\n\n## Workflow\n\n### Step 1: Creative Vision\n\nBefore any code, articulate the creative concept:\n\n- **Mood\u002Fatmosphere**: What should the viewer feel? Energetic, meditative, chaotic, elegant, ominous?\n- **Visual story**: What happens over the duration? Build tension? Transform? Dissolve?\n- **Color world**: Warm\u002Fcool? Monochrome? Neon? Earth tones? What's the dominant hue?\n- **Character texture**: Dense data? Sparse stars? Organic dots? Geometric blocks?\n- **What makes THIS different**: What's the one thing that makes this project unique?\n- **Emotional arc**: How do scenes progress? Open with energy, build to climax, resolve?\n\nMap the user's prompt to aesthetic choices. A \"chill lo-fi visualizer\" demands different everything from a \"glitch cyberpunk data stream.\"\n\n### Step 2: Technical Design\n\n- **Mode** — which of the 6 modes above\n- **Resolution** — landscape 1920x1080 (default), portrait 1080x1920, square 1080x1080 @ 24fps\n- **Hardware detection** — auto-detect cores\u002FRAM, set quality profile. See `references\u002Foptimization.md`\n- **Sections** — map timestamps to scene functions, each with its own effect\u002Fpalette\u002Fcolor\u002Fshader config\n- **Output format** — MP4 (default), GIF (640x360 @ 15fps), PNG sequence\n\n### Step 3: Build the Script\n\nSingle Python file. Components (with references):\n\n1. **Hardware detection + quality profile** — `references\u002Foptimization.md`\n2. **Input loader** — mode-dependent; `references\u002Finputs.md`\n3. **Feature analyzer** — audio FFT, video luminance, or synthetic\n4. **Grid + renderer** — multi-density grids with bitmap cache; `references\u002Farchitecture.md`\n5. **Character palettes** — multiple per project; `references\u002Farchitecture.md` § Palettes\n6. **Color system** — HSV + discrete RGB + harmony generation; `references\u002Farchitecture.md` § Color\n7. **Scene functions** — each returns `canvas (uint8 H,W,3)`; `references\u002Fscenes.md`\n8. **Tonemap** — adaptive brightness normalization; `references\u002Fcomposition.md`\n9. **Shader pipeline** — `ShaderChain` + `FeedbackBuffer`; `references\u002Fshaders.md`\n10. **Scene table + dispatcher** — time → scene function + config; `references\u002Fscenes.md`\n11. **Parallel encoder** — N-worker clip rendering with ffmpeg pipes\n12. **Main** — orchestrate full pipeline\n\n### Step 4: Quality Verification\n\n- **Test frames first**: render single frames at key timestamps before full render\n- **Brightness check**: `canvas.mean() > 8` for all ASCII content. If dark, lower gamma\n- **Visual coherence**: do all scenes feel like they belong to the same video?\n- **Creative vision check**: does the output match the concept from Step 1? If it looks generic, go back\n\n## Critical Implementation Notes\n\n### Brightness — Use `tonemap()`, Not Linear Multipliers\n\nThis is the #1 visual issue. ASCII on black is inherently dark. **Never use `canvas * N` multipliers** — they clip highlights. Use adaptive tonemap:\n\n```python\ndef tonemap(canvas, gamma=0.75):\n    f = canvas.astype(np.float32)\n    lo, hi = np.percentile(f[::4, ::4], [1, 99.5])\n    if hi - lo \u003C 10: hi = lo + 10\n    f = np.clip((f - lo) \u002F (hi - lo), 0, 1) ** gamma\n    return (f * 255).astype(np.uint8)\n```\n\nPipeline: `scene_fn() → tonemap() → FeedbackBuffer → ShaderChain → ffmpeg`\n\nPer-scene gamma: default 0.75, solarize 0.55, posterize 0.50, bright scenes 0.85. Use `screen` blend (not `overlay`) for dark layers.\n\n### Font Cell Height\n\nmacOS Pillow: `textbbox()` returns wrong height. Use `font.getmetrics()`: `cell_height = ascent + descent`. See `references\u002Ftroubleshooting.md`.\n\n### ffmpeg Pipe Deadlock\n\nNever `stderr=subprocess.PIPE` with long-running ffmpeg — buffer fills at 64KB and deadlocks. Redirect to file. See `references\u002Ftroubleshooting.md`.\n\n### Font Compatibility\n\nNot all Unicode chars render in all fonts. Validate palettes at init — render each char, check for blank output. See `references\u002Ftroubleshooting.md`.\n\n### Per-Clip Architecture\n\nFor segmented videos (quotes, scenes, chapters), render each as a separate clip file for parallel rendering and selective re-rendering. See `references\u002Fscenes.md`.\n\n## Performance Targets\n\n| Component | Budget |\n|-----------|--------|\n| Feature extraction | 1-5ms |\n| Effect function | 2-15ms |\n| Character render | 80-150ms (bottleneck) |\n| Shader pipeline | 5-25ms |\n| **Total** | ~100-200ms\u002Fframe |\n\n## References\n\n| File | Contents |\n|------|----------|\n| `references\u002Farchitecture.md` | Grid system, resolution presets, font selection, character palettes (20+), color system (HSV + OKLAB + discrete RGB + harmony generation), `_render_vf()` helper, GridLayer class |\n| `references\u002Fcomposition.md` | Pixel blend modes (20 modes), `blend_canvas()`, multi-grid composition, adaptive `tonemap()`, `FeedbackBuffer`, `PixelBlendStack`, masking\u002Fstencil system |\n| `references\u002Feffects.md` | Effect building blocks: value field generators, hue fields, noise\u002FfBM\u002Fdomain warp, voronoi, reaction-diffusion, cellular automata, SDFs, strange attractors, particle systems, coordinate transforms, temporal coherence |\n| `references\u002Fshaders.md` | `ShaderChain`, `_apply_shader_step()` dispatch, 38 shader catalog, audio-reactive scaling, transitions, tint presets, output format encoding, terminal rendering |\n| `references\u002Fscenes.md` | Scene protocol, `Renderer` class, `SCENES` table, `render_clip()`, beat-synced cutting, parallel rendering, design patterns (layer hierarchy, directional arcs, visual metaphors, compositional techniques), complete scene examples at every complexity level, scene design checklist |\n| `references\u002Finputs.md` | Audio analysis (FFT, bands, beats), video sampling, image conversion, text\u002Flyrics, TTS integration (ElevenLabs, voice assignment, audio mixing) |\n| `references\u002Foptimization.md` | Hardware detection, quality profiles, vectorized patterns, parallel rendering, memory management, performance budgets |\n| `references\u002Ftroubleshooting.md` | NumPy broadcasting traps, blend mode pitfalls, multiprocessing\u002Fpickling, brightness diagnostics, ffmpeg issues, font problems, common mistakes |\n",{"name":5,"description":7},"main","6ffadc67c9777282fa1f9330ec12ac8778064409","skills\u002Fcreative\u002Fascii-video",0,"https:\u002F\u002Fgithub.com\u002Fq2805187159\u002FAnvil","https:\u002F\u002Fgithub.com\u002Fq2805187159","Independent Researcher\r\n\r\nEmail: q2805187159@gmail.com\r\n\r\nGithub: q2805187159\r\n\r\nResearch Interests:\r\n- LLM Agents\r\n- Tool Routing\r\n- RAG","2026-06-24 18:31:41",{"source":8,"skillName":5,"commands":58,"prompt":68,"zipAvailable":69},[59,62,65],{"tool":60,"command":61},"npx","npx skills add q2805187159\u002FAnvil --skill ascii-video",{"tool":63,"command":64},"bunx","bunx skills add q2805187159\u002FAnvil --skill ascii-video",{"tool":66,"command":67},"pnpm","pnpm dlx skills add q2805187159\u002FAnvil --skill ascii-video","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fq2805187159\u002FAnvil\u002Fblob\u002Fmain\u002Fskills\u002Fcreative\u002Fascii-video\u002FSKILL.md",true,[71,77,81,85,89,93,97,101,105],{"path":72,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":75,"sourceHtmlUrl":76},"README.md","REFERENCE","参考文档",16440,"https:\u002F\u002Fgithub.com\u002Fq2805187159\u002FAnvil\u002Fblob\u002Fmain\u002Fskills\u002Fcreative\u002Fascii-video\u002FREADME.md",{"path":78,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":79,"sourceHtmlUrl":80},"references\u002Farchitecture.md",33004,"https:\u002F\u002Fgithub.com\u002Fq2805187159\u002FAnvil\u002Fblob\u002Fmain\u002Fskills\u002Fcreative\u002Fascii-video\u002Freferences\u002Farchitecture.md",{"path":82,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":83,"sourceHtmlUrl":84},"references\u002Fcomposition.md",34918,"https:\u002F\u002Fgithub.com\u002Fq2805187159\u002FAnvil\u002Fblob\u002Fmain\u002Fskills\u002Fcreative\u002Fascii-video\u002Freferences\u002Fcomposition.md",{"path":86,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":87,"sourceHtmlUrl":88},"references\u002Feffects.md",72904,"https:\u002F\u002Fgithub.com\u002Fq2805187159\u002FAnvil\u002Fblob\u002Fmain\u002Fskills\u002Fcreative\u002Fascii-video\u002Freferences\u002Feffects.md",{"path":90,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":91,"sourceHtmlUrl":92},"references\u002Finputs.md",24555,"https:\u002F\u002Fgithub.com\u002Fq2805187159\u002FAnvil\u002Fblob\u002Fmain\u002Fskills\u002Fcreative\u002Fascii-video\u002Freferences\u002Finputs.md",{"path":94,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":95,"sourceHtmlUrl":96},"references\u002Foptimization.md",24193,"https:\u002F\u002Fgithub.com\u002Fq2805187159\u002FAnvil\u002Fblob\u002Fmain\u002Fskills\u002Fcreative\u002Fascii-video\u002Freferences\u002Foptimization.md",{"path":98,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":99,"sourceHtmlUrl":100},"references\u002Fscenes.md",37487,"https:\u002F\u002Fgithub.com\u002Fq2805187159\u002FAnvil\u002Fblob\u002Fmain\u002Fskills\u002Fcreative\u002Fascii-video\u002Freferences\u002Fscenes.md",{"path":102,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":103,"sourceHtmlUrl":104},"references\u002Fshaders.md",50219,"https:\u002F\u002Fgithub.com\u002Fq2805187159\u002FAnvil\u002Fblob\u002Fmain\u002Fskills\u002Fcreative\u002Fascii-video\u002Freferences\u002Fshaders.md",{"path":106,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":107,"sourceHtmlUrl":108},"references\u002Ftroubleshooting.md",13246,"https:\u002F\u002Fgithub.com\u002Fq2805187159\u002FAnvil\u002Fblob\u002Fmain\u002Fskills\u002Fcreative\u002Fascii-video\u002Freferences\u002Ftroubleshooting.md",[110,142,174,181,203,225],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":114,"licenseFileUrl":115,"sourceHtmlUrl":116,"categories":117,"keywords":124,"publishedAt":44},"01M71NPWVVMB1AZ8XGKNJFT0YP","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fq2805187159\u002FAnvil\u002Fblob\u002Fmain\u002Fskills\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fq2805187159\u002FAnvil\u002Fblob\u002Fmain\u002Fskills\u002Fwebapp-testing\u002FSKILL.md",[118,121],{"categoryNo":119,"categoryName":120,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":122,"categoryName":123,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",[125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141],"webapp","testing","webapp testing","for","applications","local","frontend","debugging","toolkit","logs","browser","with","playwright","web","behavior","ui","screenshots",{"skillNo":143,"name":144,"nameZh":6,"description":145,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":146,"categories":147,"keywords":156,"publishedAt":44},"01M71NPTQ96H4XSZVZT422BNRB","web-design-guidelines","Review UI code for Web Interface Guidelines compliance. Use when asked to \"review my UI\", \"check accessibility\", \"audit design\", \"review UX\", or \"check my site against best practices\".","https:\u002F\u002Fgithub.com\u002Fq2805187159\u002FAnvil\u002Fblob\u002Fmain\u002Fskills\u002Fweb-design-guidelines\u002FSKILL.md",[148,151],{"categoryNo":149,"categoryName":150,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":152,"categoryName":153,"taxonomyType":154,"taxonomyTypeDesc":155},"01JBSEEDCAT000000000000032","设计师","PROFESSION","适用职业",[157,158,138,159,160,128,161,162,163,164,28,165,166,167,168,169,170,171,172,173],"guidelines","design","web design guidelines","web design","vercel","interface","web interface guidelines","use","best practices","file","code","review","check","compliance","audit","ux","accessibility",{"skillNo":175,"name":144,"nameZh":6,"description":145,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":176,"categories":177,"keywords":180,"publishedAt":44},"01M71NPS2D31Y2BGFYA9DB7CE4","https:\u002F\u002Fgithub.com\u002Fq2805187159\u002FAnvil\u002Fblob\u002Fmain\u002Fskills\u002Fweb-design-guidelines copy\u002FSKILL.md",[178,179],{"categoryNo":149,"categoryName":150,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":152,"categoryName":153,"taxonomyType":154,"taxonomyTypeDesc":155},[157,158,138,159,160,128,161,162,163,164,28,165,166,167,168,169,170,171,172,173],{"skillNo":182,"name":183,"nameZh":6,"description":184,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":185,"categories":186,"keywords":191,"publishedAt":44},"01M71NPQ9DRT54QSQJ0BHBM3VG","video-generation","Use this skill when the user requests to generate, create, or imagine videos. Supports structured prompts and reference image for guided generation.","https:\u002F\u002Fgithub.com\u002Fq2805187159\u002FAnvil\u002Fblob\u002Fmain\u002Fskills\u002Fvideo-generation\u002FSKILL.md",[187,188],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":189,"categoryName":190,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[24,192,193,128,164,28,36,194,195,196,197,198,199,200,201,202],"video generation","generation","create","imagine","requests","generate","videos","reference","prompts","user","structured",{"skillNo":204,"name":205,"nameZh":6,"description":206,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":207,"categories":208,"keywords":210,"publishedAt":44},"01M71NPN57CT154SWXAS52475X","youtube-downloader","Download YouTube videos with customizable quality and format options. Use this skill when the user asks to download, save, or grab YouTube videos. Supports various quality settings (best, 1080p, 720p, 480p, 360p), multiple formats (mp4, webm, mkv), and audio-only downloads as MP3.","https:\u002F\u002Fgithub.com\u002Fq2805187159\u002FAnvil\u002Fblob\u002Fmain\u002Fskills\u002Fvideo-downloader\u002FSKILL.md",[209],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[211,212,213,214,215,39,216,164,28,217,136,218,219,220,221,222,198,223,201,224],"youtube","youtube downloader","mp4","as","downloads","only","mp3","options","quality","format","settings","grab","formats","download",{"skillNo":226,"name":227,"nameZh":6,"description":228,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":229,"categories":230,"keywords":231,"publishedAt":44},"01M71NPKD95YB8N3J6J78QGFFW","verification-before-completion","Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always","https:\u002F\u002Fgithub.com\u002Fq2805187159\u002FAnvil\u002Fblob\u002Fmain\u002Fskills\u002Fverification-before-completion\u002FSKILL.md",[],[232,233,234,235,236,237,238,164,239,28,240,241,242,243,244,245],"verification","verification before completion","running","evidence","complete","prs","claim","assertions","committing","output","claims","work","about","commands"]