-
Notifications
You must be signed in to change notification settings - Fork 574
Description
[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:
media/libraries/common/src/main/java/androidx/media3/common/MimeTypes.java
Lines 476 to 477 in ae9a233
} 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:
MimeTypes.AUDIO_DTS_EXPRESS, |
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