Garmin Video Edit
This project provides a streamlined workflow for overlaying Garmin telemetry data onto video files, specifically optimized for macOS (M4 Pro). It utilizes the gopro-overlay toolset to generate high-quality data visualizations from Garmin .fit files.
Prerequisites
- Python 3.12+
- FFmpeg (installed via Homebrew:
brew install ffmpeg) - macOS (Optimized for Apple Silicon hardware acceleration)
Setup
-
Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate -
Install dependencies:
pip install -r requirements.txt
Files
render.sh: The main script to trigger the rendering process.ffmpeg-profiles.json: Custom FFmpeg profiles, includingm4-youtubefor hardware-accelerated H.264 encoding.pro_layout.xml/power_layout.xml: Custom XML layout definitions for the data overlay.Roboto-Medium.ttf: The font used for the overlay text.
Usage
To render a video with a Garmin telemetry overlay, use the render.sh script:
./render.sh <PATH_TO_FIT_FILE> <PATH_TO_VIDEO_FILE>
Example:
./render.sh 21595187246_ACTIVITY.fit footage.mp4
The script will generate an output file named overlay_footage.mov (where footage is the original filename).
Configuration
- Layouts: You can switch between
pro_layout.xmlandpower_layout.xmlby editing therender.shscript or modifying the command line arguments. - Hardware Acceleration: The
m4-youtubeprofile inffmpeg-profiles.jsonis configured to useh264_videotoolboxfor fast rendering on macOS.
Description
Languages
Shell
100%