πŸ“„ SKILL.md

← Vault

name: ascii-video

description: "Production pipeline for ASCII art video β€” any format. Converts video/audio/images/generative 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/lyrics 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."


ASCII Video Production Pipeline

Creative Standard

This is visual art. ASCII characters are the medium; cinema is the standard.

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.

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.

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.

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.

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.

Dense, layered, considered. Every frame should reward viewing. Never flat black backgrounds. Always multi-grid composition. Always per-scene variation. Always intentional color.

Modes

Stack

Single self-contained Python script per project. No GPU required.

Pipeline Architecture

Every mode follows the same 6-stage pipeline:

`

INPUT β†’ ANALYZE β†’ SCENE_FN β†’ TONEMAP β†’ SHADE β†’ ENCODE

`

1. INPUT β€” Load/decode source material (video frames, audio samples, images, or nothing)

2. ANALYZE β€” Extract per-frame features (audio bands, video luminance/edges, motion vectors)

3. SCENE_FN β€” Scene function renders to pixel canvas (uint8 H,W,3). Composes multiple character grids via _render_vf() + pixel blend modes. See references/composition.md

4. TONEMAP β€” Percentile-based adaptive brightness normalization. See references/composition.md Β§ Adaptive Tonemap

5. SHADE β€” Post-processing via ShaderChain + FeedbackBuffer. See references/shaders.md

6. ENCODE β€” Pipe raw RGB frames to ffmpeg for H.264/GIF encoding

Creative Direction

Aesthetic Dimensions

Per-Section Variation

Never use the same config for the entire video. For each section/scene:

References

ModeInputOutputReference
--------------------------------
Video-to-ASCIIVideo fileASCII recreation of source footagereferences/inputs.md Β§ Video Sampling
Audio-reactiveAudio fileGenerative visuals driven by audio featuresreferences/inputs.md Β§ Audio Analysis
GenerativeNone (or seed params)Procedural ASCII animationreferences/effects.md
HybridVideo + audioASCII video with audio-reactive overlaysBoth input refs
Lyrics/textAudio + text/SRTTimed text with visual effectsreferences/inputs.md Β§ Text/Lyrics
TTS narrationText quotes + TTS APINarrated testimonial/quote video with typed textreferences/inputs.md Β§ TTS Integration
LayerToolPurpose
----------------------
CorePython 3.10+, NumPyMath, array ops, vectorized effects
SignalSciPyFFT, peak detection (audio modes)
ImagingPillow (PIL)Font rasterization, frame decoding, image I/O
Video I/Offmpeg (CLI)Decode input, encode output, mux audio
Parallelconcurrent.futuresN workers for batch/clip rendering
TTSElevenLabs API (optional)Generate narration clips
OptionalOpenCVVideo frame sampling, edge detection
DimensionOptionsReference
-------------------------------
Character paletteDensity ramps, block elements, symbols, scripts (katakana, Greek, runes, braille), project-specificarchitecture.md Β§ Palettes
Color strategyHSV, OKLAB/OKLCH, discrete RGB palettes, auto-generated harmony, monochrome, temperaturearchitecture.md Β§ Color System
Background textureSine fields, fBM noise, domain warp, voronoi, reaction-diffusion, cellular automata, videoeffects.md
Primary effectsRings, spirals, tunnel, vortex, waves, interference, aurora, fire, SDFs, strange attractorseffects.md
ParticlesSparks, snow, rain, bubbles, runes, orbits, flocking boids, flow-field followers, trailseffects.md Β§ Particles
Shader moodRetro CRT, clean modern, glitch art, cinematic, dreamy, industrial, psychedelicshaders.md
Grid densityxs(8px) through xxl(40px), mixed per layerarchitecture.md Β§ Grid System
Coordinate spaceCartesian, polar, tiled, rotated, fisheye, MΓΆbius, domain-warpedeffects.md Β§ Transforms
FeedbackZoom tunnel, rainbow trails, ghostly echo, rotating mandala, color evolutioncomposition.md Β§ Feedback
MaskingCircle, ring, gradient, text stencil, animated iris/wipe/dissolvecomposition.md Β§ Masking
TransitionsCrossfade, wipe, dissolve, glitch cut, iris, mask-based revealshaders.md Β§ Transitions
ComponentBudget
-------------------
Feature extraction1-5ms
Effect function2-15ms
Character render80-150ms (bottleneck)
Shader pipeline5-25ms
Total~100-200ms/frame
FileContents
----------------
references/architecture.mdGrid system, resolution presets, font selection, character palettes (20+), color system (HSV + OKLAB + discrete RGB + harmony generation), _render_vf() helper, GridLayer class
references/composition.mdPixel blend modes (20 modes), blend_canvas(), multi-grid composition, adaptive tonemap(), FeedbackBuffer, PixelBlendStack, masking/stencil system
references/effects.mdEffect building blocks: value field generators, hue fields, noise/fBM/domain warp, voronoi, reaction-diffusion, cellular automata, SDFs, strange attractors, particle systems, coordinate transforms, temporal coherence
references/shaders.mdShaderChain, _apply_shader_step() dispatch, 38 shader catalog, audio-reactive scaling, transitions, tint presets, output format encoding, terminal rendering
references/scenes.mdScene 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
references/inputs.mdAudio analysis (FFT, bands, beats), video sampling, image conversion, text/lyrics, TTS integration (ElevenLabs, voice assignment, audio mixing)
references/optimization.mdHardware detection, quality profiles, vectorized patterns, parallel rendering, memory management, performance budgets
references/troubleshooting.mdNumPy broadcasting traps, blend mode pitfalls, multiprocessing/pickling, brightness diagnostics, ffmpeg issues, font problems, common mistakes


Creative Divergence (use only when user requests experimental/creative/unique output)

If the user asks for creative, experimental, surprising, or unconventional output, select the strategy that best fits and reason through its steps BEFORE generating code.

  • - Forced Connections β€” when the user wants cross-domain inspiration ("make it look organic," "industrial aesthetic")
  • - Conceptual Blending β€” when the user names two things to combine ("ocean meets music," "space + calligraphy")
  • - Oblique Strategies β€” when the user is maximally open ("surprise me," "something I've never seen")
  • Forced Connections

    1. Pick a domain unrelated to the visual goal (weather systems, microbiology, architecture, fluid dynamics, textile weaving)

    2. List its core visual/structural elements (erosion β†’ gradual reveal; mitosis β†’ splitting duplication; weaving β†’ interlocking patterns)

    3. Map those elements onto ASCII characters and animation patterns

    4. Synthesize β€” what does "erosion" or "crystallization" look like in a character grid?

    Conceptual Blending

    1. Name two distinct visual/conceptual spaces (e.g., ocean waves + sheet music)

    2. Map correspondences (crests = high notes, troughs = rests, foam = staccato)

    3. Blend selectively β€” keep the most interesting mappings, discard forced ones

    4. Develop emergent properties that exist only in the blend

    Oblique Strategies

    1. Draw one: "Honor thy error as a hidden intention" / "Use an old idea" / "What would your closest friend do?" / "Emphasize the flaws" / "Turn it upside down" / "Only a part, not the whole" / "Reverse"

    2. Interpret the directive against the current ASCII animation challenge

    3. Apply the lateral insight to the visual design before writing code