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:

    python3 -m venv venv
    source venv/bin/activate
    
  2. Install dependencies:

    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:

./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.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.
Description
Garmin FIT Data Overlay
Readme 118 KiB
Languages
Shell 100%