Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frequent DashManifestStaleException errors on Live Dash manifests #1734

Open
1 task
JonWatson opened this issue Sep 17, 2024 · 4 comments
Open
1 task

Frequent DashManifestStaleException errors on Live Dash manifests #1734

JonWatson opened this issue Sep 17, 2024 · 4 comments
Assignees

Comments

@JonWatson
Copy link

Version

Media3 1.4.1

More version details

This has been observed on Media3 1.2.1+ (may exist on previous versions as well)

Devices that reproduce the issue

Not device specific, occurs on a variety of devices and versions

Devices that do not reproduce the issue

None known

Reproducible in the demo app?

Not tested

Reproduction steps

Our professional sports and other live content is DRMed, thus we cannot attempt to reproduce this in the Demo app. We will send an email with a debuggable APK with EventLogger turned on and instructions on how to log in/find content.

  • Play Live Dash stream with SSAI injection(this includes most of our Live content)
  • Allow the stream to play uninterrupted for a period of time
  • Observe periodic DashManifestStaleException errors (this comes from the "Loaded out of sync manifest" case in DashMediaSource.java)

We understand that our Live streams may have an issue we need to try to fix for Media3, but there are other players (such as Roku) which do not have this frequent problem playing the same Dash streams. We are hoping to identify the issue and get a Media3 fix or have our Video provider help us adjust the manifests/SSAI periods.

Note that I have also opened the following Issue that has an easy-to-recreate "indefinite buffering" issue that is related to our SSAI ad-break periods, where as this DashManifestStaleException error is periodic/random. I'm hoping the two are related and we can squash both at the same time, but that one may be worth looking at first.

Live DASH Manifest indefinite buffering occurs between SSAI ad period and content #1636

Expected result

No DashManifestStaleException

Actual result

Frequent DashManifestStale exceptions (maybe every 20-30 minutes)

Media

Sending an email with a debuggable APK, user credentials, recreation details.

Bug Report

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

APK and instructions have been sent. I'm available any time to help, thank you!

@jobarros
Copy link

I have the same issue when testing a manifest with key rotation.
It happens everytime it needs to read a new period.

Media3 version 1.3.1 (I have also tried version 1.4.1)

The error is either DashManifestStaleException
Caused by: androidx.media3.exoplayer.dash.DashManifestStaleException at androidx.media3.exoplayer.dash.DashMediaSource.onManifestLoadCompleted(DashMediaSource.java:683)

or IndexOutOfBoundsException
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at java.util.ArrayList.get(ArrayList.java:437) androidx.media3.exoplayer.dash.manifest.DashManifest.getPeriod(DashManifest.java:128)

I already use MediaItem.DrmConfiguration.Builder.setMultiSession(true) as specified by the documentation.
https://developer.android.com/media/media3/exoplayer/drm#key-rotation

@tonihei Do you know already if it's an issue on the player's side or if it's something we can fix ourselves?
Is there a workaround?

@jobarros
Copy link

jobarros commented Sep 24, 2024

I looked into the player code and saw the reasons for the exception to be throwed.

The issue for us was resolved by adding incremental start times to each new period in the manifest.

@JonWatson
Copy link
Author

JonWatson commented Sep 25, 2024

I've been looking at a HAR file from an occurrence. I'm hoping a Media3 dev can help us determine what's going on here.

Last period in manifest before the problem is:
<Period start="PT1H6M20.9113500S" id="ad-16-x-1-1">

Suggests Ad break has started and is playing successfully in the player

Last two periods in the next manifest are:
<Period start="PT1H6M20.9113500S" id="ad-16-x-1-1">
<Period start="PT1H8M5.9829833S" id="src-17-src-0-2592">

I believe this is the point that ExoPlayer starts reporting a "buffering" state, and I can see the ..item_init.m4i URLs being loaded that suggests the player is trying to recover from some problem.

The period id suggests this next period is of the game (no longer playing Ads). However playback stalls here and we only see the last frame of the Ad Slate.

Last five periods in the next manifest are:
<Period start="PT1H6M20.9113500S" id="ad-16-1-1"> (originally reported Ad period)
<Period start="PT1H6M50.9203555S" id="ad-16-2-1"> (didn't see this Ad period in the previous manifest)
<Period start="PT1H7M20.9293610S" id="ad-16-3-1"> (didn't see this Ad period in the previous manifest)
<Period start="PT1H7M36.0067776S" id="ad-16-4-1"> (didn't see this Ad period in the previous manifest)
<Period start="PT1H8M5.9829833S" id="src-17-src-0-2592">

ExoPlayer is having problems and continues to try to "recover" from some manifest sync issue. It finally gives up with DashManifestStaleException. These three Ad periods (ad-16-2-1, ad-16-3-1, ad-16-4-1) appear in the last manifest (before the Source period) when they were not included in the previous manifest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants