Skip to content

ExoPlayer ignores embedded 608 captions in Dolby Vision streams #1820

Closed
@Halmo

Description

@Halmo

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

  1. Play a Dolby Vision DASH stream with embedded 608 captions in the Demo app.
  2. 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:

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

  • You will email the zip file produced by adb bugreport to [email protected] after filing this issue.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions