Skip to main content

generate PM5-style overlays for rowing videos from Concept2 FIT files

Project description

c2-overlay

Generate PM5-style overlays for rowing videos from Concept2 FIT files.

Creates accurate ASS subtitle overlays matching the Concept2 PM5 monitor display, synchronized with your workout video using metadata timestamps.

Features

  • PM5-style display: Shows time, split pace, stroke rate, distance, watts, and heart rate in a familiar layout
  • Automatic synchronization: Aligns workout data with video using creation timestamps
  • Interval workout support: Displays work/rest lap information with visual indicators
  • Rest overlay: Shows previous lap statistics during rest periods
  • Flexible output: Generate ASS subtitles or burn them directly into video

Installation

uvx c2-overlay video.mp4 workout.fit

Or install locally:

uv tool install c2-overlay

Usage

Basic usage (generates ASS subtitle file):

uvx c2-overlay video.mp4 workout.fit

Generate and lint the ASS output:

uvx c2-overlay video.mp4 workout.fit --lint

Lint an existing ASS file:

uvx c2-overlay-lint video.ass

Burn overlay into video:

uvx c2-overlay video.mp4 workout.fit --burn-in output.mp4

Adjust timing manually:

uvx c2-overlay video.mp4 workout.fit --offset 2.5

Override the video start timestamp (when metadata is missing/incorrect):

uvx c2-overlay video.mp4 workout.fit --video-start 2025-12-14T10:41:31Z

Options

  • -o, --out-ass PATH: Output .ass file path (default: same name as video)
  • --video-start ISO8601: Override video start timestamp (e.g. 2025-12-14T10:41:31Z)
  • --offset SECONDS: Manual offset adjustment in seconds (positive = later, negative = earlier)
  • --burn-in OUT_VIDEO: Burn overlay into video using ffmpeg
  • --label-font FONT: Font for labels (default: PragmataPro)
  • --value-font FONT: Font for values (default: PragmataPro Mono)
  • --fontsize SIZE: Value font size (default: scaled from resolution)
  • --left-margin PX: Left margin in pixels
  • --top-margin PX: Top margin (positions overlay from top)
  • --bottom-margin PX: Bottom margin (default positioning)
  • --box-alpha 0-255: Background transparency (0=opaque, 255=transparent, default: 112)
  • --no-interp: Disable per-second/per-meter interpolation (smaller ASS output)
  • --lint: Lint the generated ASS output and exit non-zero on errors
  • --lint-strict: Like --lint, but also fails on warnings
  • --crf VALUE: Video quality for burn-in (default: 18)
  • --preset PRESET: Encoding preset (default: veryfast)

Requirements

  • Python 3.12+
  • ffprobe (for video metadata)
  • ffmpeg (optional, for burn-in)

How it Works

  1. Extracts video creation timestamp from metadata
  2. Reads FIT file trackpoints with absolute timestamps
  3. Computes synchronization offset
  4. Generates ASS subtitle file with PM5-style overlay
  5. Optionally burns subtitles into video with ffmpeg

Display Layout

The overlay shows a bottom-left panel with two rows:

Row 1: TIME | SPLIT | S/M Row 2: METERS | WATTS | BPM

During rest intervals, the overlay displays:

  • Previous lap statistics
  • Rest countdown timer
  • Visual tinting and border highlighting

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

c2_overlay-0.2.0.tar.gz (30.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

c2_overlay-0.2.0-py3-none-any.whl (24.7 kB view details)

Uploaded Python 3

File details

Details for the file c2_overlay-0.2.0.tar.gz.

File metadata

  • Download URL: c2_overlay-0.2.0.tar.gz
  • Upload date:
  • Size: 30.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.3

File hashes

Hashes for c2_overlay-0.2.0.tar.gz
Algorithm Hash digest
SHA256 9194a8ee4cd160124d0e385f1b51772be7535d4d9dc05f75045a4d8e3c5f9634
MD5 509741221d0b57175338095b7a483c1a
BLAKE2b-256 cf90983a50e22ebcf71e210a05c61affb8d51fed12f13aca1fc749dfbc9dc280

See more details on using hashes here.

File details

Details for the file c2_overlay-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: c2_overlay-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 24.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.3

File hashes

Hashes for c2_overlay-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e240d15785edce29519bbdfdf7460b8ac71db15c538ba5ab8ec7a89bfc8df612
MD5 98d3247e181a9fa9dccfd5c4989eb5b0
BLAKE2b-256 3b7d9b15b5ba059be4a00d4c1fcec90a81cb2a259a97d49f7110d393e5dd081d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page