drewnoakes / metadata-extractor

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

sample xmp code does not work with xmp/mov file #434

Closed yiandrewli1 closed 4 years ago

yiandrewli1 commented 5 years ago

Using exiftool, I can extract xmp info from the quicktime *.mov file. But using xmp sample code here, it's returning empty directories.

drewnoakes commented 5 years ago

Can you provide an example of a .mov file that contains XMP metadata?

zxcv32 commented 4 years ago

Reopening this issue because I observed this in a jpg image.

The sample image FUJIFILM - FinePixS1Prohere https://github.com/drewnoakes/metadata-extractor/wiki/SampleOutput

has XMP metadata but the library does not return anything (in XML directory) using ImageMetadataReader.readMetadata(InputStream).

drewnoakes commented 4 years ago

@zxcV32 it appears the library does extract XMP for FinePixS1Pro:

https://github.com/drewnoakes/metadata-extractor-images/blob/master/jpg/metadata/java/FujiFilm%20FinePixS1Pro%20(1).jpg.txt

Note that XMP values are not reported directly in the XmpDirectory. You have to access the XMP object from that directory to traverse it.

zxcv32 commented 4 years ago

Thanks, @drewnoakes, I got it working using XmpDirectory.getXmpProperties() method.