-
Notifications
You must be signed in to change notification settings - Fork 6k
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
AudioTrack: Discontinuity detected and Video Freezes, audio and subtitle works fine #5323
Comments
Can you provide better reproduction steps, to allow us to see what you're seeing? In particular some sample content and an ad tag. I tried playback of content with more than two ad breaks, and it worked fine for me. |
Hi @ojw28, My apologies for not being clear, ExoPlayer is used for TV and FF and RW action is achieved through listening to remote control events, public boolean dispatchKeyEvent(KeyEvent event) {
if (event.getKeyCode() == KeyEvent.KEYCODE_MEDIA_FAST_FORWARD &&
event.getAction() == KeyEvent.ACTION_DOWN) {
fastForward();
return true;
}
if (event.getKeyCode() == KeyEvent.KEYCODE_MEDIA_FAST_FORWARD &&
event.getAction() == KeyEvent.ACTION_DOWN) {
rewind();
return true;
}
...
...
...
super.dispatchKeyEvent(event);
} Steps to reproduce,
Fast Forward long mForwardRewindPosition = 0L;
void fastForward() {
mForwardRewindPosition = exoPlayer.getCurrentPosition() + (exoPlayer.getDuration() / 100);
mForwardRewindPosition = Math.min(mForwardRewindPosition, exoPlayer.getDuration());
exoPlayer.seekTo(exoPlayer.getCurrentWindowIndex(), mForwardRewindPosition);
} Rewind void rewind() {
mForwardRewindPosition = exoPlayer.getCurrentPosition() - (exoPlayer.getDuration() / 100);
mForwardRewindPosition = Math.max(mForwardRewindPosition, 0);
exoPlayer.seekTo(exoPlayer.getCurrentWindowIndex(), mForwardRewindPosition);
}
Actual Result Audio and subtitles are working as expected but video is frozen all the time even you can see the progress. And at the same time if you check the log, you will find this error lines, E/AudioTrack: Discontinuity detected [expected 23219, got -51958000]
E/AudioTrack: Discontinuity detected [expected 23219, got -29759000]
E/AudioTrack: Discontinuity detected [expected 23219, got -6145000] Hope it will reproduce the issue. |
|
Hi, sample video URL is,
and AdTag is,
|
I can't reproduce this in the demo app, even using 2.9.2 specifically. Could you try again to see if the issue is resolved (it's theoretically possible a change in IMA on the server side fixed this)? If it still reproduces for you, could you provide a bit more information. In particular, a full bug report, and if possible a video showing the issue reproducing in our demo app, so that we can make sure we're doing exactly the same thing. Thanks! |
Closing because no further information was provided. |
Hi @ojw28, It's been quite a while. ExoPlayer Version : 2.10.1 I have proper reproduction steps now, I am able to reproduce it with demo-app too. Steps to reproduce, Use AndroidTV or something which can be controlled via remote control.
Please find this drop-box link for better clarity, https://www.dropbox.com/s/scbsm4kbr5gin1m/Video%202019-06-13%2C%202%2044%2001%20PM.mov?dl=0 |
Thanks for the extra information and reproduction steps! It's now pretty clear that it's a duplicate of #6009 and it will be fixed soon. |
@tonihei Thanks 👍 |
We are currently queuing periods in a way such that the new start position lines up with the end of the previous period (to ensure continuous playback). However, if the start position of the new period is larger than the total of all previously played period durations, we may end up with negative renderer timestamps when seeking back to the beginning of this new period. Negative timestamps should be avoided as most decoders have problems handling them correctly. This change forces a renderer reset if we detect such a seek to a negative renderer time and also resets the renderer offset to 0 every time all renderers are disabled, as this is the only time where we can savely change the offset of an existing media period. Also, if playback starts with an ad, we choose the content position as renderer offset to prevent the whole issue from occurring for the seek-behind- midroll case. Issue:#6009 Issue:#5323 PiperOrigin-RevId: 253790054
We are currently queuing periods in a way such that the new start position lines up with the end of the previous period (to ensure continuous playback). However, if the start position of the new period is larger than the total of all previously played period durations, we may end up with negative renderer timestamps when seeking back to the beginning of this new period. Negative timestamps should be avoided as most decoders have problems handling them correctly. This change forces a renderer reset if we detect such a seek to a negative renderer time and also resets the renderer offset to 0 every time all renderers are disabled, as this is the only time where we can savely change the offset of an existing media period. Also, if playback starts with an ad, we choose the content position as renderer offset to prevent the whole issue from occurring for the seek-behind- midroll case. Issue:#6009 Issue:#5323 PiperOrigin-RevId: 253790054
Hi,
I have a really strange issue.
Configuration I am using:
ExoPlayer + DRM content + IMA + Video Length 45-50 minutes
ExoPlayer Version : 2.9.2
Issue:
All works good.
Only time issue occurs is when when user is playing a content with more than two AdBreaks (let say video has a mid-roll) and presses fastForward button.
When user presses FF button, and if it hits the AdBreak. Ad plays as expected no issue there. But when user rewinds after the Ad, ExoPlayer is unable to play content before the AdBreak.
Audio and subtitles are there but video is frozen all the time till it hits the AdBreak, after that it works fine.
After the AdBreak, FF and RW buttons are working as expected but after if the user presses FF again and hit the Ad and it it tries to rewind the content before the Ad, same issue repeats.
On the top of that, from the log it shows this error message when user tries to forward and rewind in the frozen part of video.
E/AudioTrack: Discontinuity detected [expected 23219, got -51958000]
E/AudioTrack: Discontinuity detected [expected 23219, got -29759000]
E/AudioTrack: Discontinuity detected [expected 23219, got -6145000]
I am really not sure what's going on.
The text was updated successfully, but these errors were encountered: