-
-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Google Motion Photos #365
Comments
Would love to see this implimented! 😄 In the mean time if you have already extracted your files not using the extractor listed above and need to change the filetype to |
Would also love to see this! |
The image name format has changed, |
Couldn't find a javascript api for this. Google photos seems to be using the backend to serve img/video, they don't just do it from the browser! 😕 🤔 |
I'd like to work on this. My current plan is to extend nextcloud/viewer front-end to handle micro videos contained in JPEGs that match Google's naming conventions (MVIMG*.jpg and *.MP.jpg). That way we avoid downloading full-sized versions of probably motionless JPEGs. When the file name matches, we'll display a toggle button. In a future update, we could find or build a way to fetch the EXIF metadata without downloading the whole file. Then, we could check the metadata directly instead of checking the filename. |
@cooperra exactly! That seems like a clear and neat approach! |
Couldn't you, in javascript, download the file and split it by looking for header bytes for the image and video? I'm not a javascript developer and I don't know if you have byte level access to files like this. https://github.com/cliveontoast/GoMoPho/blob/master/src/GoMoPhoConsole/Program.cs |
This is the best resource I've found on the topic: https://android.jlelse.eu/working-with-motion-photos-da0aa49b50c We don't need to search for header bytes. The EXIF data contains a MicroVideoOffset value that points to the start of the video data. We just need to download and parse the EXIF data, then carve the video out of the MVIMG file. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I think there may be some subtle differences between MVIMG and MP.jpg versions.
Obviously we need the second one and not the first one. Now the nice thing is that these 2518994 bytes are from the end of the file, so we can calculate the offset easily by subtracting that from the total file length and adding 1. Here's a quick and cludgy bash script to take out the mp4 from the combined file;
Just feed in the filename as the first and only parameter and out pops the mp4. |
Since the announcement of Nextcloud Hub 3 with the recognition app i am amazed to migrate my Photo Sync completly to Nextcloud instead of Google Photos. |
Same. I just migrated to nextcloud. Motion photos would be amazing |
Since I would also greatly enjoy being able to view Motion Photos from the 'Photos' app, I think it would be useful to mention that Samsung's Motion Photos are also videos embedded into JPG files. However, in Samsung's case (at least as of Android 13), there is no filename difference between motion photos and standard photos. |
Samsung uses JPEG marker 0x60 to store the MPEG video, so that could be checked to determine presence of a Motion Photo. |
As fast as I'm aware the easiest solution would be to just put the photo into a |
I don't think the motion part is too bad. The tricky part is the the UI to toggle it. I don't think the viewer was designed with alternative viewing modes in mind. Items are expected to be videos or photos, but not both. This distinction is made server-side. The problem I ran into was that I couldn't check for motion metadata in a photo without downloading the whole file to the client. That would be too expensive to do for every photo when only a few have motion. I suppose the filename heuristic could work in the short term, but ideally this would be flagged server-side. Maybe in preview generation? I didn't want to open that can of worms, but maybe someone with more motivation could pull it off. In the end, I switched to the Memories app. They already have support for this there. |
Describe the solution you'd like
Google Pixel phones can take so called "motion photos", which are like iOS live photos (see #344). I'd like photos to be able to show the video within the picture. In the official Google Photos app there is a button that toggles display of picture or video.
Additional context
These photos are JPGs with embedded MP4 videos: https://stackoverflow.com/questions/53104989/how-to-extract-the-photo-video-component-of-a-mvimg
Since the Pixel camera app stores them with the prefix "MVIMG" only the files matching this could be scanned for videos. Also see https://github.com/cliveontoast/GoMoPho
The text was updated successfully, but these errors were encountered: