Batch Fix Shooting Time for DJI Mimo Exported Photos/Videos
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
| Timestamp | Example | Meaning |
|---|---|---|
| First | 20260101_151718 | File creation/save time |
| Second | 20260101151719 | Actual 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:
| Symbol | Meaning | Example |
|---|---|---|
%Y | 4-digit year | 2026 |
%m | 2-digit month | 01 |
%d | 2-digit day | 01 |
%H | 2-digit hour (24h) | 15 |
%M | 2-digit minute | 17 |
%S | 2-digit second | 19 |
* | Match any characters (wildcard) | Skip unwanted parts |
? | Match single character | More 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
| Parameter | Description |
|---|---|
--album | Specify album name to process |
--parse-date | Filename parsing pattern |
--timezone | Timezone setting (adjust based on your location) |
--verbose | Show 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