Opened 4 months ago

Last modified 4 months ago

#7988 new defect

Matroska Metadata Missing

Reported by: HomerJau Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: mkv Metadata
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by cehoyos)

Summary of the bug:

ffmpeg does not return all metadata tags for a Matroska file. This is causing music library issues in Kodi 18 and 19

How to reproduce:

ffmpeg -i atmos.mka -f ffmetadata test.txt

Returns:

;FFMETADATA1
WWW=https://www.discogs.com/INXS-Kick/release/8861619
DATE_RECORDED=1987
STYLE=Pop Rock
ARTIST=INXS
ARTISTSORT=INXS
CATALOGID=255080-2, 255080.2
COMMENT=From 2017 Kick 30 Blu-ray Edition (Atmos)
COUNTRY=Australia
DISC TITLE=Original Album Remastered
TITLE=Need You Tonight
DISCOGS_RELEASE_ID=8861619
GENRE=Rock, Pop
ORIGINAL_MEDIA_TYPE=CD (Album)
MUSICBRAINZ_ALBUMID=78e3ee2f-90cd-48df-b69a-162a3949c74b
MUSICBRAINZ_ARTISTID=481bf5f9-2e7c-4c44-b08a-05b32bc7c00d
MUSICBRAINZ_TRACKID=aa12dc94-77b1-4e9b-990f-b2bae959f5e0
PUBLISHER=Petrol
track=4/12
encoder=Lavf58.20.100

Using MKVExtract on the same file with commandline:

mkvextract tags atmos.mka >mkvextract.xml

Returns (xml):

<?xml version="1.0"?>
<!-- <!DOCTYPE Tags SYSTEM "matroskatags.dtd"> -->
<Tags>
  <Tag>
    <Targets>
      <TargetTypeValue>50</TargetTypeValue>
    </Targets>
    <Simple>
      <Name>TITLE</Name>
      <String>Kick 30</String>
      <TagLanguage>und</TagLanguage>
      <DefaultLanguage>1</DefaultLanguage>
    </Simple>
    <Simple>
      <Name>ARTIST</Name>
      <String>INXS</String>
      <TagLanguage>und</TagLanguage>
      <DefaultLanguage>1</DefaultLanguage>
    </Simple>
  </Tag>
  <Tag>
    <Targets>
      <TargetTypeValue>30</TargetTypeValue>
    </Targets>
    <Simple>
      <Name>ARTIST</Name>
      <String>INXS</String>
      <TagLanguage>und</TagLanguage>
      <DefaultLanguage>1</DefaultLanguage>
    </Simple>
    <Simple>
      <Name>ARTISTSORT</Name>
      <String>INXS</String>
      <TagLanguage>und</TagLanguage>
      <DefaultLanguage>1</DefaultLanguage>
    </Simple>
    <Simple>
      <Name>CATALOGID</Name>
      <String>255080-2, 255080.2</String>
      <TagLanguage>und</TagLanguage>
      <DefaultLanguage>1</DefaultLanguage>
    </Simple>
    <Simple>
      <Name>COMMENT</Name>
      <String>From 2017 Kick 30 Blu-ray Edition (Atmos)</String>
      <TagLanguage>und</TagLanguage>
      <DefaultLanguage>1</DefaultLanguage>
    </Simple>
    <Simple>
      <Name>COUNTRY</Name>
      <String>Australia</String>
      <TagLanguage>und</TagLanguage>
      <DefaultLanguage>1</DefaultLanguage>
    </Simple>
    <Simple>
      <Name>DISC TITLE</Name>
      <String>Original Album Remastered</String>
      <TagLanguage>und</TagLanguage>
      <DefaultLanguage>1</DefaultLanguage>
    </Simple>
  </Tag>
  <Tag>
    <Targets>
      <TargetTypeValue>50</TargetTypeValue>
    </Targets>
    <Simple>
      <Name>PART_NUMBER</Name>
      <String>1/4</String>
      <TagLanguage>und</TagLanguage>
      <DefaultLanguage>1</DefaultLanguage>
    </Simple>
  </Tag>
  <Tag>
    <Targets>
      <TargetTypeValue>30</TargetTypeValue>
    </Targets>
    <Simple>
      <Name>DISCOGS_RELEASE_ID</Name>
      <String>8861619</String>
      <TagLanguage>und</TagLanguage>
      <DefaultLanguage>1</DefaultLanguage>
    </Simple>
    <Simple>
      <Name>GENRE</Name>
      <String>Rock, Pop</String>
      <TagLanguage>und</TagLanguage>
      <DefaultLanguage>1</DefaultLanguage>
    </Simple>
  </Tag>
  <Tag>
    <Targets>
      <TargetTypeValue>50</TargetTypeValue>
    </Targets>
    <Simple>
      <Name>ORIGINAL_MEDIA_TYPE</Name>
      <String>CD (Album)</String>
      <TagLanguage>und</TagLanguage>
      <DefaultLanguage>1</DefaultLanguage>
    </Simple>
  </Tag>
  <Tag>
    <Targets>
      <TargetTypeValue>30</TargetTypeValue>
    </Targets>
    <Simple>
      <Name>MUSICBRAINZ_ALBUMID</Name>
      <String>78e3ee2f-90cd-48df-b69a-162a3949c74b</String>
      <TagLanguage>und</TagLanguage>
      <DefaultLanguage>1</DefaultLanguage>
    </Simple>
    <Simple>
      <Name>MUSICBRAINZ_ARTISTID</Name>
      <String>481bf5f9-2e7c-4c44-b08a-05b32bc7c00d</String>
      <TagLanguage>und</TagLanguage>
      <DefaultLanguage>1</DefaultLanguage>
    </Simple>
    <Simple>
      <Name>MUSICBRAINZ_TRACKID</Name>
      <String>aa12dc94-77b1-4e9b-990f-b2bae959f5e0</String>
      <TagLanguage>und</TagLanguage>
      <DefaultLanguage>1</DefaultLanguage>
    </Simple>
    <Simple>
      <Name>PUBLISHER</Name>
      <String>Petrol</String>
      <TagLanguage>und</TagLanguage>
      <DefaultLanguage>1</DefaultLanguage>
    </Simple>
    <Simple>
      <Name>STYLE</Name>
      <String>Pop Rock</String>
      <TagLanguage>und</TagLanguage>
      <DefaultLanguage>1</DefaultLanguage>
    </Simple>
    <Simple>
      <Name>TITLE</Name>
      <String>Need You Tonight</String>
      <TagLanguage>und</TagLanguage>
      <DefaultLanguage>1</DefaultLanguage>
    </Simple>
    <Simple>
      <Name>PART_NUMBER</Name>
      <String>4/12</String>
      <TagLanguage>und</TagLanguage>
      <DefaultLanguage>1</DefaultLanguage>
    </Simple>
    <Simple>
      <Name>WWW</Name>
      <String>https://www.discogs.com/INXS-Kick/release/8861619</String>
      <TagLanguage>und</TagLanguage>
      <DefaultLanguage>1</DefaultLanguage>
    </Simple>
  </Tag>
  <Tag>
    <Targets>
      <TargetTypeValue>50</TargetTypeValue>
    </Targets>
    <Simple>
      <Name>DATE_RECORDED</Name>
      <String>1987</String>
      <TagLanguage>und</TagLanguage>
      <DefaultLanguage>1</DefaultLanguage>
    </Simple>
  </Tag>
  <Tag>
    <Targets>
      <TargetTypeValue>50</TargetTypeValue>
      <TrackUID>11523941633358805213</TrackUID>
      <TargetType>MOVIE</TargetType>
    </Targets>
    <Simple>
      <Name>BPS</Name>
      <String>8829154</String>
      <TagLanguage>eng</TagLanguage>
    </Simple>
    <Simple>
      <Name>DURATION</Name>
      <String>00:00:29.994851040</String>
      <TagLanguage>eng</TagLanguage>
    </Simple>
    <Simple>
      <Name>NUMBER_OF_FRAMES</Name>
      <String>35994</String>
      <TagLanguage>eng</TagLanguage>
    </Simple>
    <Simple>
      <Name>NUMBER_OF_BYTES</Name>
      <String>33102706</String>
      <TagLanguage>eng</TagLanguage>
    </Simple>
    <Simple>
      <Name>_STATISTICS_WRITING_APP</Name>
      <String>mkvmerge v35.0.0 ('All The Love In The World') 64-bit</String>
      <TagLanguage>eng</TagLanguage>
    </Simple>
    <Simple>
      <Name>_STATISTICS_WRITING_DATE_UTC</Name>
      <String>2019-07-01 01:35:06</String>
      <TagLanguage>eng</TagLanguage>
    </Simple>
    <Simple>
      <Name>_STATISTICS_TAGS</Name>
      <String>BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES</String>
      <TagLanguage>eng</TagLanguage>
    </Simple>
  </Tag>
</Tags>

The Matroska Tagging standard uses TargetTypeValue to group metadata tags by object:
50 = Album object
30 = Track object

FFmpeg is only returning TargetTypeValue = 30 (track info)

Kodi 18/19 is using ffmpeg to read Matroska metadata and need the album tags (TargetTypeValue = 50) as well as curennt track tags.

Sample Files:
Small mka (Matroska Audio files) sample files tagged with MP3tag:
https://drive.google.com/drive/folders/18OXbob8IC_A9pNSPRDxmNc_8NSrDwAQ-?usp=sharing

Matroska Tagging Specification:
https://www.matroska.org/technical/specs/tagging/index.html

Change History (7)

comment:1 Changed 4 months ago by cehoyos

  • Keywords mkv added; Matroska removed
  • Version changed from 4.1 to unspecified

Is this issue reproducible with current FFmpeg git head, the only version supported here?

comment:2 Changed 4 months ago by cehoyos

  • Description modified (diff)

comment:3 Changed 4 months ago by cehoyos

  • Description modified (diff)

comment:4 Changed 4 months ago by HomerJau

  • Priority changed from normal to important

Its reproducible in nightly build dated 3 July 2019

comment:5 Changed 4 months ago by HomerJau

The first line of Summary of bug should be:

ffmpeg does not return ALL metadata tags for a Matroska file. This is causing music library issues in Kodi 18 and 19.

Apologies, Looks like I can't edit it.

Last edited 4 months ago by HomerJau (previous) (diff)

comment:6 Changed 4 months ago by cehoyos

  • Component changed from undetermined to avformat
  • Priority changed from important to normal
  • Version changed from unspecified to git-master

comment:7 Changed 4 months ago by cehoyos

  • Description modified (diff)
Note: See TracTickets for help on using tickets.