Ability to use Motion Photos [Android]
complete
Vinh Dinh
complete
Matteo Di Iorio
Samsung S22
Vinh Dinh
Could y'all please attach some test motion photos from your device and also let me know what device you're on? Thanks a ton!
M
Melissa Ingersoll
Vinh Dinh: here is an "auto-animation" from Google Photos. Current device is Pixel 8 Pro (Android). I will attach a "motion photo" separately which is different than the auto animations. Not sure which one you wanted samples of.
Vinh Dinh
Melissa Ingersoll: Yes, the motion photo is what we'd need, thank you! You can also forward it to me to vinh@1se.co
M
Melissa Ingersoll
Vinh Dinh: Thanks! Emailing an example now.
Alesya Huzik
Vinh Dinh: image upload here is broken (upload endpoint response stops abruptly in the middle of the json, yilding it invalid), so I uploaded it to google drive: https://drive.google.com/file/d/15k4rcb2l9DWUQvipRnP9aHuDrxyeMJN9/view?usp=sharing . The video is simply stored in EXIF, see https://github.com/photoprism/photoprism/issues/439 . For my image
exiftool -EmbeddedVideoFile -b -w _MotionPhoto.mp4 20240112_124204.jpg
extracts the video as 20240112_124204_MotionPhoto.mp4 . The phone is Samsung Galaxy Z Fold 5, but motion photos have existed in this format on Samsung devices for many yearsVinh Dinh
Alesya Huzik: Ha that's amazing that you're just pointing to code. 💯
Exif would be pretty convenient but it seems there's no consistency amongst vendors and Samsung does it differently to Google Pixels and Motorola. The most reliable I found is still to inspect the file and extract based on the mp4/quicktime header data. Here's your video extracted: https://share.cleanshot.com/YYz4Z7Mk
So maybe we use EXIF and filenames to indicate which images are motion photos and when it comes to the extraction job, we just inspect the actual file content.
Alesya Huzik
Vinh Dinh: idk, that video you posted is incorrect - it is more than 2 times smaller (I think 1.9 mb vs 5.something mb) and it's aspect ratio is effed up. Maybe the site you used to upload it did something strange. I'd prefer exif whenever possible and fallback to scanning for headers only if all else fails. Besides, at least here in Australia, Android is pretty much synonymous with Samsung - you are either with Apple or with Samsung, so I would probably try to treat them as the main case and maybe have a fallbacks for others
Vinh Dinh
Alesya Huzik: You're right. It's the screenshot tool that screwed it up. The file I extracted is 4.7MB in size. Our devs are looking into how to efficiently mark the content in the gallery. Too bad Samsung doesn't use a naming convention like Google (they use a "MP" suffix) that would make things easier. Reading out the header of each image presented in the media picker might be too slow if possible at all. And then there's also still the Google Photos API to be determined.
Alesya Huzik
Vinh Dinh: just start indexing as soon as you get permission for media access and cache it, that should be good enough for a smooth user experience. Also it shouldn't be much of a problem since for your usecase you only need one day worth of photos, not necessarily the entire timeline.
Additionally you can
a) assume that if an image has embedded video then most of the rest of them will also have it since it's not a feature that is toggled frequently. Photos that are extracted from the motion photo itself will obviously not have the video embedded, but AFAIR they have a slightly different name, so can discarded easily beforehand
b) do proper exif test once the photo is chosen (as it could have been renamed, or motion video was removed from it after you cached it, or anything else). It'd be quite frustrating to choose a photo that you KNOW is a motion one only for the app to think it's not.
c) it is likely that you can guess by the file size, since while they are device-dependant, on a device all motion and non-motion photos will most likely fall into two distinct categories. Err on the side of "it has a motion photo" though, since video length (and therefore size) is undetermined and depends on how quickly you snapped your photo after opening the camera app or snapping the previous photo). As far as I know, unlike on Apple devides, motion photos on Samsung can go upto 3 seconds in length
d) just ask users if they want motion photos to be used at all if background indexing is too slow or demanding. or put it as a toggle in sam sort of "labs" section of the settings, so users know they chose the experience that isn't optimal yet
e) do you guys have a public or private beta channel in the play store? I'd love to help with testing this since lack of this feature made me uninstall the app long time ago - my sister was on iPhone and it was making me jealous that I have motion photos, but the app doesn't allow me to use them despite it being the best usecase of those short embedded videos. I really want to have my hands on it.
Danielle Dammann
Yes!!!
Vinh Dinh
Danielle Dammann: Could you send me a motion photo you recently recorded to vinh@1se.co? Also let me know what the device is that you're using.
J
J
3 years and still nothing? Sick of going through every single motion photo and trying to see which ones are a second or more...please add this feature!!
Silvia Burgos
Silvia Burgos
France
It's already working with the iphone version
Stephanie Gee
France: I have an Android
M
Melissa Ingersoll
Google Pixel 6 Pro
Vinh Dinh
Could you please reply what phones y'all are using? Thanks!
TheaZela
Vinh Dinh: Google pixel 7
Vinh Dinh
Thanks again TheaZela! Seems like Pixels are the only Android devices that have motion photos enabled by default. Samsung Galaxy devices also have that feature, but it's off by default and used less.
Martin Kruger
Vinh Dinh: Google Pixel 6 (had to enable "Top Shot" but I love them so much)
Vinh Dinh
Thanks for the info Martin Kruger! Yeah they've been around on iOS for a while (called Live Photos) and they're awesome.
Alesya Huzik
Vinh Dinh: Samsung Galaxy Note 10+
Alexandre Malfreyt
Vinh Dinh: Samsung Galaxy Note 10 Plus too
Graham Park
Vinh Dinh: Fairphone with GCam port (probably a minority 😅)
Graham Park
Vinh Dinh: Also just dropping some conversation on an open source project I follow about motion photo support:
Vinh Dinh
Graham Park: Fairphones are nice. My friends bought them when they first came out (in 2013 or so?). Happy to see them thriving and now also adding headphones to their repertoire.
Vinh Dinh
Thanks for the pointer Graham Park! Yes, they seem to be jpegs with attached mp4. There doesn't seem to be an official way to support them. The marker isn't officially documented and varies across Pixel devices. Also Samsung uses another one (and also different exif data) than Google Pixels.
Load More
→