Initial commit: M4 Pro optimized overlay pipeline

This commit is contained in:
Erhan Keseli
2026-01-20 20:20:14 +01:00
commit 98026e0087
8 changed files with 193 additions and 0 deletions

49
README.md Normal file
View File

@@ -0,0 +1,49 @@
# 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
1. **Create and activate a virtual environment:**
```bash
python3 -m venv venv
source venv/bin/activate
```
2. **Install dependencies:**
```bash
pip install -r requirements.txt
```
## Files
- `render.sh`: The main script to trigger the rendering process.
- `ffmpeg-profiles.json`: Custom FFmpeg profiles, including `m4-youtube` for 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:
```bash
./render.sh <PATH_TO_FIT_FILE> <PATH_TO_VIDEO_FILE>
```
### Example:
```bash
./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.xml` and `power_layout.xml` by editing the `render.sh` script or modifying the command line arguments.
- **Hardware Acceleration**: The `m4-youtube` profile in `ffmpeg-profiles.json` is configured to use `h264_videotoolbox` for fast rendering on macOS.