androidx / androidx/media

HLS-FMP4 DTS:X Profile 2 Streams are missing first 2 seconds during Tunnel mode (Direct) Playback due to timestampAdjuster in FragmentedMp4Extractor.java

Open
#1,245 16 comments 0 reactions 1 assignee View on GitHub

@tianyif is already working on this.

Since Apr 4, 2024.

bug needs triage
Dominant language
Java
Stars
3k
Forks
955
Avg merge
12d 14h
Merged PRs (30d)
2

Description

Version

Media3 main branch

More version details
Devices that reproduce the issue

All Android TV with DTSX Decoder. E.g. Xiaomi Q2 55"

Devices that do not reproduce the issue

None.

Reproducible in the demo app?

Yes

Reproduction steps

NOTES:
HLS-FMP4 DTS:X Profile 2 Streams are missing first 2 seconds of audio during Tunnel mode (Direct) Playback due to timestampAdjuster in FragmentedMp4Extractor.java.

  • This only happens for Tunnel mode playback with DTS:X audio playing back via Direct Passthrough.
  • This does not happen when playing back through MediaCodec DTSX Decoder.
  • When the following lines (around line 1538) in FragmentedMp4Extractor.java are commented, the playback seems ok.
    if (timestampAdjuster != null) {
    sampleTimeUs = timestampAdjuster.adjustSampleTimestamp(sampleTimeUs);
    }
  • FYI, DTS:X Profile 2 audio codec has a sync and non-sync frame concept. So once the first sync frame is lost, the whole section of audio cannot be decoded properly until the next sync frame can be located. In this stream, the sync interval is 2 seconds. It correlates with the 2 seconds lost in the beginning.
  • What does timestampAdjuster do exactly? When are these adjustments to the presentation time stamps required?
  • Is the presentation time stamp adjustments necessary when playing back via Direct Passthrough?
  • How can we resolve this issue more gracefully?

Thanks!

Expected result

Playback does not skip the first 2 seconds.

Actual result

Playback skipped the first 2 seconds.

Media

HLS-fMP4 stream. First 2 seconds lost during playback in tunnel mode:
DTS:X 5.1.4 - HLS fMP4: https://secured.streamdts.com/dtsx/dtsx/hls/fmp4/callout/index.m3u8

DASH stream with no playback issues:
DTS:X 5.1.4 - DASH: https://secured.streamdts.com/dtsx/dtsx/dash/callout/index.mpd

The PTS values are the same in both streams.

Bug Report
  • You will email the zip file produced by adb bugreport to android-media-github@google.com after filing this issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.