3

The problem is very simple; I have a photos library with many live photos. But the live photos simply won't play.

It's probably the same issue as described here.

enter image description here

Three things I've tried

I tried these 3 things

  1. I tried repairing the photo library.
  2. I tried exporting unmodified originals so I could get to the raw .jpg and .mov files, but I get this error:

The export operation failed to create files for 1716 photos; the first 100 are listed

enter image description here

(I suspect there are 1716 live photos).

  1. I tried to check if perhaps the video component of the live photos were simply lost or missing, but I find evidence that they do ineed exist.
    • I found this by running du -sh * inside the library.
    • It showed the directory Resources had ~7gb of files, inside which modelresources directory had ~5gb of files.
      • modelresources contains lots of subdirectories. When randomly clicking into them, I can spot the occasional live photo video which proves that some (if not all) of them exist.

Question

How do I fix this problem with live photos existing but not being able to play them nor export them?

2 Answers 2

1

I have the same problem, and I could only get them to play via 2 ways.

  1. Making the photos window full screen
  2. Going into the explore menu by scrolling down on the photo, then going back out.

I don't know why these fixes work, but they work for me. I have a MacBook Air running macOS Sonoma, and it may be that this only works for my laptop, but I would say its worth a try.

0

This was not uncomplicated, but I managed to successfully restore the live photos. Here's how.

Step 1: Confirm .MOV files still exist

Export your library like so:

  • Open Photos app, select 'Library' on left hand side
  • Click on one photo or video
  • command + a to select all
  • File -> Export -> Export unmodified originals

Locate an image (.JPG) file that should be a live photo

cd into the photoslibrary directory, and run this (replace IMG_3959 with the name of the image you found above)

find . -type f -name "*IMG_3959*"                    
./Resources/modelresources/65/103/AgvQKkqoTfm3nFEa3w3A%A/IMG_3959.MOV

Notice that it finds a corresponding .MOV file! So I ran:

open ./Resources/modelresources/65/103/AgvQKkqoTfm3nFEa3w3A%A/IMG_3959.MOV          

And it plays a 3 second video! I repeated this a bunch of times for a few images to confirm that the .MOV files for the broken live photos do in fact exist!

Step 2: Move lost .MOV files into one place

Get a list of the library's live photos. Download osxphotos, place the binary in /usr/local/bin, open a new terminal, and run:

osxphotos query --live --query-eval "not photo.path_live_photo" --field uuid "{uuid}" --field filename "{photo.original_filename}" --field path "{photo.path}"  --library /path/to/your/photos/library > live-photos.csv

Then this will go through each live photo and look for the corresponding .MOV file and list its location in a new file called videos.csv

#!/bin/sh

# Define the input and output CSV files
input_csv="live-photos.csv"
output_csv="videos.csv"

# Create or clear the output CSV file and write the header
echo "image,video" > "$output_csv"

# Use a temporary file to avoid a pipeline with a loop
temp_file=$(mktemp)
tail -n +2 "$input_csv" > "$temp_file"

# Read from the temporary file
while IFS=, read -r uuid filename path
do
    # Use find to search for a matching .MOV file
    mov_file=$(find . -type f -iname "${filename%.*}*.MOV" -print -quit)

    # If a .MOV file is found, write the image filename and MOV path to the output CSV
    if [[ -n "$mov_file" ]]; then
        echo "${filename},${mov_file}" >> "$output_csv"
    fi
done < "$temp_file"

# Clean up temporary file
rm "$temp_file"

Here's mine:

enter image description here

Now move these .MOV files into one place

#!/bin/bash

# Create the directory if it doesn't already exist
mkdir -p mov-files

# Read each line from the CSV file starting from the second line
while IFS=',' read -r image video
do
  # Copy the .MOV file to the mov-files directory
  cp "$video" mov-files/
done < <(tail -n +2 videos.csv)

Step 3: Make a new photo library with working live photos

Create a new directory with all the exported unmodified originals from the first step. To that directory, copy all the missing .MOV files found above.

Close Photos app. Hold option and click on the Photos app in dock to open it. Click on 'Create new'. Click File -> Import -> select the directory with your unmodified originals + .MOV files.

Live photos should now work!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .