deckerst / aves

Aves is a gallery and metadata explorer app, built for Android with Flutter.
BSD 3-Clause "New" or "Revised" License
2.73k stars 103 forks source link

Support HEIC motion photos #305

Closed protist closed 2 years ago

protist commented 2 years ago

Describe the bug I use Samsung's built-in camera app. This creates motion photos, but there are not recognised by Aves.

To Reproduce Steps to reproduce the behavior:

  1. Go to a motion photo taken with Samsung's built-in camera app
  2. Aves does not recognise it as a motion photo

Expected behavior Aves should recognise it as a motion photo

Screenshots Aves does not recognise this as a motion photo Aves

The Samsung gallery app does recognise this as a motion photo Samsung gallery

System information and logs: N/A

Additional context Here is the image above, taken with the Samsung camera app.

deckerst commented 2 years ago

I didn't know motion photos could be made in HEIC format! I also use the Samsung camera but with the default JPEG format, and these motion photos work fine.

protist commented 2 years ago

Ah right, sorry, I forgot I had also changed this setting. Thanks for picking that up!

deckerst commented 2 years ago

Done, with a few limitations.

Reading XMP (which is necessary for motion photo detection) from HEIC images is not supported by the library I'm using, so I fall back on the native Android capabilities. That's only available from Android 11 and it doesn't work for all files, but at least it works with the sample image you gave.

As for handling the motion photo itself, playback is supported, opening and inspecting the video part is also supported, but stripping the video is not supported (because editing XMP of HEIC images is not supported).

As a side note, if you care about privacy, you should know that in your sample file the location metadata is included twice:

protist commented 2 years ago

That's fantastic. Thank you for the super-quick response. Those limitations sounds perfectly reasonable.

That's also interesting about the location metadata. I often strip the EXIF data, but never thought about the MP4 metadata. Thanks for the heads-up, and I'll keep that in mind.

deckerst commented 2 years ago

@protist the fix is in the new release v1.6.12, but you'll need to rescan these images. The most efficient way to do it is as follows: 1) go to "All collection" 2) menu > "Stats" 3) tap on "HEIF" 4) menu > "Rescan"

protist commented 2 years ago

@deckerst Just installed the new version. That works perfectly. Thank you again for the quick fix!