ffmpeg-shapes-graphics
Complete shape and graphics overlay system. PROACTIVELY activate for: (1) Drawing rectangles (drawbox), (2) Grid overlays (drawgrid), (3) Circles and ellipses (geq), (4) Image watermarks and logos, (5) Lower third graphics, (6) Progress bars and indicators, (7) Animated overlays, (8) Blend modes and compositing, (9) Safe area guides, (10) Generated patterns (gradients, noise, checkerboards). Provides: Filter syntax reference, position expressions, color format guide, blend mode examples, performance optimization tips. Ensures: Professional graphics overlays and visual effects on video.
What this skill does
## CRITICAL GUIDELINES ### Windows File Path Requirements **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 (`/`). ### Documentation Guidelines **NEVER create new documentation files unless explicitly requested by the user.** --- ## Quick Reference | Shape | Filter | Command Example | |-------|--------|-----------------| | Rectangle | `drawbox` | `-vf "drawbox=x=100:y=100:w=200:h=150:color=red:t=fill"` | | Grid | `drawgrid` | `-vf "drawgrid=w=iw/3:h=ih/3:t=2:color=white"` | | Text | `drawtext` | `-vf "drawtext=text='Hello':x=10:y=10:fontsize=24"` | | Watermark | `overlay` | `[0:v][1:v]overlay=W-w-10:10` | | Position | Expression | |----------|------------| | Centered | `x=(iw-200)/2:y=(ih-150)/2` | | Bottom-right | `x=iw-w-10:y=ih-h-10` | | Full-width bar | `x=0:y=0:w=iw:h=80` | ## When to Use This Skill Use for **graphics and shape overlays**: - Drawing rectangles, boxes, borders - Adding watermarks and logos - Lower third graphics - Progress bars and indicators - Grid overlays and safe area guides --- # FFmpeg Shapes and Graphics (2025) Complete guide to drawing shapes, graphics overlays, and geometric patterns using FFmpeg. ## Shape Drawing Filters ### Available Drawing Filters | Filter | Purpose | Shapes | |--------|---------|--------| | drawbox | Draw rectangles/boxes | Rectangles, squares | | drawgrid | Draw grid patterns | Lines, grids | | drawtext | Draw text | Text, numbers | | geq | Geometric equation | Any (via expressions) | | overlay | Composite images | Any image/shape | | blend | Blend layers | Composite effects | ## Drawing Boxes (drawbox) ### Basic Rectangle ```bash # Draw red box ffmpeg -i video.mp4 \ -vf "drawbox=x=100:y=100:w=200:h=150:color=red:t=3" \ output.mp4 # Filled rectangle ffmpeg -i video.mp4 \ -vf "drawbox=x=100:y=100:w=200:h=150:color=red:t=fill" \ output.mp4 # Semi-transparent rectangle ffmpeg -i video.mp4 \ -vf "drawbox=x=100:y=100:w=200:h=150:[email protected]:t=fill" \ output.mp4 ``` ### Position Options ```bash # Centered box ffmpeg -i video.mp4 \ -vf "drawbox=x=(iw-200)/2:y=(ih-150)/2:w=200:h=150:color=blue:t=fill" \ output.mp4 # Box at bottom right ffmpeg -i video.mp4 \ -vf "drawbox=x=iw-210:y=ih-160:w=200:h=150:color=green:t=3" \ output.mp4 # Full-width bar at top ffmpeg -i video.mp4 \ -vf "drawbox=x=0:y=0:w=iw:h=80:[email protected]:t=fill" \ output.mp4 # Full-width bar at bottom ffmpeg -i video.mp4 \ -vf "drawbox=x=0:y=ih-80:w=iw:h=80:[email protected]:t=fill" \ output.mp4 ``` ### Letterbox/Pillarbox ```bash # Add letterbox bars (16:9 to 2.35:1) ffmpeg -i video_16x9.mp4 \ -vf "drawbox=x=0:y=0:w=iw:h=ih*0.12:color=black:t=fill,\ drawbox=x=0:y=ih-ih*0.12:w=iw:h=ih*0.12:color=black:t=fill" \ letterbox.mp4 # Add pillarbox bars (4:3 in 16:9 frame) ffmpeg -i video_4x3.mp4 \ -vf "scale=-1:1080,pad=1920:1080:(ow-iw)/2:0:black" \ pillarbox.mp4 ``` ### Animated Boxes ```bash # Growing box ffmpeg -i video.mp4 \ -vf "drawbox=x=100:y=100:w='min(t*50,300)':h='min(t*30,200)':color=red:t=fill" \ growing_box.mp4 # Moving box ffmpeg -i video.mp4 \ -vf "drawbox=x='mod(t*100,iw)':y=100:w=100:h=100:color=blue:t=fill" \ moving_box.mp4 # Pulsing opacity ffmpeg -i video.mp4 \ -vf "drawbox=x=100:y=100:w=200:h=150:color=red@'0.3+0.3*sin(t*3)':t=fill" \ pulsing_box.mp4 # Box appears at specific time ffmpeg -i video.mp4 \ -vf "drawbox=x=100:y=100:w=200:h=150:color=yellow:t=fill:enable='between(t,2,5)'" \ timed_box.mp4 ``` ### Multiple Boxes ```bash # Border/frame effect ffmpeg -i video.mp4 \ -vf "drawbox=x=0:y=0:w=iw:h=20:color=white:t=fill,\ drawbox=x=0:y=ih-20:w=iw:h=20:color=white:t=fill,\ drawbox=x=0:y=0:w=20:h=ih:color=white:t=fill,\ drawbox=x=iw-20:y=0:w=20:h=ih:color=white:t=fill" \ bordered.mp4 # Grid of boxes ffmpeg -i video.mp4 \ -vf "drawbox=x=0:y=0:w=iw/3:h=ih/3:[email protected]:t=fill,\ drawbox=x=iw/3:y=0:w=iw/3:h=ih/3:[email protected]:t=fill,\ drawbox=x=2*iw/3:y=0:w=iw/3:h=ih/3:[email protected]:t=fill" \ color_grid.mp4 ``` ## Drawing Grids (drawgrid) ### Basic Grid ```bash # Simple grid overlay ffmpeg -i video.mp4 \ -vf "drawgrid=w=100:h=100:t=1:[email protected]" \ grid.mp4 # Rule of thirds grid ffmpeg -i video.mp4 \ -vf "drawgrid=w=iw/3:h=ih/3:t=2:[email protected]" \ thirds.mp4 # Fine grid ffmpeg -i video.mp4 \ -vf "drawgrid=w=50:h=50:t=1:[email protected]" \ fine_grid.mp4 ``` ### Crosshair/Center Marker ```bash # Center crosshair ffmpeg -i video.mp4 \ -vf "drawbox=x=iw/2-1:y=0:w=2:h=ih:color=red:t=fill,\ drawbox=x=0:y=ih/2-1:w=iw:h=2:color=red:t=fill" \ crosshair.mp4 # Center circle marker (using multiple points) ffmpeg -i video.mp4 \ -vf "drawbox=x=iw/2-5:y=ih/2-5:w=10:h=10:color=red:t=2" \ center_marker.mp4 ``` ## Drawing Circles and Ellipses (geq) ### Using geq Filter for Circles ```bash # Draw circle outline ffmpeg -i video.mp4 \ -vf "geq=lum='if(between(sqrt(pow(X-iw/2,2)+pow(Y-ih/2,2)),100,105),255,lum(X,Y))':cb='cb(X,Y)':cr='cr(X,Y)'" \ circle_outline.mp4 # Filled circle (white) ffmpeg -i video.mp4 \ -filter_complex "\ color=c=white:s=1920x1080[c];\ [c]geq=lum='if(lt(sqrt(pow(X-W/2,2)+pow(Y-H/2,2)),200),255,0)':cb=128:cr=128[mask];\ [0:v][mask]overlay[v]" \ -map "[v]" \ filled_circle.mp4 ``` ### Using Overlay with Circle Images ```bash # More practical: overlay a circle image # First create circle image ffmpeg -f lavfi \ -i "color=c=red:s=200x200" \ -vf "geq=lum='if(lt(sqrt(pow(X-100,2)+pow(Y-100,2)),100),255,0)':cb=128:cr=128,format=rgba,colorchannelmixer=aa='if(lt(sqrt(pow(X-100,2)+pow(Y-100,2)),100),1,0)'" \ -frames:v 1 \ circle.png # Overlay circle on video ffmpeg -i video.mp4 -i circle.png \ -filter_complex "[0:v][1:v]overlay=100:100" \ video_with_circle.mp4 ``` ### Generate Shape Patterns ```bash # Radial gradient ffmpeg -f lavfi \ -i "color=c=black:s=500x500,geq=lum='255*sqrt(pow(X-W/2,2)+pow(Y-H/2,2))/(W/2)':cb=128:cr=128" \ -frames:v 1 \ radial_gradient.png # Checkerboard pattern ffmpeg -f lavfi \ -i "color=c=white:s=800x800,geq=lum='if(mod(floor(X/100)+floor(Y/100),2),255,0)':cb=128:cr=128" \ -frames:v 1 \ checkerboard.png # Diagonal stripes ffmpeg -f lavfi \ -i "color=c=black:s=800x600,geq=lum='if(mod(X+Y,100)<50,255,0)':cb=128:cr=128" \ -frames:v 1 \ stripes.png ``` ## Image Overlays ### Basic Overlay ```bash # Overlay logo at top-right corner ffmpeg -i video.mp4 -i logo.png \ -filter_complex "[0:v][1:v]overlay=W-w-10:10" \ watermarked.mp4 # Overlay at bottom-left ffmpeg -i video.mp4 -i logo.png \ -filter_complex "[0:v][1:v]overlay=10:H-h-10" \ watermarked.mp4 # Centered overlay ffmpeg -i video.mp4 -i overlay.png \ -filter_complex "[0:v][1:v]overlay=(W-w)/2:(H-h)/2" \ centered.mp4 ``` ### Overlay with Transparency ```bash # Scale and position logo with transparency ffmpeg -i video.mp4 -i logo.png \ -filter_complex "\ [1:v]format=rgba,colorchannelmixer=aa=0.5[logo];\ [0:v][logo]overlay=W-w-20:H-h-20" \ watermark_50.mp4 # Fade in logo ffmpeg -i video.mp4 -i logo.png \ -filter_complex "\ [1:v]format=rgba,fade=t=in:st=0:d=1:alpha=1[logo];\ [0:v][logo]overlay=W-w-10:10:enable='gte(t,1)'" \ fade_logo.mp4 ``` ### Animated Overlays ```bash # Moving logo across screen ffmpeg -i video.mp4 -i logo.png \ -filter_complex "\ [0:v][1:v]overlay=x='mod(t*100,W+w)-w':y=10" \ scrolling_logo.mp4 # Bouncing logo ffmpeg -i video.mp4 -i logo.png \ -filter_complex "\ [0:v][1:v]overlay=x='abs(mod(t*100,2*(W-w))-(W-w))':y='abs(mo
Related in Image & Video
watch
IncludedWatch a video (URL or local path). Downloads with yt-dlp, extracts auto-scaled frames with ffmpeg, pulls the transcript from captions (or Whisper API fallback), and hands the result to Claude so it can answer questions about what's in the video.
physical-ai-defect-image-generation
IncludedUse when the user wants to orchestrate defect image generation, run associated setup, or handle outputs on OSMO. The Day 0 path handles cold-start with USD-to-ROI, image-edit augmentation, and AnomalyGen to create initial PCBA datasets. The Day 1 path performs inference and labeling on real images. This skill helps with first-time asset setup, creation of finetuning checkpoints, and configuring deployment. Trigger keywords: defect image generation, dig workflow, dig pipeline, defect image detection workflow, aoi pipeline, aoi anomalygen, usd2roi anomalygen, day 0 pcba, day 1 pcba, day 1 real-photo alignment, day 1 manual roi, metal surface anomaly, glass defect, anomalygen finetune, setup_pcb, setup_metal, setup_glass, setup_pretrained, dig setup, dig datasets, dig pretrained checkpoint, dig image-edit endpoint.
accelint-react-best-practices
IncludedReact performance optimization and best practices. ALWAYS use this skill when working with any React code - writing components, hooks, JSX; refactoring; optimizing re-renders, memoization, state management; reviewing for performance; fixing hydration mismatches; debugging infinite re-renders, stale closures, input focus loss, animations restarting; preventing remounting; implementing transitions, lazy initialization, effect dependencies. Even simple React tasks benefit from these patterns. Covers React 19+ (useEffectEvent, Activity, ref props). Triggers - useEffect, useState, useMemo, useCallback, memo, inline components, nested components, components inside components, re-render, performance, hydration, SSR, Next.js, useDeferredValue, combined hooks.
elevenlabs-agents
IncludedBuild conversational AI voice agents with ElevenLabs Platform using React, JavaScript, React Native, or Swift SDKs. Configure agents, tools (client/server/MCP), RAG knowledge bases, multi-voice, and Scribe real-time STT. Use when: building voice chat interfaces, implementing AI phone agents with Twilio, configuring agent workflows or tools, adding RAG knowledge bases, testing with CLI "agents as code", or troubleshooting deprecated @11labs packages, Android audio cutoff, CSP violations, dynamic variables, or WebRTC config. Keywords: ElevenLabs Agents, ElevenLabs voice agents, AI voice agents, conversational AI, @elevenlabs/react, @elevenlabs/client, @elevenlabs/react-native, @elevenlabs/elevenlabs-js, @elevenlabs/agents-cli, elevenlabs SDK, voice AI, TTS, text-to-speech, ASR, speech recognition, turn-taking model, WebRTC voice, WebSocket voice, ElevenLabs conversation, agent system prompt, agent tools, agent knowledge base, RAG voice agents, multi-voice agents, pronunciation dictionary, voice speed control, elevenlabs scribe, @11labs deprecated, Android audio cutoff, CSP violation elevenlabs, dynamic variables elevenlabs, case-sensitive tool names, webhook authentication
humanizer
IncludedHumanize AI-generated text by detecting and removing patterns typical of LLM output. Rewrites text to sound natural, specific, and human. Uses 28 pattern detectors, 560+ AI vocabulary terms across 3 tiers, and statistical analysis (burstiness, type-token ratio, readability) for comprehensive detection. Use when asked to humanize text, de-AI writing, make content sound more natural/human, review writing for AI patterns, score text for AI detection, or improve AI-generated drafts. Covers content, language, style, communication, and filler categories.
generating-mermaid-diagrams
IncludedSalesforce architecture diagrams using Mermaid with ASCII fallback. Use this skill when generating text-based diagrams for Salesforce architecture, OAuth flows, ERDs, integration sequences, or Agentforce structure. TRIGGER when: user says "diagram", "visualize", "ERD", or asks for sequence diagrams, flowcharts, class diagrams, or architecture visualizations in Mermaid. DO NOT TRIGGER when: user wants PNG/SVG image output (use generating-visual-diagrams), or asks about non-Salesforce systems.