Video freezes shortly when playing from a new position in DASH live stream
Version
Media3 1.6.1
More version details
No response
Devices that reproduce the issue
- Xiaomi Redmi Pad, Android 14
- Samsung Galaxy A15, Android 14
- Samsung Galaxy Z Flip, Android 15
- Samsung Galaxy Note 20, Android 13
- Samsung Galaxy S20 FE, Android 13
- Google Pixel Tablet, Android 15
Devices that do not reproduce the issue
Most devices. We could only reproduce it on certain devices.
Reproducible in the demo app?
Not tested
Reproduction steps
I am playing a DASH live stream. When pausing the video and then playing it again (or seeking to a different time), I am requesting a new URL from the server with the correct timestamp to continue from. The audio and subtitles start playing immediately, but seem to have jumped back by around 2sec. The video shows a freeze frame until the audio catches up to that frame. Then the video starts playing normally and everything is synced again.
This behaviour can only be reproduced when:
- Subtitles are enabled, which are set as a separate video track on the ExoPlayer
- In a release build of the app
I can not reproduce it with the old ExoPlayer 2.19.1, before media3.
Expected result
- Audio, subtitles and video are in sync immediately when the stream starts
Actual result
- Audio and subtitles jump back about 2sec and play immediately while the video shows a freeze frame until the audio catches up
Media
I will send relevant logs and videos via email
Bug Report
- [x] You will email the zip file produced by
adb bugreportto [email protected] after filing this issue.
I can not reproduce it with the old ExoPlayer 2.19.1, before media3.
Please can you either try with media3 1.3.1 or with legacy subtitle enabled on 1.6.1:
On DefaultMediaSourceFactory set this to false: https://developer.android.com/reference/androidx/media3/exoplayer/source/DefaultMediaSourceFactory#experimentalParseSubtitlesDuringExtraction(boolean)
https://developer.android.com/media/media3/exoplayer/media-sources#customizing-media-source-creation
And on TextRenderer set this to true: https://developer.android.com/reference/androidx/media3/exoplayer/text/TextRenderer#experimentalSetLegacyDecodingEnabled(boolean)
To pass in your custom renderer you'll need to override this method: https://developer.android.com/reference/androidx/media3/exoplayer/DefaultRenderersFactory#buildTextRenderers(android.content.Context,androidx.media3.exoplayer.text.TextOutput,android.os.Looper,int,java.util.ArrayList%3Candroidx.media3.exoplayer.Renderer%3E)
And then pass it to ExoPlayer.Builder: https://developer.android.com/media/media3/exoplayer/customization#enabling-asynchronous-buffer-queueing
Hi @icbaker I stayed on 1.6.1 and applied the steps for the legacy subtitles that you described. It seems to fix the issue. I can't reproduce it anymore with these changes.
Thanks for checking - please can you provide us with media we can use to reproduce the issue?
Please either upload it here or send it to [email protected] with the subject Issue #2528. Please also update this issue to indicate you’ve done this.
Unfortunately I can't provide media, since this only happens on our live streams which need authentication. Even with the same media it would be hard to reproduce, because it requires requesting a new stream url and preparing a new MediaItem to trigger the bug. So the setup is non-trivial. When I created the issue, I sent an email with the adb bugreport output, logs and videos. Maybe this can help? Let me know if you need any other info. I will be on vacation for the next two weeks, but will get back to you after that.
If you'd like us to investigate I'm afraid you need to provide repro media. Otherwise we're just guessing, which isn't a good use of our time I'm afraid. If you are unable to share the streams you have that repro the issue, please craft a stream from content that you can share which still repros.
Hey @snappdevelopment. We need more information to resolve this issue but there hasn't been an update in 14 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@snappdevelopment if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.