drewnoakes / metadata-extractor

Extracts Exif, IPTC, XMP, ICC and other metadata from image, video and audio files
Apache License 2.0
2.53k stars 473 forks source link

QuickTime video (MOV) from old Panasonic camera is not recognized #657

Open yonghongren opened 10 months ago

yonghongren commented 10 months ago

ImageMetadataReader.readMetadata fails on some QuickTime videos taken from an old Panasonic camera. The error is:

com.drew.imaging.ImageProcessingException: File format could not be determined

The header of the file doesn't have "ftyp" marker. Instead it has "mdat" in the beginning and then filled with 0x00 to byte 512, 0x80 from 512 to 4512:

00000000  00 15 ae 00 6d 64 61 74  00 00 00 00 00 00 00 00  |....mdat........|
00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000200  80 80 80 80 80 80 80 80  80 80 80 80 80 80 80 80  |................|
*
000011a0  ff d8 ff db 00 84 00 06  06 06 06 06 06 06 06 06  |................|
000011b0  06 06 0c 0c 06 12 0c 0c  0c 0c 0c 18 0c 12 12 12  |................|
000011c0  0c 18 1e 1e 1e 18 1e 1e  1e 24 24 2a 30 24 24 24  |.........$$*0$$$|
000011d0  2a 1e 24 36 2a 2a 2a 30  30 36 36 1e 36 3c 2a 3c  |*.$6***0066.6<*<|
000011e0  3c 3c 36 36 30 36 36 01  0c 06 0c 0c 0c 0c 0c 18  |<<66066.........|
000011f0  18 0c 24 36 24 1e 36 36  36 36 36 36 36 36 36 36  |..$6$.6666666666|
00001200  36 36 36 36 36 36 36 36  36 36 36 36 36 36 36 36  |6666666666666666|
*
00001220  36 36 36 36 36 36 36 36  ff c0 00 11 08 01 e0 02  |66666666........|

Any ideas and suggestions?

thorsted commented 9 months ago

Hi,

This appears to be early QuickTime MooV format where the data fork contained the video, but the MooV data was contained in the Resource Fork. Common on the Macintosh Platform. I recently wrote a blog post about it.

https://preservation.tylerthorsted.com/2023/10/06/quicktime-moov/

drewnoakes commented 4 months ago

If someone could provide a publicly licensed file to investigate this issue further, it'd be appreciated.