Skip to main content

srtgeotag

srtgeotag extracts still frames from drone video and embeds the matching DJI SRT telemetry in each image. It works as both a Python library and a command-line tool.

Features

  • Single videos, multiple videos, or every video in a directory
  • Automatic same-name SRT discovery, including .SRT on case-sensitive systems
  • Sampling by frames per second or by time interval
  • JPEG, PNG, and WebP output
  • Standard EXIF GPS, altitude, capture time, ISO, exposure, aperture, and focal length
  • Complete telemetry preserved as compact JSON in EXIF ImageDescription and UserComment
  • Fast, single-pass extraction with FFmpeg; no ExifTool or source-FPS argument required
  • Live progress bars for frame extraction and EXIF telemetry tagging

Requirements and installation

Install FFmpeg and make sure ffmpeg is on PATH, then:

pip install srtgeotag

For local development:

python -m pip install -e ".[dev]"

To install directly from a downloaded or cloned project folder:

cd srtgeotag
python -m pip install .
srtgeotag --version

CLI

The SRT is found beside each video by matching its filename stem.

# One frame per second
srtgeotag DJI_0001.MP4 -o frames --fps 1 --format jpg

# One frame every two seconds
srtgeotag DJI_0001.MP4 -o frames --interval 2 --format png

# Several files (all frames go into the same directory)
srtgeotag DJI_0001.MP4 DJI_0002.MP4 -o frames --fps 0.5

# Optionally use one named subdirectory per video
srtgeotag DJI_0001.MP4 DJI_0002.MP4 -o frames --fps 0.5 --separate-directories

# Every supported video in a directory
srtgeotag ./flight -o frames --interval 5

Use --overwrite to replace existing numbered images. Progress is displayed by default; use --no-progress when running in scripts or CI. Run srtgeotag --help for all options.

Python API

from srtgeotag import extract_video, extract_videos, parse_srt

result = extract_video(
    "DJI_0001.MP4",
    "frames",
    fps=0.5,                 # one image every two seconds
    image_format="jpg",
)
print(result.frames)

telemetry = parse_srt("DJI_0001.SRT")
print(telemetry[0].latitude, telemetry[0].longitude)

extract_video() accepts srt=... for an explicitly named subtitle and ffmpeg=... for a custom executable path. By default, extract_videos() writes the entire batch into one directory and prefixes filenames with each video's stem. Pass separate_directories=True to create one named subdirectory per video.

Telemetry mapping

Each output image is matched to the nearest SRT record using elapsed video time. This avoids accumulated timing errors for fractional rates such as 29.97 fps. Latitude, longitude, absolute altitude, capture time, ISO, shutter/exposure time, aperture, exposure bias, and focal length use standard EXIF fields. DJI-only values such as relative altitude, color mode, and color temperature remain available in the embedded JSON payload.

License

MIT

About AutoWaypoints.com

This project is open-sourced by AutoWaypoints.com, a DJI drone mission-planning platform for automated mapping, photogrammetry, 3D capture, and Gaussian splatting workflows.

Metadata

Release files for srtgeotag 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for srtgeotag 0.2.0
File Size Uploaded Provenance
srtgeotag-0.2.0.tar.gz 11.4 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for srtgeotag 0.2.0
File Interpreter ABI Platform
srtgeotag-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.5 kB

Release files / srtgeotag-0.2.0.tar.gz

Download URL srtgeotag-0.2.0.tar.gz
Size 11.4 kB
Tags Source
SHA-256 checksum
How to use checksums
945a37adeff5f498ec9486cda7cad003f48cc36d339cd4ada39029bff210ffd5
BLAKE2b-256 checksum
How to use checksums
7aecc6972fff54979fe9bbe4d44bda8c3d24907c10a23122092caa2be4e88467
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 14, 2026.

Transparency log

Release files / srtgeotag-0.2.0-py3-none-any.whl

Download URL srtgeotag-0.2.0-py3-none-any.whl
Size 12.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cb7dc1a1051a5f8a59775d7016906430181c6816fa253253e7b5e247c12d201d
BLAKE2b-256 checksum
How to use checksums
272447ea845809e3ffd5645531ffac256afd8805b820250a18cba972e037e7dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 14, 2026.

Transparency log

Security for srtgeotag 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for srtgeotag-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 14, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page