You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Live Photos: Add support for Google Camera Motion Photos #1739
According to Alan Orth's blog it seems that ..."As of Android 12 it appears that the MP4 header in Motion Photos has changed from ftypmp4 to ftypisom".. the header has changed which indicates the embedded video. See also the probably similar issue and the solution for GoMoPho.
When "HEIF pictures" is enabled, Samsung Camera appears to use this format also ("XMP:MotionPhoto: 1"), as opposed to their custom format described in #439.
Just to add some information I found here, while older images had the offset in XMP under MicroVideoOffset, it seems newer versions have defined this offset in a separate Directory Length value. See this comment on Nextcloud photos here: nextcloud/photos#365 (comment)
Do note: there are 2 entries of that metadata key and the second one needs to be used.
Just a note for anyone having issues with the grep command not returning a byte offset on macos, prefixing the command with LC_CTYPE=C seems to fix the issue.
I'm new to PhotoPrism. I had just read this thread last week and then saw a new blog from ente on the topic come out today. Dropping here for future reference.
My latest commit adds support for direct streaming of videos embedded in JPEG images. To make this possible, we've added native support for the ISO base media file format on which MP4, QuickTime (MOV), and HEIC are based.
HEIC Files
In order to play videos embedded in HEIC image files, some more changes had to be implemented, as these are based on the same standard as the videos and therefore the HEIC at the beginning has to be ignored to find the MP4 video at the end of the file. This should also be working now.
Activity
[-]Support for Google Camera Motion Photos[/-][+]File Type: Support for Google Camera Motion Photos[/+]hmueller01 commentedon Jan 4, 2022
A quick note.
This works only with GNU grep. BSD grep (macOS default) returns no match!
Took me some time to figure out ... hope this helps others.
More infos about Android 12 Motion Photos from Alan Orth's blog.
wechsler42 commentedon Mar 8, 2022
According to Alan Orth's blog it seems that ..."As of Android 12 it appears that the MP4 header in Motion Photos has changed from ftypmp4 to ftypisom".. the header has changed which indicates the embedded video. See also the probably similar issue and the solution for GoMoPho.
tribut commentedon Jul 14, 2022
When "HEIF pictures" is enabled, Samsung Camera appears to use this format also ("XMP:MotionPhoto: 1"), as opposed to their custom format described in #439.
tribut commentedon Aug 16, 2022
Here is a sample
.heicwith embedded motion photo from a Samsung phone that uses this method, in case you need something to test:samsung-motion-heic.zip
alex-phillips commentedon Sep 7, 2022
Just to add some information I found here, while older images had the offset in XMP under MicroVideoOffset, it seems newer versions have defined this offset in a separate
Directory Lengthvalue. See this comment on Nextcloud photos here: nextcloud/photos#365 (comment)Do note: there are 2 entries of that metadata key and the second one needs to be used.
Also, some good info here on the "old" vs "new" formats and the hex values you can match against in the file: https://linuxreviews.org/Google_Pixel_%22Motion_Photo%22
sethgillett commentedon Dec 26, 2022
Just a note for anyone having issues with the
grepcommand not returning a byte offset on macos, prefixing the command withLC_CTYPE=Cseems to fix the issue.grahamjpark commentedon May 9, 2023
I'm new to PhotoPrism. I had just read this thread last week and then saw a new blog from ente on the topic come out today. Dropping here for future reference.
https://ente.io/blog/tech/android-motion-photos-flutter/
mholt commentedon May 10, 2023
^ That's basically what I do in Timelinize. Works pretty well, and the information in that article looks accurate by my recollection.
5 remaining items
Index: Add native support for MP4 and Samsung/Google Motion Photos #439
lastzero commentedon Sep 22, 2023
My latest commit adds support for direct streaming of videos embedded in JPEG images. To make this possible, we've added native support for the ISO base media file format on which MP4, QuickTime (MOV), and HEIC are based.
HEIC Files
In order to play videos embedded in HEIC image files, some more changes had to be implemented, as these are based on the same standard as the videos and therefore the HEIC at the beginning has to be ignored to find the MP4 video at the end of the file. This should also be working now.
Related Information
[-]Google: Initial support for Motion Photos[/-][+]Live Photos: Add support for Google Camera Motion Photos[/+]Live Photos: Add support for playing videos embedded in HEIC images #439
Frontend: Improve formatting of video codec names #439 #1739 #2788
Index: Improve detection of embedded videos #439 #1739 #2788
Videos: Cache embedded media to allow streaming and transcoding #3764