Skip to content

TIKA-4780: Map ID3 TCOP and Vorbis COPYRIGHT to xmpDM:copyright#2940

Open
dschmidt wants to merge 1 commit into
apache:mainfrom
dschmidt:audio-copyright-mappings
Open

TIKA-4780: Map ID3 TCOP and Vorbis COPYRIGHT to xmpDM:copyright#2940
dschmidt wants to merge 1 commit into
apache:mainfrom
dschmidt:audio-copyright-mappings

Conversation

@dschmidt

@dschmidt dschmidt commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

JIRA: https://issues.apache.org/jira/browse/TIKA-4780

The MP4 parser already maps the cprt atom to xmpDM:copyright; the other
audio formats dropped the copyright message.

  • MP3: handle the ID3v2 TCOP frame (TCR in ID3v2.2), following the
    same pattern as the composer mapping. ID3v1 has no copyright field.
  • Ogg family (Vorbis/Opus/Speex/FLAC): map the COPYRIGHT comment in
    the shared OggAudioParser.extractComments.

On multiple values: Vorbis comments may legally repeat a key (e.g. separate
"P"- and "C"-line notices), but xmpDM:copyright is a single-valued Text
property, so the first comment is mapped, matching the first-value
convention of the surrounding mappings. Like the vendor comment, the raw
values all remain available under the generic vorbis:copyright name, so
the change is purely additive and nothing is dropped.

Testing: the ID3v2.3 and ID3v2.4 fixtures gain a 25-byte TCOP frame
(appended to the tag, audio bytes untouched); assertions added to
Mp3ParserTest, and a new OggAudioParserTest covers the shared comment
mapping including the multiple-comments case.

The MP4 parser already maps the cprt atom to xmpDM:copyright, but the
copyright message was dropped for the other audio formats.

MP3: handle the ID3v2 TCOP frame (TCR in ID3v2.2) following the same
pattern as the composer mapping; ID3v1 has no copyright field. The
ID3v2.3 and ID3v2.4 test fixtures gain a TCOP frame.

Ogg family (Vorbis/Opus/Speex/FLAC): map the copyright comment in the
shared OggAudioParser.extractComments. xmpDM:copyright is single-valued,
so the first comment is mapped; like the vendor comment, the raw values
all stay available under the generic vorbis:copyright name, making this
purely additive.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant