Skip to content

Inconsistent handling of Matroska LanguageIETF for Audio vs Text tracks ("en-US") #1295

Description

@maghuro

Inconsistent handling of Matroska LanguageIETF for Audio vs Text tracks (en-US)

Description

MediaInfo appears to handle the Matroska LanguageIETF value en-US differently depending on the track type.

In the attached sample, both Audio and Text tracks contain the correct Matroska IETF language tag.

mkvmerge -J reports:

{
  "id": 1,
  "language": "eng",
  "language_ietf": "en-US",
  "title": "English (US) | Opus 5.1 @ 392 kbps"
}

However, MediaInfo reports:

Audio track:

{
  "ID": "2",
  "Title": "English (US) | Opus 5.1 @ 392 kbps",
  "Language": "en"
}

while subtitle tracks in the same file are reported as:

{
  "ID": "11",
  "Title": "English (US)",
  "Language": "en-US"
}

and:

{
  "ID": "12",
  "Title": "English (US) (SDH)",
  "Language": "en-US"
}

Expected behaviour

I would expect the same LanguageIETF value to be reported consistently regardless of track type.

Since the Matroska file contains:

"language_ietf": "en-US"

for the audio track, I would expect MediaInfo to report:

"Language": "en-US"

for Audio tracks as well.

Actual behaviour

  • Audio track: en-US is reported as en
  • Text track: en-US is reported as en-US

Additional observations

In the same file, another audio track is reported correctly:

{
  "ID": "3",
  "Title": "Portuguese (European) | Opus 5.1 @ 389 kbps",
  "Language": "pt-PT"
}

Therefore the behaviour does not seem to affect all IETF language tags equally.

Environment

MediaInfo:

MediaInfo Command line,
MediaInfoLib - v26.01

mkvmerge:

mkvmerge v99.0 ('Buka') 64-bit

mkvmerge output

{
  "id": 1,
  "language": "eng",
  "language_ietf": "en-US",
  "title": "English (US) | Opus 5.1 @ 392 kbps"
}
{
  "id": 2,
  "language": "por",
  "language_ietf": "pt-PT",
  "title": "Portuguese (European) | Opus 5.1 @ 389 kbps"
}

MediaInfo Audio output

{
  "ID": "2",
  "Title": "English (US) | Opus 5.1 @ 392 kbps",
  "Language": "en"
}
{
  "ID": "3",
  "Title": "Portuguese (European) | Opus 5.1 @ 389 kbps",
  "Language": "pt-PT"
}

MediaInfo Text output

{
  "ID": "11",
  "Title": "English (US)",
  "Language": "en-US"
}
{
  "ID": "12",
  "Title": "English (US) (SDH)",
  "Language": "en-US"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions