EVA (Exercise Video Automation) is a Python-based tool designed to automate the creation of exercise demonstration videos with text overlays. While built specifically for fitness content, EVA can be used for any video project that requires automated text overlays and clip concatenation.
- Automated Video Concatenation: Combine multiple video clips into a single output file
- Dynamic Text Overlays: Add multiple lines of text to each video segment
- Blank Slides: Insert black slides with centered text between video clips
- Script-Based Workflow: Define your entire video structure in a simple text-based script file
- Flexible Configuration: Use
.envfile for default settings or command-line arguments for one-off changes - Professional Styling: Text overlays with customizable fonts, colors, and stroke effects
- Exercise demonstration videos with movement descriptions
- Tutorial videos with step-by-step instructions
- Educational content with annotations
- Any video project requiring automated text overlays
- Python 3.7+
- uv - Fast Python package installer
- ImageMagick
- FFmpeg
# Install ImageMagick (Ubuntu/Debian)
sudo apt-get install imagemagick
# Install ImageMagick (macOS)
brew install imagemagick
# Install ImageMagick (Windows)
# Download from: https://imagemagick.org/script/download.php# macOS and Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
# Or via pip
pip install uv-
Clone or download this repository
-
Install Python dependencies using uv:
uv pip install moviepy python-dotenv
Or if you have a
requirements.txt:uv pip install -r requirements.txt
-
Create a
.envfile in the project root (see Configuration section)
Create a .env file in your project directory with the following required settings:
# Required: Path to ImageMagick binary
IMAGEMAGICK_BINARY=/usr/bin/convert
# Optional: Default paths (can be overridden by command-line arguments)
INPUT_DIR=/path/to/your/video/clips
SCRIPT_FILE=/path/to/your/script.txt
OUTPUT_FILE=/path/to/output.mp4Important: The IMAGEMAGICK_BINARY path is required and the program will exit with an error if not present.
Create a text file that defines your video structure. Each segment is separated by a blank line.
Text line 1
Text line 2
video_filename.mp4
Another text line
another_video.mp4
Title Slide
Subtitle or description
BLANK
Warm Up
Jumping Jacks - 30 seconds
warmup_jumpingjacks.mp4
Upper Body
Push-ups - 3 sets of 10
exercises_pushups.mp4
Rest Period
Take a 30 second break
BLANK
Cool Down
Stretching routine
cooldown_stretch.mp4
- Each segment consists of one or more text lines followed by a filename
- Text lines will be displayed as overlays on the video
- The last line of each segment is the video filename
- Use
BLANKas the filename to create a 5-second black slide with centered text - Separate segments with blank lines
- Video files should be in your
INPUT_DIR
If all settings are configured in your .env file:
uv run eva.pyOr with standard Python:
python eva.pyOverride .env settings with command-line arguments:
uv run eva.py -i /path/to/videos -s script.txt -o output.mp4Use .env for some settings and override others:
uv run eva.py -o different_output.mp4-i, --input: Directory containing input video files-s, --script: Path to script file-o, --output: Path and filename for output MP4 file
Note: Command-line arguments always take precedence over .env settings.
For a quick one-time run without installing dependencies globally:
# uv will automatically handle dependencies
uv run --with moviepy --with python-dotenv eva.py -i ./videos -s script.txt -o output.mp4Current default styling (can be modified in the code):
- Font: Arial Bold
- Font Size: 70pt
- Color: White
- Stroke: 2px black outline
- Position: Top-left with 10px margin (centered for BLANK slides)
EVA generates a single MP4 video file with:
- Codec: H.264 (libx264)
- Audio Codec: AAC
- Frame Rate: 30 FPS
- Resolution: Matches source videos (or 1920x1080 for BLANK slides)
Create a .env file with the correct path to your ImageMagick binary.
Run: uv pip install python-dotenv
Verify that ImageMagick is properly installed and the path in .env is correct.
Ensure all video files have compatible formats, codecs, and resolutions.
Processing time depends on:
- Number and length of video clips
- Video resolution and quality
- System hardware capabilities
The program displays total processing time upon completion.
EVA uses uv for faster and more reliable Python package management:
- 10-100x faster than pip for package installation
- Reliable dependency resolution
- Drop-in replacement for pip
- No virtual environment conflicts
Feel free to submit issues, feature requests, or pull requests to improve EVA.
Built with:
- MoviePy - Video editing library
- python-dotenv - Environment variable management
- ImageMagick - Image processing
- uv - Fast Python package installer
EVA - Making exercise video creation simple and automated.