tinytag icon indicating copy to clipboard operation
tinytag copied to clipboard

Add XMP metadata support for MP4 files

Open aw-was-here opened this issue 2 months ago • 1 comments

This patch adds basic XMP metadata support for MP4 files, using XMP data as a fallback when standard MP4 metadata atoms are missing.

Implementation:

  • Parse XMP data from standard UUID atoms (BE7ACFCB-97A9-42E8-9C71-999491E3AFAC)
  • Support Dublin Core metadata fields (dc:title, dc:creator, dc:date, etc.)
  • Single-pass parsing: capture XMP during atom traversal
  • Only process XMP when standard metadata is missing (fallback behavior)
  • Clean up internal XMP data field after processing
  • Add raw XMP to other fields for client-level parsing

XMP metadata is only used when the corresponding standard MP4 metadata field is not present, ensuring compatibility with existing behavior while providing fallback metadata extraction for files with incomplete tagging.

fixes #258

(includes #262 and #263 )

aw-was-here avatar Oct 05 '25 04:10 aw-was-here

I would prefer not to maintain support for actually parsing the XMP metadata in tinytag, but I think we could expose the XMP text as a field in the other dict, so you can do whatever you want with it elsewhere.

Same comment about not polluting the base TinyTag class applies here. https://github.com/tinytag/tinytag/pull/263#issuecomment-3533367269

mathiascode avatar Nov 14 '25 15:11 mathiascode