Skip to main content

generate

The main event. immich-memories generate pulls videos from your Immich library, analyzes scenes, picks the best moments, and assembles them into a compilation.

Usage

immich-memories generate [OPTIONS]

Flags

Time period

FlagShortTypeDefaultDescription
--year-yintYear to generate (calendar year by default)
--startstringStart date (YYYY-MM-DD or DD/MM/YYYY). Overrides memory type date range when combined with --end
--endstringEnd date (use with --start)
--periodstringPeriod from start date (e.g., 6m, 1y, 2w, 30d)

Memory type

FlagShortTypeDefaultDescription
--memory-typechoiceyear_in_review, season, person_spotlight, multi_person, monthly_highlights, on_this_day, trip
--person-pstringPerson name from Immich face recognition (repeatable: --person "Alice" --person "Bob")
--birthday-bflag/stringUse birthday-based year. Bare flag auto-detects from Immich; or pass MM/DD to override
--seasonchoicespring, summer, fall, autumn, winter (use with --memory-type season)
--monthintMonth 1-12 (narrows any yearly memory type; selects trip by month)
--hemispherechoicenorthnorth or south (for season date calculation)
--years-backintallYears to look back for on_this_day (default: all years)

Output

FlagShortTypeDefaultDescription
--duration-dintTarget duration in seconds
--orientation-ochoicelandscapelandscape, portrait, or square
--resolution-rchoiceautoauto, 4k, 1080p, or 720p
--scale-mode-schoiceconfig/blurfit, fill, smart_crop, or blur
--transition-tchoicesmartsmart, cut, crossfade, or none
--qualitychoicehighhigh, medium, or low
--formatchoicemp4mp4 or prores
--output-OpathautoOutput file path
--titlestringOverride title screen text
--subtitlestringOverride subtitle text
--add-dateflagAdd date overlay to clips

Analysis

FlagShortTypeDefaultDescription
--analysis-depthchoicefastfast (LLM for favorites only) or thorough (LLM for top candidates)
--include-photosflagInclude photos alongside videos
--photo-durationfloat4.0Seconds per photo clip (use with --include-photos)

Music

FlagShortTypeDefaultDescription
--music-mstringPath to audio file, or auto to generate from config
--no-musicflagDisable all music (skip files and AI generation)
--music-volumefloat0.5Music volume 0.0-1.0

Modes

FlagShortTypeDefaultDescription
--dry-runflagShow what would be done, don't generate
--privacy-modeflagBlur all video and mute speech
--include-live-photosflagInclude Live Photo video clips (merged when burst-captured)
--keep-intermediatesflagKeep intermediate files for debugging
--quietflagSuppress interactive progress, emit log lines only

Upload

FlagShortTypeDefaultDescription
--upload-to-immichflagUpload generated video back to Immich
--albumstringAlbum name for uploaded video (created if missing)

Trip-specific

FlagShortTypeDefaultDescription
--trip-indexintSelect a specific trip by index (use with --memory-type trip)
--all-tripsflagGenerate a video for every detected trip (use with --memory-type trip)
--near-datestringSelect trip closest to this date (YYYY-MM-DD, use with --memory-type trip)

Examples

Calendar year

Grab all videos from January 1 to December 31, 2024:

immich-memories generate --year 2024

Birthday year

Auto-detects the birthday from Immich when --birthday is used as a flag:

immich-memories generate --year 2024 --birthday --person "Emma" --duration 900

Or specify manually: --birthday 07/21.

Person spotlight for a single month

Narrow a person spotlight to just February:

immich-memories generate --memory-type person_spotlight --person "Alice" --year 2026 --month 2

Override any preset with custom dates

--start/--end overrides the date range for any memory type:

immich-memories generate --memory-type person_spotlight --person "Alice" \
--start 2025-02-01 --end 2025-03-31

Custom date range

Just the summer:

immich-memories generate --start 2024-06-01 --end 2024-08-31

Period-based

Six months from a start date:

immich-memories generate --start 2024-01-01 --period 6m

On This Day — all years

Look back across all years with data (not just the last 5):

immich-memories generate --memory-type on_this_day

Or limit to the last 3 years: --years-back 3.

Trip closest to a date

Find and generate the trip closest to a specific date:

immich-memories generate --memory-type trip --year 2024 --near-date 2024-07-15

With photos

Include photos alongside videos:

immich-memories generate --year 2024 --include-photos --photo-duration 5.0

Time Period Options

MethodFlagsWhat you get
Calendar year--year 2024Jan 1 2024 to Dec 31 2024
Birthday year--year 2024 --birthday --person "Emma"Birthday to birthday (auto-detected from Immich)
Single month--year 2024 --month 7Jul 1 to Jul 31 2024
Custom range--start 2024-06-01 --end 2024-08-31Exact start and end dates
Period from start--start 2024-01-01 --period 6m6 months from the start date
Override preset--memory-type season --season summer --start 2024-07-01 --end 2024-07-31Custom dates with preset scoring

Date formats: YYYY-MM-DD, DD/MM/YYYY, or MM/DD (for --birthday manual override).

Period format: number + unit (d days, w weeks, m months, y years). Examples: 90d, 2w, 6m, 1y.

Output

If you don't pass --output, the file lands in your configured output directory (default ~/Videos/Memories/) with an auto-generated name like all_2024_memories.mp4 or emma_20240207-20250206_memories.mp4.

Upload to Immich

Send the generated video straight back to your Immich library:

immich-memories generate --year 2024 --upload-to-immich --album "2024 Memories"

If an album with that name already exists, the video is added to it. If not, it's created. Without --album, the video is uploaded as a standalone asset.

You can also enable this permanently in your config:

upload:
enabled: true
album_name: "Memories"

Trip Detection

Automatically find trips in your library based on GPS data. Set your home coordinates in config, and the tool finds clusters of videos taken far from home over 2+ days.

# Discover trips from 2024 (shows a table, doesn't generate)
immich-memories generate --memory-type trip --year 2024

# Generate a specific trip (trip #2 from the table)
immich-memories generate --memory-type trip --year 2024 --trip-index 2

# Generate all detected trips at once
immich-memories generate --memory-type trip --year 2024 --all-trips

Without --trip-index or --all-trips, the command runs in discovery mode: it scans all GPS-tagged videos for the year, filters to those 50+ km from your homebase, groups them by temporal proximity, and shows you what it found. Cross-year trips (like a New Year's trip spanning Dec to Jan) are detected as a single trip.

First, set your home coordinates in config.yaml:

trips:
homebase_latitude: 50.8468 # Your home location
homebase_longitude: 4.3525
min_distance_km: 50 # How far = "away from home" (default 50km)
min_duration_days: 2 # Min days to count as a trip
max_gap_days: 2 # Max gap between videos before splitting trips

Dry run

Use --dry-run to see how many videos match your criteria without actually generating anything:

immich-memories generate --year 2024 --person "Emma" --dry-run