xmp-dcterms

Started by Jeff_Leger, July 07, 2017, 06:03:03 AM

Previous topic - Next topic

Phil Harvey

#15
C2PA stores metadata in JUMBF format in JP2 files and APP11 of JPG files (including support for both JSON and CBOR-encoded information).  ExifTool should extract this.  (See attached sample image.)

If there is something that you think ExifTool should be extracting, post a sample and I'll take a look.

- Phil

Edit: Attachment deleted
...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 ($).

blue-j

Ok I just modified my prior message by uploading a simple sample file. I hadn't noticed your reply!  We'll check yours, too!

-J

Phil Harvey

Ah, interesting.  When C2PA support was added to ExifTool I don't think the specification included PNG support, but that was before the spec was finalized.  Looks like I should add PNG support.

It also seems that PDF, FLAC and MP3 are possible.  If you have samples of these please post them.

- 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

#18
The C2PA metadata from your PNG image may be extracted using this config file:

%Image::ExifTool::UserDefined = (
    'Image::ExifTool::PNG::Main' => {
        caBX => {
            Name => 'JUMBF',
            SubDirectory => { TagTable => 'Image::ExifTool::Jpeg2000::Main' },
        },
    },
);
1; #end

(although you will get some warnings that I'll take care of when I release this officially.)

- 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 ($).

blue-j

#19
Attached is JSON output from c2patool, if it proves helpful at all.  I've also attached the Adobe dictionary. I'm also including another sample that is storing credentials in Adobe's cloud.

[EDIT}  i've deleted the files for privacy reasons and will email

- J


blue-j

I've tried your config and it works great!  I have not compared the data meticulously yet.

Note - c2patool does not parse your c2pa.jpg at all.  Spot checking, I think your JPEG is not conformant to the current C2PA 1.2 spec

- J

blue-j

https://github.com/contentauth/c2patool

Phil Harvey

#23
You're right, the sample I posted may be old.  I added this feature while the specification was still under development, and ExifTool reads the old (historic) versions as well.  (I'll delete this file to avoid distributing outdated samples.)

Note that you should use "exiftool -j -b -G3 -u FILE" to extract all of the C2PA information in a reasonable JSON format.

- 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 ($).


blue-j

Quote from: Phil Harvey on November 18, 2022, 01:39:06 PMIt also seems that PDF, FLAC and MP3 are possible.  If you have samples of these please post them.

I have the bleeding edge versions of Acrobat and Illustrator, and there is no support for C2PA in either for PDF. Photoshop only permits PNG and JPG to have C2PA metadata in them.  I don't really deal with audio files, but suspect it is not yet present there either.  The wikipedia page only lists Photoshop and Adobe Stock as using this presently.

I know you can also have the C2PA as a sidecar. I'll now try to make one for us for a PDF, and we can have a look.

- J

Phil Harvey

I'll bet the sidecar uses Jpeg2000-like (ISO BMFF) formatting.  ExifTool should read this.

- 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 ($).

blue-j

So sorry to report that I have not achieved joy in producing a sidecar.  Superfically it looks like the c2patool is expecting a different structure than Adobe is producing, but user error cannot be ruled out yet.  Will keep you informed!

I do know the Media Type is application/x-c2pa-manifest-store

- J

blue-j

Exiftool did extract xmp:xmp-dcterms:provenance so it seems it is not completely missing the data.

Would a workaround at present be to extract the data from that family and then marry the qualifiers to the fields in post processing?  Is that workable?

I suppose I need to ask about writing as well.

- J

blue-j

Are there any sample files using DC Terms anywhere in the known universe???  - J