-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
This guide walks you through setting up Memoria and preparing your social media exports for processing.
Before diving into installation, here's what Memoria does with your data:
- Detection: Memoria identifies which processor(s) can handle your export structure
- Copying: Files are copied (never moved) from the export to the output directory
- Metadata Extraction: Platform-specific JSON/HTML files are parsed for timestamps, locations, and context
- EXIF Embedding: Metadata is written directly into each media file using ExifTool
- Deduplication (Google Photos, iMessage): Duplicate files across albums/exports are identified and skipped
- File Organization: Files are organized by platform and username with descriptive names
- Upload (optional): Files are uploaded to Immich in platform-specific albums
Your original export remains completely untouched. All operations work on copies.
For the reasoning behind these choices, see Design Decisions.
- What Happens During Processing
- System Requirements
- Installation
- Preparing Your Exports
- Directory Naming Conventions
- Quick Start
- Platform-Specific Setup
- System Dependencies Installation
Memoria requires the following to be installed on your system:
- Python: 3.7 or higher
- exiftool: For embedding metadata in media files
- ffmpeg: For video processing and re-encoding
- libmagic: For file type detection
See System Dependencies Installation at the end of this guide for platform-specific installation commands.
- Clone or download this repository:
cd /path/to/memoria- Install Python dependencies:
pip install -r requirements.txt- (Optional) Install in development mode for better module imports:
pip install -e .- Verify system dependencies are installed:
exiftool -ver # Should display version number
ffmpeg -version # Should display version infoEach platform has its own export process:
-
Apple iMessage: Copy from Mac (
~/Library/Messages/) or extract from iPhone backup - Discord: Use User Settings > Privacy & Safety > Request My Data
- Google: Use Google Takeout
- Instagram: Download from Settings > Account Center > Your Information and Permissions > Download Your Information
- Snapchat: Use Settings > My Data > Submit Request
See the platform-specific guides for detailed export instructions:
- Google Export Setup
- iMessage Export Setup
- Discord Export Setup
- Instagram Export Setup
- Snapchat Export Setup
After downloading, extract the export archives to a working directory. Most platforms provide ZIP files that need to be extracted.
Important: Platform exports don't automatically include usernames in their directory structure. To help Memoria identify which account an export belongs to, you should rename the export folder after extracting it.
Use this format for your export directories:
platform-username-YYYYMMDD
Where:
-
platform: One ofgoogle,mac/iphone*,discord,instagram, orsnapchat -
username: The account username or device identifier (can include hyphens for multi-part names) -
YYYYMMDD: Date of export (optional but recommended)
google-john.doe-20250526/
├── Google Photos/ # Actual Google export structure
│ └── Albums...
├── Google Chat/
│ └── ...
└── Voice/
└── ...
mac-messages-20251202/
├── chat.db # iMessage database
└── Attachments/ # iMessage attachments
└── ...
discord-username-20251215/
├── Messages/ # Actual Discord export structure
│ ├── index.json
│ └── c{channel_id}/
│ └── messages.json
└── Servers/
└── ...
instagram-jane_doe-20251007/
└── your_instagram_activity/ # Actual Instagram export structure
└── messages/
└── ...
snapchat-user123-20251007/
├── memories/ # Actual Snapchat export structure
│ └── ...
└── messages/
└── ...
Multi-part usernames are supported:
instagram-john-doe-smith-20250526/ → username: john-doe-smith
Memoria uses the directory name to:
- Extract the username for the processed files
- Create properly named output directories
- Generate appropriate Immich album names
Without proper naming, files will be processed with "unknown" as the username.
Once you've installed dependencies and prepared your export directory:
- Process a single export:
./memoria.py /path/to/google-username-20250526 -o /path/to/output- Process multiple exports:
# Place all your renamed exports in one folder
./memoria.py --originals /path/to/all-exports -o /path/to/output- Check available processors:
./memoria.py --list-processorsFor detailed usage options, see Usage.
Each platform has unique export structures and requirements. Consult the appropriate guide for your platform:
See iMessage Export Guide for:
- Mac exports (chat.db with Attachments)
- iPhone exports (SMS/sms.db with Attachments)
- Cross-export deduplication
See Discord Export Guide for:
- Requesting your Discord data export
- Downloading attachments from CDN URLs
- Channel types (DMs, group DMs, server channels)
See Google Export Guide for:
- Google Photos (albums, metadata, shared libraries)
- Google Chat (groups, direct messages)
- Google Voice (call recordings, voicemail)
See Instagram Export Guide for:
- Instagram Messages (DMs, group chats)
- Instagram Public Media (new format with date folders)
- Instagram Old Format (legacy timestamped files)
See Snapchat Export Guide for:
- Snapchat Memories (with overlay support)
- Snapchat Messages (chat media)
After setting up:
- Review Usage for detailed command options
- Check platform-specific guides for export structure requirements
- Configure Immich integration (optional) - see Immich Upload
- Learn about parallel processing - see Parallel Processing
Install exiftool using the system-specific commands in the System Requirements section.
Install ffmpeg using the system-specific commands in the System Requirements section.
- Verify your export directory structure matches one of the supported formats
- Run
./memoria.py --list-processorsto see available processors - Check directory naming follows the conventions (platform-username-YYYYMMDD)
If you see import errors, try installing in development mode: pip install -e .
- Reduce
--workerscount if system is overloaded - Process smaller batches of exports at a time
- Ensure sufficient disk space for temporary files and output
Required for embedding metadata in media files.
-
macOS:
brew install exiftool -
Linux:
sudo apt-get install libimage-exiftool-perl - Windows: Download from https://exiftool.org/
Verify installation:
exiftool -verRequired for video processing and re-encoding.
-
macOS:
brew install ffmpeg -
Linux:
sudo apt-get install ffmpeg - Windows: Download from https://ffmpeg.org/
Verify installation:
ffmpeg -versionRequired for file type detection.
-
macOS:
brew install libmagic -
Linux:
sudo apt-get install libmagic1 -
Windows:
pip install python-magic-bin(alternative)
Python 3.7 or higher is required. Check your version:
python3 --versionIf you need to install or upgrade Python:
-
macOS:
brew install python3 -
Linux:
sudo apt-get install python3 python3-pip - Windows: Download from https://www.python.org/