[Feature]: support Google's Motion Photos #668

Closed
opened 2026-02-04 21:47:12 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @figadore on GitHub (Feb 6, 2023).

Feature detail

Google's "Top Shot" or "Motion Photos" feature embeds a tiny .mp4 file in the jpgs, usually when the file name ends with .MP.jpg

It would be great if immich could handle these, using one of the following methods

  1. Extracting the mp4 to its own file (in some location or other)
  2. Stripping the mp4, reducing the stored file size
  3. Being able to play the mp4 when the jpg is viewed

From an issue in the photoprism repo, there's a (probably naive) method of getting the mp4:

srcfile=image.MP.jpg
offset=$(grep -F --byte-offset --only-matching --text ftyp "$srcfile")
offset=${offset%:*}
dd if=$srcfile of=$srcfile.mp4 bs=$((offset-4)) skip=1

Platform

Server

Originally created by @figadore on GitHub (Feb 6, 2023). ### Feature detail Google's "Top Shot" or "Motion Photos" feature embeds a tiny .mp4 file in the jpgs, usually when the file name ends with `.MP.jpg` It would be great if immich could handle these, using one of the following methods 1. Extracting the mp4 to its own file (in some location or other) 2. Stripping the mp4, reducing the stored file size 3. Being able to play the mp4 when the jpg is viewed From an [issue in the photoprism repo](https://github.com/photoprism/photoprism/issues/1739), there's a (probably naive) method of getting the mp4: ``` srcfile=image.MP.jpg offset=$(grep -F --byte-offset --only-matching --text ftyp "$srcfile") offset=${offset%:*} dd if=$srcfile of=$srcfile.mp4 bs=$((offset-4)) skip=1 ``` ### Platform Server
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#668