Version
Media3 main branch
More version details
627b7a3
Devices that reproduce the issue
All
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Yes
Reproduction steps
- Play a Dolby Vision DASH stream with embedded 608 captions in the Demo app.
- Enable captions.
Expected result
Captions are enabled and are rendered.
Actual result
Captions are enabled but are not rendered.
This occurs because the Dolby Vision metadata in the video track causes the mime type to be video/dolby-vision instead of video/hevc or video/avc.
In this line:
|
processSeiNalUnitPayload = |
NalUnitUtil.isNalUnitSei always returns false because the function only checks for H264 or H25 mime types: https://github.com/androidx/media/blob/release/libraries/container/src/main/java/androidx/media3/container/NalUnitUtil.java#L342
If the mime type is Dolby Vision the Sei NAL units get ignored.
Secondly for H265 Dolby Vision this check also fails:
|
nalBuffer.setPosition(MimeTypes.VIDEO_H265.equals(track.format.sampleMimeType) ? 1 : 0); |
If Dolby Vision is or'd with the H265 format for the above 2 cases the issue is resolved. However, the fix obviously isn't that simple because H264 or H265 can in theory be Dolby Vision.
Media
Not applicable
Bug Report
Version
Media3 main branch
More version details
627b7a3
Devices that reproduce the issue
All
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Yes
Reproduction steps
Expected result
Captions are enabled and are rendered.
Actual result
Captions are enabled but are not rendered.
This occurs because the Dolby Vision metadata in the video track causes the mime type to be
video/dolby-visioninstead ofvideo/hevcorvideo/avc.In this line:
media/libraries/extractor/src/main/java/androidx/media3/extractor/mp4/FragmentedMp4Extractor.java
Line 1609 in 49337d9
NalUnitUtil.isNalUnitSeialways returns false because the function only checks for H264 or H25 mime types: https://github.com/androidx/media/blob/release/libraries/container/src/main/java/androidx/media3/container/NalUnitUtil.java#L342If the mime type is Dolby Vision the Sei NAL units get ignored.
Secondly for H265 Dolby Vision this check also fails:
media/libraries/extractor/src/main/java/androidx/media3/extractor/mp4/FragmentedMp4Extractor.java
Line 1632 in 49337d9
If Dolby Vision is or'd with the H265 format for the above 2 cases the issue is resolved. However, the fix obviously isn't that simple because H264 or H265 can in theory be Dolby Vision.
Media
Not applicable
Bug Report
adb bugreportto android-media-github@google.com after filing this issue.