Complete end-to-end workflow examples. Each example is a full automation pipeline — from JSON configuration through composition building to rendered MP4 output — not a standalone script.
# 1. Pick an example
cd examples/basic_composition
# 2. Run it (auto-creates template if needed)
python run.pyThat's it! The script will:
- Create the After Effects template automatically
- Open After Effects
- Build your composition
- Render the final video
| Category | Example | Description |
|---|---|---|
| Content Creation | basic_composition | Build multi-scene videos from template compositions |
| Dynamic Text | text_animation | Update text layers with data-driven content from Python |
| Batch Rendering | render_only | Render existing .aep files without modification |
| Template Workflows | basic_composition | Programmatically generate .aep templates, then automate them |
| Example | What It Does | Time | Command |
|---|---|---|---|
| basic_composition | Creates intro + outro scenes | ~2 min | python run.py |
| text_animation | Multi-layer text with styles | ~2 min | python run.py |
| render_only | Renders .aep files (no automation) | ~10 sec | python render.py |
examples/basic_composition/ | Beginner
What You'll Learn:
- Automated template creation
- Timeline setup with scenes
- Text property updates
- Full automation workflow
Quick Start:
cd examples/basic_composition
python run.pyOutput: 10-second video with intro and outro scenes
What Happens:
- Checks for template, creates if missing
- Opens After Effects
- Creates FinalComposition with 2 scenes
- Updates text in each scene
- Renders to
output/FinalComposition.mp4
examples/text_animation/ | Beginner
What You'll Learn:
- Multiple text layers
- Different text styles
- Multi-line text with line breaks
- Dynamic content from Python
Quick Start:
cd examples/text_animation
python run.pyPerfect For: Tutorial videos, social media posts
Output: Video with multiple styled text layers
examples/render_only/ | Beginner
What You'll Learn:
- Rendering .aep files without automation
- Interactive vs command-line modes
- Smart composition defaults
- Batch rendering workflows
Quick Start:
cd examples/render_only
# Interactive mode (prompts for file)
python render.py
# Direct mode (renders immediately)
python render.py path/to/file.aep
# Specify composition
python render.py file.aep --comp "MyComp"Perfect For: Quick renders when you already have .aep files
Key Features:
- Auto-detects composition type (template vs automation output)
- Outputs to current directory by default
- Smart defaults:
ae_automation.aep→ FinalComposition,basic_template.aep→ IntroTemplate
- basic_composition - Learn the automation workflow
- text_animation - Master text manipulation
- render_only - Understand rendering workflows
- Modify the examples to fit your needs
- Combine techniques from multiple examples
- Build your own automation scripts
Folder Structure:
example_name/
├── run.py # Main script (auto-creates template & runs automation)
├── template.py # Template builder (auto-called by run.py if needed)
├── README.md # Documentation
└── output/ # Generated files (git-ignored)
├── basic_template.aep # Auto-created template
├── ae_automation.aep # Automation working file
└── FinalComposition.mp4 # Rendered video
Pipeline (Fully Automatic):
- Run
python run.py - Script auto-creates template if missing
- Opens After Effects and loads template
- Builds compositions and updates properties
- Renders final video to
output/
No manual steps - just run and go!
Folder Structure:
render_only/
├── render.py # Rendering script
├── README.md # Documentation
└── output/ # Rendered videos (git-ignored)
└── *.mp4 # Output files
Workflow:
- Run
python render.py - Select .aep file (or provide path)
- Choose composition (or use smart default)
- Video renders to
output/
Use when: You have existing .aep files and just need video output
Examples use Python dictionaries for configuration:
"project": {
"project_file": "./template.aep", # Template to use
"comp_name": "FinalComposition", # Output composition
"comp_fps": 29.97, # Frame rate
"comp_width": 1920, # Width
"comp_height": 1080, # Height
"comp_end_time": 10, # Duration (seconds)
"renderComp": True, # Render video?
"output_dir": "." # Output directory
}{
"name": "intro", # Scene name
"duration": 5, # Duration
"startTime": 0, # Start time
"template_comp": "IntroTemplate", # Source composition
"custom_actions": [...] # What to do
}{
"change_type": "update_layer_property",
"comp_name": "IntroTemplate",
"layer_name": "MainTitle",
"property_name": "Text.Source Text",
"value": "My Amazing Video"
}In run.py, modify:
"comp_end_time": 20 # 20 seconds instead of 10To build compositions without rendering:
"renderComp": FalseThen use render_only to render later.
In the timeline config:
{
"change_type": "update_layer_property",
"layer_name": "MainTitle",
"value": "Your Custom Text Here"
}"output_dir": "C:/MyVideos" # Custom directory- After Effects (2024, 2025, or 2026)
- Python 3.7+
- Package installed:
pip install after-effects-automation
- Startup script installed:
python install_ae_runner.py
- Environment configured:
cp .env.example .env # Edit .env with your AE path
📖 Full Setup: See Installation Guide
This is normal! First run creates the template automatically.
- Check
.envhas correctAFTER_EFFECT_FOLDER - Verify AE version matches path (2024 vs 2025)
- Install startup script:
python install_ae_runner.py
- For
basic_template.aep→ UseIntroTemplateorOutroTemplate - For
ae_automation.aep→ UseFinalComposition - Composition names are case-sensitive
- Enable scripting in AE: Edit > Preferences > Scripting & Expressions
- Check "Allow Scripts to Write Files and Access Network"
- Restart After Effects
- Verify startup script: Look for "AE Command Runner" in Window > Info
Update to latest version (bug was fixed in v0.0.4):
pip install --upgrade after-effects-automation📖 More Help: See Troubleshooting Guide
Each example follows a configuration-driven approach: you define the project structure and timeline in a Python dictionary (or JSON file), and the platform handles the rest. Start from an existing example and modify the config to match your use case.
# Create folder
mkdir examples/my_example
cd examples/my_example
# Create main script
touch run.py
touch template.py # Optional: if you need custom templates
touch README.md#!/usr/bin/env python3
import os
from ae_automation import Client
# Initialize
client = Client()
# Configuration
config = {
"project": {
"project_file": "./my_template.aep",
"comp_name": "FinalComposition",
"comp_fps": 29.97,
"comp_width": 1920,
"comp_height": 1080,
"comp_end_time": 10,
"renderComp": True,
"output_dir": ".",
"debug": False,
"resources": []
},
"timeline": [
{
"name": "scene1",
"duration": 10,
"startTime": 0,
"template_comp": "MyTemplate",
"custom_actions": []
}
]
}
# Run
if __name__ == "__main__":
# Save config
import json
with open("config.json", "w") as f:
json.dump(config, f, indent=2)
# Run automation
client.startBot("config.json")- Start by copying an existing example
- Modify gradually to understand what each part does
- Use
"debug": Trueto keep AE open for inspection - Test with short durations first
- Read the generated
ae_automation.aepfile to understand structure
- Main README - Package overview
- Installation Guide - Setup instructions
- CLI Guide - Command-line usage
- Troubleshooting - Problem solving
- Process Management - How it works
Have a useful example? Share it!
What makes a good example:
- Solves a real problem
- Well documented
- Single, clear purpose
- Works with latest version
- Includes output samples/screenshots
How to contribute:
- Create example folder in
examples/ - Add
run.py,README.md, and any other files - Test with AE 2024/2025
- Include clear documentation
- Submit pull request
Examples are part of the After Effects Automation package - MIT License