plugins/ffmpeg-effects/skills/ffmpeg-animation-timing-reference/SKILL.md
Definitive reference for FFmpeg and ASS/SSA animation timing units, optimal durations, and best practices. PROACTIVELY activate for: (1) Animation timing questions, (2) ASS subtitle timing, (3) Karaoke timing tags, (4) Caption duration calculation, (5) Transition duration selection, (6) Fade/zoom timing, (7) Frame rate considerations, (8) Platform-specific timing (TikTok/Shorts/Reels), (9) Readability formulas, (10) Audio-video sync tolerances. Provides: Complete time unit reference tables, optimal duration guidelines, psychology-based timing recommendations, caption readability formulas, and platform-specific timing profiles.
npx skillsauth add JosiahSiegel/claude-plugin-marketplace ffmpeg-animation-timing-referenceInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
MANDATORY: Always Use Backslashes on Windows for File Paths
When using Edit or Write tools on Windows, you MUST use backslashes (\) in file paths, NOT forward slashes (/).
NEVER create new documentation files unless explicitly requested by the user.
This skill is the authoritative answer to "what unit is this timing value in?" and "how long should this animation be?" for FFmpeg filters and ASS/SSA subtitles. Use it whenever animation, transition, caption, or sync timing is in play.
| Context | Unit | Example |
|---------|------|---------|
| FFmpeg filters (fade, xfade, drawtext) | Seconds | duration=1.5 |
| FFmpeg zoompan d= parameter | Frames | d=150 (150 frames) |
| FFmpeg time variable t | Seconds | enable='gte(t,2)' |
| ASS karaoke tags (\k, \kf, \ko) | Centiseconds | {\k100} = 1 second |
| ASS animation tags (\t, \fad, \move) | Milliseconds | \t(0,500,...) = 0.5s |
| ASS dialogue timestamps | H:MM:SS.CC | 0:00:05.50 |
This is the most common source of confusion in subtitle animations. Karaoke tags use centiseconds; everything else (animation, fade, move) uses milliseconds. Mixing them up causes animations to run 10x too fast or 10x too slow.
| Tag Type | Unit | Conversion | Example |
|----------|------|------------|---------|
| Karaoke tags (\k, \kf, \ko, \K) | Centiseconds (1/100s) | x 100 | {\k50} = 0.5 seconds |
| Animation tags (\t) | Milliseconds (1/1000s) | x 1000 | \t(0,200,...) = 0.2 seconds |
| Fade tags (\fad) | Milliseconds | x 1000 | \fad(300,0) = 0.3s fade in |
| Move tags (\move) | Milliseconds | x 1000 | \move(x1,y1,x2,y2,0,500) = 0.5s |
| Dialogue timestamps | H:MM:SS.CC | Centiseconds | 0:00:01.50 = 1.5 seconds |
; Both animations last 0.5 seconds but use DIFFERENT UNITS:
; Karaoke: 50 CENTISECONDS = 0.5 seconds
{\k50}Word
; Animation: 500 MILLISECONDS = 0.5 seconds
{\t(0,500,\fscx120)}Word
For full karaoke, fade, and move examples plus centisecond/millisecond conversion tables, see references/copy-paste-patterns.md.
Most FFmpeg filters take seconds (floating point). The big exception is zoompan d=, which is in frames.
| Filter / Context | Parameter | Unit |
|------------------|-----------|------|
| fade / afade | d, st | Seconds |
| xfade / acrossfade | duration, offset | Seconds |
| drawtext | t variable, enable | Seconds |
| zoompan | d | Frames |
| zoompan | t variable inside z= | Seconds |
| trim | start, end | Seconds |
| fps | fps | Frames/second |
# d= is FRAMES. For a 2-second zoom:
# 30fps: d=60 (60 frames / 30fps)
# 60fps: d=120 (120 frames / 60fps)
# Formula: frames = seconds * fps
ffmpeg -i input.mp4 -vf "zoompan=z='1.2':d=60:s=1080x1920" output.mp4
For viral-style hooks always use d=1 (per-frame processing) and gate the effect with a time conditional like if(lt(t,0.5),...). Setting d=60 would freeze the rest of the video. Full hook formulas and platform-specific zoom parameters are in references/optimal-durations.md.
references/optimal-durations.md) and platform pacing (references/platform-and-sync.md).references/platform-and-sync.md.references/easing-and-springs.md).references/copy-paste-patterns.md and adapt parameters.Pull the right reference based on the question:
| Question shape | Load |
|----------------|------|
| "How long should this caption / transition / hook be?" | references/optimal-durations.md |
| "Why does my caption feel too fast / fail WCAG?" | references/caption-readability.md |
| "Does this work for TikTok / Shorts / Reels / broadcast?" | references/platform-and-sync.md |
| "Is my lip sync / beat sync within tolerance?" | references/platform-and-sync.md |
| "Will this duration look smooth at 30fps / 60fps?" | references/platform-and-sync.md |
| "Which easing curve / spring should I use?" | references/easing-and-springs.md |
| "Give me a ready-to-paste timing snippet." | references/copy-paste-patterns.md |
| Duration | Use For | |----------|---------| | 50-100ms | Glitch, flash | | 100-200ms | Quick UI feedback | | 200-300ms | Standard animation | | 300-500ms | Smooth transition | | 500-800ms | Noticeable movement | | 800-1500ms | Dramatic effect | | 1.5-3s | Caption display | | 3-5s | Long text reading |
Hard floors: WCAG minimum caption duration is 1.5s. Minimum perceivable animation is ~67ms at 30fps, ~33ms at 60fps. Lip sync tolerance is +/-80ms (target +/-40ms).
In-skill references (load on demand):
references/optimal-durations.md - Human perception thresholds, recommended durations for text animations, video transitions, hook effects, karaoke; viral-video 1.3s attention threshold and platform-specific zoom parameters/hook formulas.references/caption-readability.md - Reading speed standards (WPM), caption duration formula, Python implementation, WCAG 2.2 accessibility requirements.references/platform-and-sync.md - TikTok / YouTube Shorts / Instagram Reels / Broadcast timing profiles, audio-video sync tolerances (lip sync, music, karaoke, SFX), frame rate precision and frame-safe duration table.references/easing-and-springs.md - Material Design timing, FFmpeg easing expressions, complete easing formulas (linear, quadratic, cubic, exponential, sine, circular, elastic, bounce, back), spring physics (mass-spring-damper), oscillation/wave/Lissajous formulas, pseudo-random noise, jitter/shake, fade/scale/position/rotation cookbook, biological rhythms, sources.references/copy-paste-patterns.md - Ready-to-paste FFmpeg and ASS timing snippets, frame rate conversion table, zoompan duration calculation.ffmpeg-karaoke-animated-text - Karaoke subtitle creationviral-video-animated-captions - CapCut-style animationsffmpeg-transitions-effects - Video transitionsviral-video-hook-templates - Hook timing patternsffmpeg-captions-subtitles - Subtitle fundamentalsdevelopment
This skill should be used when the user asks to train, debug, scale, or improve ML models. PROACTIVELY activate for: (1) PyTorch, TensorFlow/Keras, JAX, Flax, Hugging Face Trainer/Accelerate training loops, (2) distributed training, DDP/FSDP/DeepSpeed, TPU/GPU setup, (3) mixed precision AMP/bf16, gradient accumulation, checkpointing, seeding, (4) overfitting, imbalance, loss functions, regularization, LR schedules, warmup, (5) memory optimization, gradient checkpointing, offloading, quantization-aware training. Provides: reproducible training best practices across deep learning and classical ML.
development
This skill should be used when the user asks to productionize, track, version, govern, monitor, or automate ML systems. PROACTIVELY activate for: (1) MLflow, Weights & Biases, Neptune, Comet, ClearML experiment tracking, (2) model registry, model versioning, artifact lineage, reproducibility, (3) Kubeflow, SageMaker Pipelines, Vertex AI Pipelines, Azure ML pipelines, Databricks workflows, (4) CI/CD, continuous training/evaluation, A/B tests, canary/shadow deployments, (5) drift detection, model monitoring, data validation, responsible AI governance. Provides: end-to-end MLOps architecture and operational safeguards.
development
This skill should be used when the user asks to optimize, export, serve, compress, or accelerate ML inference. PROACTIVELY activate for: (1) latency, throughput, p95/p99, batching, concurrency, KV cache, memory, or cost issues, (2) quantization INT8/INT4, GPTQ, AWQ, bitsandbytes, pruning, sparsity, distillation, (3) ONNX export, ONNX Runtime, TensorRT, TorchScript, torch.compile, XLA, OpenVINO, Core ML, TFLite, (4) Triton, TorchServe, TF Serving, BentoML, Seldon, KServe configuration, (5) edge deployment, CPU/GPU/TPU/Inferentia serving. Provides: hardware-aware inference optimization and safe benchmarking.
testing
This skill should be used when the user asks to tune hyperparameters, run sweeps, optimize search spaces, or use AutoML. PROACTIVELY activate for: (1) Optuna, Ray Tune, FLAML, AutoGluon, Hyperopt, Nevergrad, KerasTuner, W&B sweeps, (2) grid search, random search, Bayesian optimization, TPE, Gaussian processes, evolutionary search, (3) ASHA, Hyperband, successive halving, multi-fidelity optimization, population-based training, (4) learning-rate finder, batch-size search, early stopping, pruning, (5) reproducible sweep design and experiment analysis. Provides: budget-aware hyperparameter search strategy.