Closed JM-Lemmi closed 2 years ago
Came here for this! Nearly all my photos are saved as heic files....unless I convert them from the Samsung Gallery app first......
Had a quick look at HEIC format and the same marker is used. A quick workaround is rename .heic to .jpg. This program was able to extract the video out (.mp4). However, the generated photo (photo.jpg) didn't work in my photo viewer, after rename back to .heic. Maybe heic format needs some special handling. So, before everything is sorted out, please keep the original .heic file for your photo. And to extract the video, simply rename the file to .jpg and use this program as usual.
Interesting. So Samsung separates the photo and video portions of an HEIC motion photo the same way they do with JPEG ones. I have no idea what I'm looking at in an HEIC file though or why they become unusable when the appended video data is removed.
It does work on .heic files, and the exported image also works. But rename is necessary for the extractor to work. Also, I see .jpg is necessary and .jpeg is unsupported? Could be nice to fix that as well.
https://github.com/joemck/ExtractMotionPhotos/blob/master/main.c#L256
Sadly my C knowledge is read-only ;)
I've updated the filename extension processing, it should work with .heic and .jpeg now. My phone only produces normal .jpg motion photos, so I was only able to test by renaming a normal jpg to .heic, so I haven't tested it with an actual HEIC file -- please tell me if it works for you. Also, in case it works for you and not someone else, what phone produced your HEIC motion photo?
EDIT: I meant to mention, the fix is in the new release, 2.2.
Thanks, this works perfectly! My photos are coming from a Samsung S10.
Is this solved? I'd previously been shown an HEIC file that didn't work anymore after the mp4 video data was removed.
I just tried with a recent photo I got from my phone (Samsung Galaxy S10+), it works great. Both photo and video works.
Thank you for writing and maintaining this tool!
Yes, tried it with Release 2.2 and it works! Thanks!
Hey, since the newer Galaxys now shoot in HEIC, it'd be a great addition to expand the extraction to HEIC files. I will gladly help with example files or things.