Web UI for telemetry video overlay configuration and preview
Project description
GPStitch
A visual web interface for creating video overlays with GPS telemetry data. Wraps the powerful gopro-overlay library with an intuitive UI.
Features
- Quick Mode — Select from predefined layouts, customize units and map styles
- Advanced Mode — Visual drag-and-drop editor for creating custom overlay layouts
- Live Preview — See your overlay in real-time as you configure it
- DJI Drone Support — Automatic SRT telemetry parsing with timezone and time alignment auto-detection
- DJI Osmo Action Support — Automatic detection of embedded GPS from DJI GPS Bluetooth Remote Controller (Action 4/5/6) — no secondary file needed
- Non-GoPro Video Support — Use any video with external GPX/FIT/SRT files for GPS data
- Vertical Video Support — Automatic rotation detection and correct overlay rendering
- GPS Quality Analysis — Automatic signal quality check with warnings before rendering
- Template Management — Save and load custom templates
- Batch Rendering — Process multiple files with the same settings
- Shared GPX Batch Render — Apply a single GPX track to multiple videos with automatic odometer offset per video
- Background Jobs — Render videos in the background with progress tracking
- Overlay-Only Mode — Render transparent telemetry overlays (no video) for compositing in Final Cut Pro, DaVinci Resolve, etc.
Screenshots
Quick Mode
Simple configuration with predefined layouts. Perfect for quick renders.
Advanced Mode
Full visual editor with drag-and-drop widgets. Create custom layouts with complete control.
DJI Drone Support
Use DJI drone videos with SRT telemetry files. Timezone offset and time alignment are automatically detected from video metadata, supporting different DJI models and firmware versions.
Camera metrics (ISO, shutter, f-number, EV, color temperature) from SRT files are displayed directly on the video overlay.
External GPX & Vertical Video
Use any video with external GPX/FIT files. Vertical videos are automatically detected and rendered correctly.
Batch Rendering
Process multiple videos at once with the same overlay settings.
Shared GPX Batch Render
Apply a single GPX track to multiple videos recorded during the same activity. Each video automatically gets an odometer offset calculated from its creation time relative to the GPX track start, so the overlay shows the correct absolute distance from the beginning of the track.
Overlay-Only Mode
Render telemetry overlays with a transparent background — without any source video. Use a GPX, FIT, or SRT file as the primary input, and GPStitch will generate a video with an alpha channel that you can layer on top of your footage in any video editor (Final Cut Pro, DaVinci Resolve, Premiere Pro, etc.).
How to use:
- Upload a GPX, FIT, or SRT file as the primary file (no video needed)
- Configure your overlay layout and widgets as usual
- Select an encoding profile with transparency support:
- MOV (PNG) — Lossless quality, best compatibility with Final Cut Pro and DaVinci Resolve (large files)
- VP9 — Good quality with alpha channel, smaller files
- VP8 — Alpha channel support, widest browser compatibility
- Render — the output is a video with a transparent background ready for compositing
Command-Line Rendering
GPStitch includes gpstitch-dashboard, a CLI command that works as a drop-in replacement for gopro-dashboard.py with all GPStitch patches applied (DJI support, timecode preservation, audio copy, etc.).
Use the "Get Command" button in the UI to generate a ready-to-run gpstitch-dashboard command, then paste it into your terminal:
gpstitch-dashboard video.mp4 output.mp4 --layout xml --layout-xml layout.xml
This is useful for scripting, batch processing, or re-running renders without the UI.
Requirements
- Python 3.12+
- FFmpeg (must be installed and available in PATH)
- gopro-overlay (installed automatically)
Installation
pipx (recommended)
# Install FFmpeg first
# macOS: brew install ffmpeg
# Ubuntu: sudo apt install ffmpeg
# Windows: choco install ffmpeg
# Install GPStitch
pipx install gpstitch
# Run (opens browser automatically)
gpstitch
# Or with custom host/port
gpstitch --host 127.0.0.1 --port 8080
Optional: Cairo widgets support
Some layouts (e.g. example, example-2) use cairo-based widgets (gauges, circuit maps). These require pycairo, which needs the cairo system library:
# 1. Install system library
# macOS: brew install cairo pkg-config
# Ubuntu: sudo apt install libcairo2-dev pkg-config python3-dev
# 2. Install with cairo support (new install)
pipx install 'gpstitch[cairo]'
# Or add to existing installation
pipx inject gpstitch pycairo
Without pycairo, GPStitch works normally — cairo layouts will be marked as unavailable in the UI.
From source
# Install uv if not already installed
curl -LsSf https://astral.sh/uv/install.sh | sh
# Clone the repository
git clone https://github.com/Romancha/GPStitch.git
cd gpstitch
# Install dependencies
uv sync
# Run the application
uv run gpstitch
Then open http://localhost:8000 in your browser.
Supported Input Files
| Type | Formats | Description |
|---|---|---|
| Video | .mp4, .mov, .avi |
Video files (GoPro and DJI Action files may contain embedded GPS) |
| GPS Data | .gpx, .fit, .srt |
External GPS tracks — GPX, FIT, or DJI SRT telemetry (optional) |
Time Sync
When using a non-GoPro video with an external GPS file (GPX/FIT), the video and GPS track need to be aligned in time. GPStitch provides three synchronization modes in the Time Sync dropdown:
Auto (Recommended)
Automatically aligns the video to the GPS track using the video's embedded creation_time metadata (set by the camera when recording starts). GPStitch extracts this timestamp via ffprobe and cross-validates it against the GPS track's time range.
Timezone auto-detection: Some cameras (e.g., Insta360 Go 3S, certain DJI models) incorrectly write local time into the creation_time field instead of UTC as required by the MP4 specification. GPStitch detects this by checking whether the video time window overlaps with the GPS data. If it doesn't, GPStitch:
- Tries the file's creation date (
mtime) as an alternative timestamp - If
mtimealso doesn't overlap, attempts automatic timezone correction — computes the offset between the video and GPS midpoints, rounds to the nearest 15-minute timezone boundary (supporting offsets like UTC+5:45), and verifies the corrected time overlaps the GPS track. A warning is shown in the UI when this correction is applied (e.g., "Timezone corrected by -7h").
If no valid alignment can be found, GPStitch falls back to the original creation_time (shown as a warning in the UI). If no creation_time is found in the video metadata, GPStitch uses the file's creation date (less reliable, shown as a warning).
Use GPX Timestamps
Skips time alignment entirely. The GPS data is used as-is without synchronization with the video. This mode is useful when:
- The GPX file has been manually trimmed to exactly match the video segment
- You want the overlay to display the full GPS track regardless of video timing
Manual Offset
Works the same as Auto (uses video metadata for alignment), but allows you to apply a manual correction in seconds (+ or -). Use this when the automatic alignment is close but slightly off — for example, if the camera's clock was not perfectly synchronized with GPS time.
The UI shows the base timestamp and the adjusted result so you can see exactly how the offset is applied.
Note: For DJI drones with SRT files, time synchronization is handled automatically — the Time Sync options are not shown because GPStitch detects the correct alignment from the SRT telemetry data.
Configuration
Environment variables (prefix: GPSTITCH_):
| Variable | Default | Description |
|---|---|---|
HOST |
0.0.0.0 |
Server host |
PORT |
8000 |
Server port |
LOCAL_MODE |
true |
Use local file paths instead of uploads |
TEMPLATES_DIR |
~/.gpstitch/templates |
Custom templates directory |
ENABLE_GOPRO_PATCHES |
true |
Enable runtime patches for gopro-overlay |
USE_WRAPPER_SCRIPT |
true |
Use wrapper script for rendering |
You can also use a .env file in the project root.
Runtime Patches
GPStitch includes runtime patches for gopro-overlay that add:
- Timecode preservation — Maintains original video timecode for Final Cut Pro compatibility
- Audio stream copy — Preserves audio without re-encoding
- Metadata preservation — Keeps original video metadata in output
- DJI camera metrics — Extends overlay engine with ISO, shutter, f-number, EV, color temperature, and focal length from DJI SRT files
- DJI Osmo Action GPS — Loads embedded protobuf GPS telemetry from DJI Action cameras with GPS Bluetooth Remote Controller
- Odometer offset — Allows odometer to start from a custom offset value for shared GPX batch rendering
Patches are applied automatically at startup. To disable:
export GPSTITCH_ENABLE_GOPRO_PATCHES=false
export GPSTITCH_USE_WRAPPER_SCRIPT=false
Development
# Install with dev dependencies
uv sync --all-extras
# Linting and formatting
uv run ruff check src tests
uv run ruff format src tests
# Run tests
uv run pytest
# Run all checks (lint + format + tests)
uv run ruff check src tests && uv run ruff format src tests && uv run pytest
# Run E2E tests (requires: uv run playwright install chromium)
uv run pytest tests/e2e/ -v
Project Structure
src/gpstitch/
├── main.py # CLI entry point
├── app.py # FastAPI application
├── config.py # Settings
├── api/ # API routers
├── models/ # Pydantic data models
├── services/ # Business logic
└── static/ # Frontend assets
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the GPL-3.0 License - see the LICENSE file for details.
Acknowledgments
- gopro-dashboard-overlay — The underlying overlay rendering engine
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gpstitch-0.14.0.tar.gz.
File metadata
- Download URL: gpstitch-0.14.0.tar.gz
- Upload date:
- Size: 67.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2bd414eb3efad2721347b09ec13d4ae7025296be74825dae5c51ff31dee2661f
|
|
| MD5 |
e934f71ee47370bcef809d57394e74b9
|
|
| BLAKE2b-256 |
09b6daf1e2772221525c4fb3f4fe20a4dd54d411d9664e62b560ee557b4bc6e8
|
Provenance
The following attestation bundles were made for gpstitch-0.14.0.tar.gz:
Publisher:
publish.yml on Romancha/GPStitch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gpstitch-0.14.0.tar.gz -
Subject digest:
2bd414eb3efad2721347b09ec13d4ae7025296be74825dae5c51ff31dee2661f - Sigstore transparency entry: 1262514661
- Sigstore integration time:
-
Permalink:
Romancha/GPStitch@4571962226ae0828aed7617c27066e3b3d3010a4 -
Branch / Tag:
refs/tags/v0.14.0 - Owner: https://github.com/Romancha
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4571962226ae0828aed7617c27066e3b3d3010a4 -
Trigger Event:
release
-
Statement type:
File details
Details for the file gpstitch-0.14.0-py3-none-any.whl.
File metadata
- Download URL: gpstitch-0.14.0-py3-none-any.whl
- Upload date:
- Size: 280.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34bde7d11e2c4e2eb24158ca585ea15d6154311796be5acb65d6b4e2c8df31b6
|
|
| MD5 |
211478970e5b05b89af8f36cb71ec649
|
|
| BLAKE2b-256 |
75bfd21d4d878eec907a16e691d52b62240f3cde7f38d4b8582d6dc8435e6824
|
Provenance
The following attestation bundles were made for gpstitch-0.14.0-py3-none-any.whl:
Publisher:
publish.yml on Romancha/GPStitch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gpstitch-0.14.0-py3-none-any.whl -
Subject digest:
34bde7d11e2c4e2eb24158ca585ea15d6154311796be5acb65d6b4e2c8df31b6 - Sigstore transparency entry: 1262514676
- Sigstore integration time:
-
Permalink:
Romancha/GPStitch@4571962226ae0828aed7617c27066e3b3d3010a4 -
Branch / Tag:
refs/tags/v0.14.0 - Owner: https://github.com/Romancha
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4571962226ae0828aed7617c27066e3b3d3010a4 -
Trigger Event:
release
-
Statement type: