drewnoakes / metadata-extractor-dotnet

Extracts Exif, IPTC, XMP, ICC and other metadata from image, video and audio files
Other
922 stars 164 forks source link

Reading iPhone MOV throws File format could not be determined #344

Open rnedumpurath opened 11 months ago

rnedumpurath commented 11 months ago

Starting around iOS15, I've been getting the "File format could not be determined " exception when trying to read the metadata of a video file of a Live Photo. A Live Photo on an iPhone creates an HEIC image file as well as a video file. The video file from that package is what is throwing the exception. I'm attaching a sample video file that should recreate this exception. Tested with .NET 7 running MetadataExtractor 2.8.1.

https://github.com/drewnoakes/metadata-extractor-dotnet/assets/60277804/909ef10e-fcb9-4e62-8c5a-d5b62962450e

HEIC-to-JPEG-Dev commented 4 months ago

Yes, I get this as well. Apple don’t like Windows :(

I’d use this library if this was fixed, otherwise it’s of no use to me as Apple files are prolific.

I can provide video files if that helps with the development of this capability

HEIC-to-JPEG-Dev commented 4 months ago

I would add that “throwing an exception” is very bad for performance. If I’m getting the data for a thousand files and 20% are Apple videos, this package hits a wall performance wise. It should return a code instead. Exceptions are for unexpected errors if all goes wrong, not for known, expected things you’re checking for.

HEIC-to-JPEG-Dev commented 4 months ago

I think Apple are using hevc encoding now