Proper handling of specific DTS-HD profiles
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 3k
- Forks
- 955
- Avg merge
- 12d 14h
- Merged PRs (30d)
- 2
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.
For example, in MP4 extractor:
https://github.com/androidx/media/blob/ae9a2339679826f870690092509a135dffc0d7e4/libraries/common/src/main/java/androidx/media3/common/MimeTypes.java#L476-L477
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:
https://github.com/androidx/media/blob/ae9a2339679826f870690092509a135dffc0d7e4/libraries/extractor/src/main/java/androidx/media3/extractor/DtsUtil.java#L516
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.