motion-graphics
aryankumar06/claude-code-skillsGenerate motion graphics and animated videos using Python, FFmpeg, and Pillow. Use for: creating intro videos, data visualizations, animated diagrams, and text-based motion graphics.
16 stars
2 forks
Python
28 views
SKILL.md
name: motion-graphics description: "Generate motion graphics and animated videos using Python, FFmpeg, and Pillow. Use for: creating intro videos, data visualizations, animated diagrams, and text-based motion graphics."
Motion Graphics
This skill enables the creation of programmatic motion graphics and animations within the Manus sandbox environment.
Core Workflow
To create a motion graphics video, follow these steps:
- Define Animation Parameters: Determine the resolution (e.g., 1280x720), duration (e.g., 5 seconds), and framerate (e.g., 30 FPS).
- Choose an Implementation Strategy:
- Frame-by-Frame (Recommended): Use Python with
Pillowto draw each frame as an image, then assemble them withFFmpeg. - FFmpeg Filters: Use complex filtergraphs for simpler animations like scrolls, zooms, and overlays.
- Matplotlib Animation: Best for mathematical or data-driven motion graphics.
- Frame-by-Frame (Recommended): Use Python with
- Implement the Script: Create a Python script (refer to
scripts/generate_motion.pyfor a template) that:- Calculates a
progressvariable (0.0 to 1.0) for each frame. - Draws elements (shapes, text, images) based on the progress.
- Saves frames as numbered files (e.g.,
frame_0001.png).
- Calculates a
- Assemble and Encode: Use
FFmpegto combine frames into a final video file (e.g.,.mp4). - Clean Up: Delete all temporary frame files after the video is generated.
Bundled Resources
Scripts
scripts/generate_motion.py: A template script for frame-by-frame animation using Pillow and FFmpeg.
References
references/techniques.md: Detailed guide on animation techniques, FFmpeg filters, and best practices for high-quality output.
Guidelines for Quality
- Smoothness: Use a consistent framerate (30 or 60 FPS).
- Compatibility: Always use
-pix_fmt yuv420pin FFmpeg to ensure the output video plays correctly on all devices. - Resource Management: The sandbox has limited storage; avoid generating thousands of high-resolution frames without cleanup.
- Visuals: Use
Pillow'sImageDrawfor crisp vector-like shapes andImageFontfor professional typography.