Skip to main content

music

Three subcommands for finding, analyzing, and adding music to your videos.

Search your local music library by mood, genre, and tempo.

immich-memories music search [OPTIONS]
FlagShortTypeDefaultDescription
--mood-mstringMood filter (happy, calm, energetic, etc.)
--genre-gstringGenre filter (acoustic, electronic, cinematic, etc.)
--tempo-tchoiceslow, medium, or fast
--min-durationfloat60Minimum track duration in seconds
--limit-nint10Number of results to return

Example:

immich-memories music search --mood happy --genre acoustic --limit 5

The local music directory defaults to ~/Music/Memories (configurable via audio.local_music_dir in config).

music analyze

Analyzes a video file to determine its mood. Uses your configured LLM (Ollama or OpenAI-compatible) to extract keyframes and figure out the overall vibe: energy level, color palette, tempo suggestion, genre recommendations.

immich-memories music analyze VIDEO_PATH [OPTIONS]
FlagTypeDefaultDescription
--ollama-urlstringfrom configOverride Ollama API URL
--ollama-modelstringfrom configOverride vision model

Example:

immich-memories music analyze ~/Videos/vacation.mp4

Output includes primary/secondary mood, energy level, suggested tempo, color palette, genre suggestions, and confidence score.

music add

Adds background music to an existing video. Includes automatic audio ducking: the music volume drops when speech or other sounds are detected.

immich-memories music add VIDEO_PATH OUTPUT_PATH [OPTIONS]
FlagShortTypeDefaultDescription
--music-mpathauto-selectMusic file to use
--moodstringOverride mood for auto music selection
--genre-gstringOverride genre for auto music selection
--volume-vfloat-6.0Music volume in dB
--fade-infloat2.0Fade in duration in seconds
--fade-outfloat3.0Fade out duration in seconds

If you don't provide --music, it auto-selects a track based on the video's mood.

Examples:

# Specific music file
immich-memories music add compilation.mp4 output.mp4 --music ~/Music/track.mp3

# Auto-select with custom fade
immich-memories music add compilation.mp4 output.mp4 --fade-in 3 --fade-out 5

# Override mood for selection
immich-memories music add compilation.mp4 output.mp4 --mood energetic --volume -3