dji-drone-metadata-embedder


Namedji-drone-metadata-embedder JSON
Version 1.1.2 PyPI version JSON
download
home_pageNone
SummaryPython CLI for embedding DJI drone telemetry from SRT logs into MP4 videos
upload_time2025-08-14 18:19:07
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT License Copyright (c) 2025, DJI Drone Metadata Embedder, Marcus Westermark Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords dji drone gps metadata srt telemetry video
VCS
bugtrack_url
requirements rich ffmpeg-python piexif
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # DJI Drone Metadata Embedder

[![GitHub Release]][release]
[![Version](https://img.shields.io/badge/version-1.1.2-blue)][release]
[![PyPI]][pypi]

A Python tool to embed telemetry data from DJI drone SRT files into MP4 video files.
This tool extracts GPS coordinates, altitude, camera settings and other telemetry data from SRT files and embeds
them as metadata in the corresponding video files.

> **Production Ready** ✅
> 
> All major milestones (M1-M4) completed! The tool features comprehensive documentation, 
> professional CLI, automated testing, and supports major DJI drone models.
> Future releases focus on new model support and community enhancements.

See the [Development Roadmap](docs/development_roadmap.md) for plans to expand this CLI tool into a Windows
application with a graphical interface.
For detailed setup instructions and a quick-start tutorial, see
[docs/installation.md](docs/installation.md) and [docs/user_guide.md](docs/user_guide.md).
Common problems are covered in [docs/troubleshooting.md](docs/troubleshooting.md).
Answers to frequently asked questions can be found in the [FAQ](docs/faq.md).

## Easy Windows install

### Option 1: Windows Package Manager (Recommended)
```powershell
winget install dji-embed
```

### Option 2: Bootstrap Script (Includes FFmpeg/ExifTool)
```powershell
iwr -useb https://raw.githubusercontent.com/CallMarcus/dji-drone-metadata-embedder/master/tools/bootstrap.ps1 | iex
```

### Option 3: Direct Download
Download the ready-to-run **dji-embed.exe** from the [GitHub Releases page](https://github.com/CallMarcus/dji-drone-metadata-embedder/releases).

### Option 4: Python Package
```powershell
pip install dji-drone-metadata-embedder
```

## macOS / Linux quick-start

```bash
brew install ffmpeg exiftool
sudo apt update && sudo apt install ffmpeg exiftool
pip install dji-drone-metadata-embedder
```

```bash
docker run --rm -v "$PWD":/data callmarcus/dji-embed -i *.MP4
```

<details>
<summary>Advanced</summary>

- Build from source with `pip install -r requirements.txt`
- Use the provided `Dockerfile` for custom images
- Review CI scripts under `.github/workflows`

</details>


## Features

- **Batch Processing**: Process entire directories of DJI drone footage automatically
- **GPS Metadata Embedding**: Embed GPS coordinates as standard metadata tags
- **Subtitle Track Preservation**: Keep telemetry data as subtitle track for overlay viewing
- **Multiple Format Support**: Handles different DJI SRT telemetry formats
- **Telemetry Export**: Export flight data to JSON, GPX, or CSV formats
- **DAT Flight Log Support**: Merge `.DAT` flight logs into metadata
- **Cross-Platform**: Works on Windows, macOS, and Linux
- **Progress Bar**: See processing status while videos are being embedded

## Supported DJI Models

**Fully Tested & Documented** (with sample fixtures):
- **DJI Mini 3/4 Pro** - Square bracket format `[latitude: xx.xxx] [longitude: xx.xxx]`
- **DJI Air 3** - HTML-style format with extended telemetry data
- **DJI Avata 2** - Legacy GPS format `GPS(lat,lon,alt)` with BAROMETER data  
- **DJI Mavic 3 Enterprise** - Extended format with RTK precision data

**Community Supported**:
- DJI Air 2S, Mavic 3, and other models using similar SRT formats
- See [troubleshooting guide](docs/troubleshooting.md) for model-specific issues

*New model support welcomed! See [Contributing Guide](CONTRIBUTING.md).*

## Requirements

 - Python 3.10 or higher
- FFmpeg
- ExifTool (optional, for additional metadata embedding)

## Usage

If the command `python` is not recognized, use `py` instead.

### Basic Usage

Process a single directory:
```bash
dji-embed embed /path/to/drone/footage
```

### Commands

```bash
dji-embed [OPTIONS] COMMAND [ARGS]...

Commands:
  embed    Embed telemetry from SRT files into MP4 videos
  check    Check media files for embedded metadata
  convert  Convert SRT telemetry to GPX or CSV
  doctor   Show system information and verify dependencies
  wizard   Launch interactive setup wizard
  gui      Launch graphical interface (placeholder)
  init     Perform initial setup (placeholder)

Global Options:
  --version   Show the version and exit
  -h, --help  Show this message and exit
```

### Embed Command Options

```bash
dji-embed embed [OPTIONS] DIRECTORY

Arguments:
  DIRECTORY          Directory containing MP4 and SRT files

Options:
  -o, --output DIRECTORY     Output directory
  --exiftool                 Also use ExifTool for GPS metadata
  --dat PATH                 DAT flight log to merge
  --dat-auto                 Auto-detect DAT logs matching videos
  --redact [none|drop|fuzz]  Redact GPS coordinates (default: none)
  -v, --verbose              Verbose output
  -q, --quiet                Suppress progress output
```

By default, processing shows a progress bar for each file.
Use `--verbose` for detailed output or `--quiet` to reduce messages.

### Examples

Process footage with custom output directory:
```bash
dji-embed embed "D:\DroneFootage\Flight1" -o "D:\ProcessedVideos"
```

Process with ExifTool for additional metadata:
```bash
dji-embed embed "D:\DroneFootage\Flight1" --exiftool
```

Check existing metadata in files:
```bash
dji-embed check "D:\DroneFootage\Flight1"
```

Run system diagnostics:
```bash
dji-embed doctor
```

### Convert Telemetry to Other Formats

Extract GPS track to GPX:
```bash
dji-embed convert gpx DJI_0001.SRT
```

Export telemetry to CSV:
```bash
dji-embed convert csv DJI_0001.SRT -o telemetry.csv
```

Batch convert directory to GPX:
```bash
dji-embed convert gpx /path/to/srt/files --batch
```

Batch convert directory to CSV:
```bash
dji-embed convert csv /path/to/srt/files --batch
```

### Check Existing Metadata

You can check if your videos or photos already contain GPS or altitude
information using the check command:

```bash
dji-embed check DJI_0001.MP4
dji-embed check /path/to/footage
```

See [docs/METADATA_CHECKER.md](docs/METADATA_CHECKER.md) for details.

## CLI Reference

### All Commands

#### `dji-embed embed` - Process Videos
Embed telemetry from SRT files into MP4 videos.

```bash
dji-embed embed [OPTIONS] DIRECTORY

Arguments:
  DIRECTORY                  Directory containing MP4 and SRT files

Options:
  -o, --output DIRECTORY     Output directory
  --exiftool                 Also use ExifTool for GPS metadata  
  --dat PATH                 DAT flight log to merge
  --dat-auto                 Auto-detect DAT logs matching videos
  --redact [none|drop|fuzz]  Redact GPS coordinates (default: none)
  -v, --verbose              Verbose output
  -q, --quiet                Suppress progress output
```

#### `dji-embed check` - Check Metadata
Check media files for existing embedded metadata.

```bash
dji-embed check [OPTIONS] [PATHS]...

Arguments:
  PATHS...                   Files or directories to check

Options:
  -v, --verbose              Verbose output
  -q, --quiet                Suppress info output
```

#### `dji-embed convert` - Export Formats
Convert SRT telemetry to GPX or CSV formats.

```bash
dji-embed convert [OPTIONS] {gpx|csv} INPUT

Arguments:
  {gpx|csv}                  Output format (GPX or CSV)
  INPUT                      SRT file or directory to convert

Options:
  -o, --output PATH          Output file path
  -b, --batch                Batch process directory
  -v, --verbose              Verbose output
  -q, --quiet                Suppress info output
```

#### `dji-embed doctor` - System Diagnostics
Show system information and verify all dependencies.

```bash
dji-embed doctor

No arguments or options required.
```

#### `dji-embed wizard` - Interactive Setup
Launch interactive setup wizard (under development).

```bash
dji-embed wizard

No arguments or options required.
```

## Output

The tool creates a `processed` subdirectory containing:

- `*_metadata.MP4` - Video files with embedded metadata and telemetry subtitles
- `*_telemetry.json` - Flight summary with GPS data, altitude, and camera settings

Example JSON output:
```json
{
  "filename": "DJI_0158.MP4",
  "first_gps": [59.302335, 18.203059],
  "average_gps": [59.302336, 18.203058],
  "max_altitude": 132.86,
  "max_relative_altitude": 1.5,
  "flight_duration": "00:00:00 - 00:00:32",
  "num_gps_points": 967,
  "camera_settings": {
    "iso": "2700",
    "shutter": "1/30.0",
    "fnum": "170"
  },
  "location": "Stockholm, Sweden"
}
```

## How It Works

1. **SRT Parsing**: Extracts telemetry data from DJI SRT subtitle files
2. **Metadata Embedding**: Uses FFmpeg to:
   - Add SRT as subtitle track (preserves all telemetry)
   - Embed GPS coordinates in video metadata
   - Add altitude and other metadata tags
3. **No Re-encoding**: Uses stream copy for fast processing without quality loss
4. **Summary Generation**: Creates JSON files with flight statistics

## SRT Format Support

The tool supports multiple DJI SRT formats:

### Format 1 (DJI Mini 3 Pro):
```
[latitude: 59.302335] [longitude: 18.203059] [rel_alt: 1.300 abs_alt: 132.860]
```

### Format 2 (Older models):
```
GPS(59.302335,18.203059,132.860)
```

## Use Cases

- **Photo Management**: Videos become searchable by location in Windows Photos, Google Photos, etc.
- **Video Editing**: Telemetry subtitle track can be used for overlay effects
- **Flight Analysis**: Export GPX tracks for Google Earth visualization
- **Archival**: Preserve all flight data within the video file itself

## Troubleshooting

See [docs/troubleshooting.md](docs/troubleshooting.md) for comprehensive troubleshooting.

### Check tool versions
Display the application, FFmpeg and ExifTool versions:
```bash
dji-embed --version
```

### Quick Fixes

#### "Python was not found"
Use `py` instead of `python`:
```bash
dji-embed doctor
```

#### "ffmpeg is not recognized"
Ensure FFmpeg is in your PATH. Test with:
```bash
ffmpeg -version
```
Note: `ffmpeg` uses a single dash. Using `ffmpeg --version` will result in `Unrecognized option '--version'`.

#### "Command not found: dji-embed"
If the command isn't found after installation:
```bash
python -m pip install --user dji-drone-metadata-embedder
# or
pipx install dji-drone-metadata-embedder
```

#### No GPS data in JSON output
1. Check that your SRT files contain GPS coordinates:
   ```bash
   dji-embed check /path/to/your/files
   ```
2. Open an SRT file in a text editor to verify the format
3. Run diagnostics to check for parsing issues:
   ```bash
   dji-embed doctor
   ```

#### Processing fails with "No matching MP4/SRT pairs"
Ensure your files follow the naming convention:
- Video: `DJI_0001.MP4`
- Subtitle: `DJI_0001.SRT`

#### Permission errors on Windows
Run PowerShell as Administrator or use the bootstrap installer:
```powershell
iwr -useb https://raw.githubusercontent.com/CallMarcus/dji-drone-metadata-embedder/master/tools/bootstrap.ps1 | iex
```

## Contributing

Contributions are welcome! Please feel free to submit issues or pull requests.

### Commit Message Format

This project uses [Conventional Commits](https://www.conventionalcommits.org/) for automatic changelog generation:

```bash
feat(cli): add new validate command
fix(parser): handle malformed SRT timestamps  
docs: update troubleshooting guide
```

See [docs/CHANGELOG_AUTOMATION.md](docs/CHANGELOG_AUTOMATION.md) for detailed guidelines.

### Adding Support for New Models

If your DJI model uses a different SRT format:
1. Open an issue with a sample SRT file
2. Or submit a PR with regex patterns for the new format

## Release

See [docs/RELEASE.md](docs/RELEASE.md) for instructions on publishing a new version.

## License

MIT License - see LICENSE file for details

## Acknowledgments

- Thanks to the DJI drone community for format documentation
- FFmpeg and ExifTool teams for their excellent tools

## Related Projects

- [exiftool](https://exiftool.org/) - Read/write metadata in media files
- [ffmpeg](https://ffmpeg.org/) - Media processing framework
- [gpx.py](https://github.com/tkrajina/gpxpy) - GPX file parser (for further processing)

## Disclaimer

This tool is not affiliated with or endorsed by DJI. Use at your own risk.

[GitHub Release]: https://img.shields.io/github/v/release/CallMarcus/dji-drone-metadata-embedder?logo=github
[release]: https://github.com/CallMarcus/dji-drone-metadata-embedder/releases
[PyPI]: https://img.shields.io/pypi/v/dji-drone-metadata-embedder?logo=pypi
[pypi]: https://pypi.org/project/dji-drone-metadata-embedder/

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "dji-drone-metadata-embedder",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "dji, drone, gps, metadata, srt, telemetry, video",
    "author": null,
    "author_email": "\"Marcus W.\" <marcus.westermark@altal.fi>",
    "download_url": "https://files.pythonhosted.org/packages/e9/28/31009fbab368533fe824562ac74de7d2c250f3fa385d60b56370db4a8e59/dji_drone_metadata_embedder-1.1.2.tar.gz",
    "platform": null,
    "description": "# DJI Drone Metadata Embedder\n\n[![GitHub Release]][release]\n[![Version](https://img.shields.io/badge/version-1.1.2-blue)][release]\n[![PyPI]][pypi]\n\nA Python tool to embed telemetry data from DJI drone SRT files into MP4 video files.\nThis tool extracts GPS coordinates, altitude, camera settings and other telemetry data from SRT files and embeds\nthem as metadata in the corresponding video files.\n\n> **Production Ready** \u2705\n> \n> All major milestones (M1-M4) completed! The tool features comprehensive documentation, \n> professional CLI, automated testing, and supports major DJI drone models.\n> Future releases focus on new model support and community enhancements.\n\nSee the [Development Roadmap](docs/development_roadmap.md) for plans to expand this CLI tool into a Windows\napplication with a graphical interface.\nFor detailed setup instructions and a quick-start tutorial, see\n[docs/installation.md](docs/installation.md) and [docs/user_guide.md](docs/user_guide.md).\nCommon problems are covered in [docs/troubleshooting.md](docs/troubleshooting.md).\nAnswers to frequently asked questions can be found in the [FAQ](docs/faq.md).\n\n## Easy Windows install\n\n### Option 1: Windows Package Manager (Recommended)\n```powershell\nwinget install dji-embed\n```\n\n### Option 2: Bootstrap Script (Includes FFmpeg/ExifTool)\n```powershell\niwr -useb https://raw.githubusercontent.com/CallMarcus/dji-drone-metadata-embedder/master/tools/bootstrap.ps1 | iex\n```\n\n### Option 3: Direct Download\nDownload the ready-to-run **dji-embed.exe** from the [GitHub Releases page](https://github.com/CallMarcus/dji-drone-metadata-embedder/releases).\n\n### Option 4: Python Package\n```powershell\npip install dji-drone-metadata-embedder\n```\n\n## macOS / Linux quick-start\n\n```bash\nbrew install ffmpeg exiftool\nsudo apt update && sudo apt install ffmpeg exiftool\npip install dji-drone-metadata-embedder\n```\n\n```bash\ndocker run --rm -v \"$PWD\":/data callmarcus/dji-embed -i *.MP4\n```\n\n<details>\n<summary>Advanced</summary>\n\n- Build from source with `pip install -r requirements.txt`\n- Use the provided `Dockerfile` for custom images\n- Review CI scripts under `.github/workflows`\n\n</details>\n\n\n## Features\n\n- **Batch Processing**: Process entire directories of DJI drone footage automatically\n- **GPS Metadata Embedding**: Embed GPS coordinates as standard metadata tags\n- **Subtitle Track Preservation**: Keep telemetry data as subtitle track for overlay viewing\n- **Multiple Format Support**: Handles different DJI SRT telemetry formats\n- **Telemetry Export**: Export flight data to JSON, GPX, or CSV formats\n- **DAT Flight Log Support**: Merge `.DAT` flight logs into metadata\n- **Cross-Platform**: Works on Windows, macOS, and Linux\n- **Progress Bar**: See processing status while videos are being embedded\n\n## Supported DJI Models\n\n**Fully Tested & Documented** (with sample fixtures):\n- **DJI Mini 3/4 Pro** - Square bracket format `[latitude: xx.xxx] [longitude: xx.xxx]`\n- **DJI Air 3** - HTML-style format with extended telemetry data\n- **DJI Avata 2** - Legacy GPS format `GPS(lat,lon,alt)` with BAROMETER data  \n- **DJI Mavic 3 Enterprise** - Extended format with RTK precision data\n\n**Community Supported**:\n- DJI Air 2S, Mavic 3, and other models using similar SRT formats\n- See [troubleshooting guide](docs/troubleshooting.md) for model-specific issues\n\n*New model support welcomed! See [Contributing Guide](CONTRIBUTING.md).*\n\n## Requirements\n\n - Python 3.10 or higher\n- FFmpeg\n- ExifTool (optional, for additional metadata embedding)\n\n## Usage\n\nIf the command `python` is not recognized, use `py` instead.\n\n### Basic Usage\n\nProcess a single directory:\n```bash\ndji-embed embed /path/to/drone/footage\n```\n\n### Commands\n\n```bash\ndji-embed [OPTIONS] COMMAND [ARGS]...\n\nCommands:\n  embed    Embed telemetry from SRT files into MP4 videos\n  check    Check media files for embedded metadata\n  convert  Convert SRT telemetry to GPX or CSV\n  doctor   Show system information and verify dependencies\n  wizard   Launch interactive setup wizard\n  gui      Launch graphical interface (placeholder)\n  init     Perform initial setup (placeholder)\n\nGlobal Options:\n  --version   Show the version and exit\n  -h, --help  Show this message and exit\n```\n\n### Embed Command Options\n\n```bash\ndji-embed embed [OPTIONS] DIRECTORY\n\nArguments:\n  DIRECTORY          Directory containing MP4 and SRT files\n\nOptions:\n  -o, --output DIRECTORY     Output directory\n  --exiftool                 Also use ExifTool for GPS metadata\n  --dat PATH                 DAT flight log to merge\n  --dat-auto                 Auto-detect DAT logs matching videos\n  --redact [none|drop|fuzz]  Redact GPS coordinates (default: none)\n  -v, --verbose              Verbose output\n  -q, --quiet                Suppress progress output\n```\n\nBy default, processing shows a progress bar for each file.\nUse `--verbose` for detailed output or `--quiet` to reduce messages.\n\n### Examples\n\nProcess footage with custom output directory:\n```bash\ndji-embed embed \"D:\\DroneFootage\\Flight1\" -o \"D:\\ProcessedVideos\"\n```\n\nProcess with ExifTool for additional metadata:\n```bash\ndji-embed embed \"D:\\DroneFootage\\Flight1\" --exiftool\n```\n\nCheck existing metadata in files:\n```bash\ndji-embed check \"D:\\DroneFootage\\Flight1\"\n```\n\nRun system diagnostics:\n```bash\ndji-embed doctor\n```\n\n### Convert Telemetry to Other Formats\n\nExtract GPS track to GPX:\n```bash\ndji-embed convert gpx DJI_0001.SRT\n```\n\nExport telemetry to CSV:\n```bash\ndji-embed convert csv DJI_0001.SRT -o telemetry.csv\n```\n\nBatch convert directory to GPX:\n```bash\ndji-embed convert gpx /path/to/srt/files --batch\n```\n\nBatch convert directory to CSV:\n```bash\ndji-embed convert csv /path/to/srt/files --batch\n```\n\n### Check Existing Metadata\n\nYou can check if your videos or photos already contain GPS or altitude\ninformation using the check command:\n\n```bash\ndji-embed check DJI_0001.MP4\ndji-embed check /path/to/footage\n```\n\nSee [docs/METADATA_CHECKER.md](docs/METADATA_CHECKER.md) for details.\n\n## CLI Reference\n\n### All Commands\n\n#### `dji-embed embed` - Process Videos\nEmbed telemetry from SRT files into MP4 videos.\n\n```bash\ndji-embed embed [OPTIONS] DIRECTORY\n\nArguments:\n  DIRECTORY                  Directory containing MP4 and SRT files\n\nOptions:\n  -o, --output DIRECTORY     Output directory\n  --exiftool                 Also use ExifTool for GPS metadata  \n  --dat PATH                 DAT flight log to merge\n  --dat-auto                 Auto-detect DAT logs matching videos\n  --redact [none|drop|fuzz]  Redact GPS coordinates (default: none)\n  -v, --verbose              Verbose output\n  -q, --quiet                Suppress progress output\n```\n\n#### `dji-embed check` - Check Metadata\nCheck media files for existing embedded metadata.\n\n```bash\ndji-embed check [OPTIONS] [PATHS]...\n\nArguments:\n  PATHS...                   Files or directories to check\n\nOptions:\n  -v, --verbose              Verbose output\n  -q, --quiet                Suppress info output\n```\n\n#### `dji-embed convert` - Export Formats\nConvert SRT telemetry to GPX or CSV formats.\n\n```bash\ndji-embed convert [OPTIONS] {gpx|csv} INPUT\n\nArguments:\n  {gpx|csv}                  Output format (GPX or CSV)\n  INPUT                      SRT file or directory to convert\n\nOptions:\n  -o, --output PATH          Output file path\n  -b, --batch                Batch process directory\n  -v, --verbose              Verbose output\n  -q, --quiet                Suppress info output\n```\n\n#### `dji-embed doctor` - System Diagnostics\nShow system information and verify all dependencies.\n\n```bash\ndji-embed doctor\n\nNo arguments or options required.\n```\n\n#### `dji-embed wizard` - Interactive Setup\nLaunch interactive setup wizard (under development).\n\n```bash\ndji-embed wizard\n\nNo arguments or options required.\n```\n\n## Output\n\nThe tool creates a `processed` subdirectory containing:\n\n- `*_metadata.MP4` - Video files with embedded metadata and telemetry subtitles\n- `*_telemetry.json` - Flight summary with GPS data, altitude, and camera settings\n\nExample JSON output:\n```json\n{\n  \"filename\": \"DJI_0158.MP4\",\n  \"first_gps\": [59.302335, 18.203059],\n  \"average_gps\": [59.302336, 18.203058],\n  \"max_altitude\": 132.86,\n  \"max_relative_altitude\": 1.5,\n  \"flight_duration\": \"00:00:00 - 00:00:32\",\n  \"num_gps_points\": 967,\n  \"camera_settings\": {\n    \"iso\": \"2700\",\n    \"shutter\": \"1/30.0\",\n    \"fnum\": \"170\"\n  },\n  \"location\": \"Stockholm, Sweden\"\n}\n```\n\n## How It Works\n\n1. **SRT Parsing**: Extracts telemetry data from DJI SRT subtitle files\n2. **Metadata Embedding**: Uses FFmpeg to:\n   - Add SRT as subtitle track (preserves all telemetry)\n   - Embed GPS coordinates in video metadata\n   - Add altitude and other metadata tags\n3. **No Re-encoding**: Uses stream copy for fast processing without quality loss\n4. **Summary Generation**: Creates JSON files with flight statistics\n\n## SRT Format Support\n\nThe tool supports multiple DJI SRT formats:\n\n### Format 1 (DJI Mini 3 Pro):\n```\n[latitude: 59.302335] [longitude: 18.203059] [rel_alt: 1.300 abs_alt: 132.860]\n```\n\n### Format 2 (Older models):\n```\nGPS(59.302335,18.203059,132.860)\n```\n\n## Use Cases\n\n- **Photo Management**: Videos become searchable by location in Windows Photos, Google Photos, etc.\n- **Video Editing**: Telemetry subtitle track can be used for overlay effects\n- **Flight Analysis**: Export GPX tracks for Google Earth visualization\n- **Archival**: Preserve all flight data within the video file itself\n\n## Troubleshooting\n\nSee [docs/troubleshooting.md](docs/troubleshooting.md) for comprehensive troubleshooting.\n\n### Check tool versions\nDisplay the application, FFmpeg and ExifTool versions:\n```bash\ndji-embed --version\n```\n\n### Quick Fixes\n\n#### \"Python was not found\"\nUse `py` instead of `python`:\n```bash\ndji-embed doctor\n```\n\n#### \"ffmpeg is not recognized\"\nEnsure FFmpeg is in your PATH. Test with:\n```bash\nffmpeg -version\n```\nNote: `ffmpeg` uses a single dash. Using `ffmpeg --version` will result in `Unrecognized option '--version'`.\n\n#### \"Command not found: dji-embed\"\nIf the command isn't found after installation:\n```bash\npython -m pip install --user dji-drone-metadata-embedder\n# or\npipx install dji-drone-metadata-embedder\n```\n\n#### No GPS data in JSON output\n1. Check that your SRT files contain GPS coordinates:\n   ```bash\n   dji-embed check /path/to/your/files\n   ```\n2. Open an SRT file in a text editor to verify the format\n3. Run diagnostics to check for parsing issues:\n   ```bash\n   dji-embed doctor\n   ```\n\n#### Processing fails with \"No matching MP4/SRT pairs\"\nEnsure your files follow the naming convention:\n- Video: `DJI_0001.MP4`\n- Subtitle: `DJI_0001.SRT`\n\n#### Permission errors on Windows\nRun PowerShell as Administrator or use the bootstrap installer:\n```powershell\niwr -useb https://raw.githubusercontent.com/CallMarcus/dji-drone-metadata-embedder/master/tools/bootstrap.ps1 | iex\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit issues or pull requests.\n\n### Commit Message Format\n\nThis project uses [Conventional Commits](https://www.conventionalcommits.org/) for automatic changelog generation:\n\n```bash\nfeat(cli): add new validate command\nfix(parser): handle malformed SRT timestamps  \ndocs: update troubleshooting guide\n```\n\nSee [docs/CHANGELOG_AUTOMATION.md](docs/CHANGELOG_AUTOMATION.md) for detailed guidelines.\n\n### Adding Support for New Models\n\nIf your DJI model uses a different SRT format:\n1. Open an issue with a sample SRT file\n2. Or submit a PR with regex patterns for the new format\n\n## Release\n\nSee [docs/RELEASE.md](docs/RELEASE.md) for instructions on publishing a new version.\n\n## License\n\nMIT License - see LICENSE file for details\n\n## Acknowledgments\n\n- Thanks to the DJI drone community for format documentation\n- FFmpeg and ExifTool teams for their excellent tools\n\n## Related Projects\n\n- [exiftool](https://exiftool.org/) - Read/write metadata in media files\n- [ffmpeg](https://ffmpeg.org/) - Media processing framework\n- [gpx.py](https://github.com/tkrajina/gpxpy) - GPX file parser (for further processing)\n\n## Disclaimer\n\nThis tool is not affiliated with or endorsed by DJI. Use at your own risk.\n\n[GitHub Release]: https://img.shields.io/github/v/release/CallMarcus/dji-drone-metadata-embedder?logo=github\n[release]: https://github.com/CallMarcus/dji-drone-metadata-embedder/releases\n[PyPI]: https://img.shields.io/pypi/v/dji-drone-metadata-embedder?logo=pypi\n[pypi]: https://pypi.org/project/dji-drone-metadata-embedder/\n",
    "bugtrack_url": null,
    "license": "MIT License\n        \n        Copyright (c) 2025, DJI Drone Metadata Embedder, Marcus Westermark\n        \n        Permission is hereby granted, free of charge, to any person obtaining a copy\n        of this software and associated documentation files (the \"Software\"), to deal\n        in the Software without restriction, including without limitation the rights\n        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n        copies of the Software, and to permit persons to whom the Software is\n        furnished to do so, subject to the following conditions:\n        \n        The above copyright notice and this permission notice shall be included in all\n        copies or substantial portions of the Software.\n        \n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n        SOFTWARE.",
    "summary": "Python CLI for embedding DJI drone telemetry from SRT logs into MP4 videos",
    "version": "1.1.2",
    "project_urls": {
        "Homepage": "https://github.com/CallMarcus/dji-drone-metadata-embedder",
        "Issues": "https://github.com/CallMarcus/dji-drone-metadata-embedder/issues",
        "Repository": "https://github.com/CallMarcus/dji-drone-metadata-embedder.git"
    },
    "split_keywords": [
        "dji",
        " drone",
        " gps",
        " metadata",
        " srt",
        " telemetry",
        " video"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "0d7cb5d9c82b8e3362680c671c6dd570d27a94d35394f83570927bcfa0d78ae7",
                "md5": "8dc99248fc0b2e291e58dbca6a875eba",
                "sha256": "adc138db39d8afe8a855b59ef5c72cdb68f6ac3bea1cc9b3f2eb9e9ee16b1f11"
            },
            "downloads": -1,
            "filename": "dji_drone_metadata_embedder-1.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8dc99248fc0b2e291e58dbca6a875eba",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 33670,
            "upload_time": "2025-08-14T18:19:05",
            "upload_time_iso_8601": "2025-08-14T18:19:05.200627Z",
            "url": "https://files.pythonhosted.org/packages/0d/7c/b5d9c82b8e3362680c671c6dd570d27a94d35394f83570927bcfa0d78ae7/dji_drone_metadata_embedder-1.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e92831009fbab368533fe824562ac74de7d2c250f3fa385d60b56370db4a8e59",
                "md5": "e8abb3e6b0654784d21f274e0e1eee4c",
                "sha256": "38b1320ec061bd23b21798c467889574efda1a05e951e6df905a1ae0621e1446"
            },
            "downloads": -1,
            "filename": "dji_drone_metadata_embedder-1.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "e8abb3e6b0654784d21f274e0e1eee4c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 26077,
            "upload_time": "2025-08-14T18:19:07",
            "upload_time_iso_8601": "2025-08-14T18:19:07.286855Z",
            "url": "https://files.pythonhosted.org/packages/e9/28/31009fbab368533fe824562ac74de7d2c250f3fa385d60b56370db4a8e59/dji_drone_metadata_embedder-1.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-14 18:19:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "CallMarcus",
    "github_project": "dji-drone-metadata-embedder",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "rich",
            "specs": [
                [
                    ">=",
                    "13.0"
                ]
            ]
        },
        {
            "name": "ffmpeg-python",
            "specs": [
                [
                    ">=",
                    "0.2"
                ]
            ]
        },
        {
            "name": "piexif",
            "specs": [
                [
                    ">=",
                    "1.1"
                ]
            ]
        }
    ],
    "lcname": "dji-drone-metadata-embedder"
}
        
Elapsed time: 0.43631s