Batch Fix Shooting Time for DJI Mimo Exported Photos/Videos


๐Ÿค–This article was translated by AI (LLM). There may be errors or inaccuracies. For the original content, please refer to the original version.

When importing photos and videos exported from DJI Mimo APP into Apple Photos, the dates may display incorrectly. More frustratingly, Apple Photos doesnโ€™t natively support batch restoration of original shooting times - the โ€œRestoreโ€ button disappears when selecting multiple photos.

This article explains how to use the osxphotos timewarp command to extract correct shooting times from filenames and perform batch fixes.

Prerequisites

This method requires a macOS environment. You can choose:

  • Use a Mac computer
  • Create a macOS virtual machine via quickemu (recommended)
  • Create a macOS virtual machine via ultimate-macOS-KVM

DJI Mimo Filename Structure

First, understand DJI Mimoโ€™s filename structure:

dji_mimo_20260101_151718_20260101151719_1767262128881_photo.jpg
โ”‚        โ”‚        โ”‚      โ”‚              โ”‚             โ”‚
โ”‚        โ”‚        โ”‚      โ”‚              โ”‚             โ””โ”€ Type identifier (photo/video)
โ”‚        โ”‚        โ”‚      โ”‚              โ””โ”€ Unix timestamp (milliseconds)
โ”‚        โ”‚        โ”‚      โ””โ”€ Second timestamp: YYYYMMDDHHMMSS (actual shooting time)
โ”‚        โ”‚        โ””โ”€ First timestamp's time part: HHMMSS
โ”‚        โ””โ”€ First timestamp's date part: YYYYMMDD
โ””โ”€ Fixed prefix

Difference Between Two Timestamps

TimestampExampleMeaning
First20260101_151718File creation/save time
Second20260101151719Actual shooting time (what we need)

For videos, the difference may be the video duration (end vs start of recording); for photos, usually just about 1 second apart.

osxphotos parse-date Parsing Rules

The --parse-date parameter uses strptime-like format with extended wildcards:

SymbolMeaningExample
%Y4-digit year2026
%m2-digit month01
%d2-digit day01
%H2-digit hour (24h)15
%M2-digit minute17
%S2-digit second19
*Match any characters (wildcard)Skip unwanted parts
?Match single characterMore precise skipping

Parsing Pattern Explanation

dji_mimo_*_*_%Y%m%d%H%M%S
โ”‚        โ”‚ โ”‚ โ””โ”€ Extract: 20260101151719
โ”‚        โ”‚ โ””โ”€ Skip: 151718
โ”‚        โ””โ”€ Skip: 20260101
โ””โ”€ Fixed match: dji_mimo_

Why use * instead of ????????:

  • * matches any length, more flexible
  • ???????? exactly matches 8 characters, more strict
  • For DJI Mimo files, * is sufficient and more concise

Install osxphotos

brew install osxphotos

Detailed installation instructions: osxphotos Official Installation Docs

Steps

1. Organize Photos into Album

In Apple Photos, gather all DJI Mimo exported files into one album (e.g., DJI Album).

2. Run Fix Command

osxphotos timewarp \
  --album "DJI Album" \
  --parse-date "dji_mimo_*_*_%Y%m%d%H%M%S" \
  --timezone "Asia/Shanghai" \
  --verbose

Parameter Explanation

ParameterDescription
--albumSpecify album name to process
--parse-dateFilename parsing pattern
--timezoneTimezone setting (adjust based on your location)
--verboseShow detailed output

3. Verify Results

Two methods:

Directly in Apple Photos (recommended): Open Photos app and check if photo/video dates have been updated.

Command line query (optional):

osxphotos query --album "DJI Album" --json | jq | head -100

Note: --json output is single-line JSON, requiring jq for readable formatting.

Notes

Must log in with your own iCloud account: iCloud sync is global, you canโ€™t switch Photos account separately. If using a VM, log in with your Apple ID in the VM.

  • Recommended to back up photo library before operation
  • This method works for both photos and videos