这是indexloc提供的服务,不要输入任何密码
Skip to content

Proper handling of specific DTS-HD profiles #2487

@nift4

Description

@nift4

[REQUIRED] Use case description

I am trying to determine in my app whether the playback format is lossless or not, and display format to the user so that they can verify if setup works correctly.
However, even though https://www.iana.org/assignments/media-types/audio/vnd.dts.hd states:

profile is a required parameter.

ExoPlayer cannot detect whether a file is DTS-HD, DTS-HD High Resolution Audio or DTS-HD Master Audio profile, and uses a mime type without profile parameter for everything except LBR.

public static final String AUDIO_DTS_HD = BASE_TYPE_AUDIO + "/vnd.dts.hd";

For example, in MP4 extractor:

} else if (codec.startsWith("dtsh") || codec.startsWith("dtsl")) {
return MimeTypes.AUDIO_DTS_HD;

even "dtsl" type which is "Extension Substream containing only XLL" -> lossless -> mime should be audio/vnd.dts.hd;profile=dtsma

Another example, ts extractor using DtsUtil always sets DTS Express mime type:


but in ETSI TS 102 114 V1.6.1 Annex F a non-LBR format is explicitly mentioned as supported: "For DTS-HD Lossless formats, the value of [...]" which means DTS-HD MA profile is supported for sure, and I see no indication that other DTS-HD supports are not supported at all, hence this hardcoding to LBR is wrong.

Proposed solution

Edit ExoPlayer and extractors to extract and pass around accurate DTS-HD profile information in the mime type, including:

  • MP4 extractor
  • TS extractor
  • MKV extractor

and do not omit the required profile parameter in the mime type.

Alternatives considered

N/A

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions