Extract xmp metadata from mp4 files

Started by gtsouk, September 07, 2012, 07:40:40 AM

Previous topic - Next topic

gtsouk

Hi

I have a bunch mp4 files full of xmp tags but exiftool cannot find them.

The files have the metadata appended at the end of the file like this:

<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.4.0">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <rdf:Description rdf:about=""
    xmlns:xmp="http://ns.adobe.com/xap/1.0/"
    xmlns:xmpDM="http://ns.adobe.com/xmp/1.0/DynamicMedia/"
...
...
</x:xmpmeta>
<?xpacket end="w"?>

Is there a way to get that metadata?

Thanks in advance

Phil Harvey

Send me a sample and I'll take a look.  My email is philharvey66 at gmail.com

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Phil Harvey

I got the sample thanks.

I don't see what the problem is.  ExifTool 9.02 extracts the XMP from this video.

Are you using a really old version of ExifTool?  (type "exiftool -ver")

- Phil

Edit: Or maybe the problem is just that you want to extract the raw XMP data and don't know how?  This is the command:

exiftool -xmp -b FILE
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Phil Harvey

I got the 2nd sample, thanks.

In this sample the XMP is not embedded properly in the MP4 container, so ExifTool does not extract it by default.

But you can still use ExifTool to extract the XMP.  Just add the -scanForXMP option to do a brute-force scan XMP.  This should pick up any XMP in the file.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).