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

HLS Live Video stuck at buffering #2733

Closed
sheaam30 opened this issue Apr 27, 2017 · 11 comments
Closed

HLS Live Video stuck at buffering #2733

sheaam30 opened this issue Apr 27, 2017 · 11 comments
Assignees

Comments

@sheaam30
Copy link

Issue description

When playing an HLS Live video about ~30 seconds in the player state goes to buffering and never comes back to ready. It should buffer if needed and then come back to ready.

Reproduction steps

Was able to reproduce in the demo app by plugging in my live URL in the HLS part of media.exolist.json and opening the stream.

Link to test content

Since it only does it on live video maybe we can coordinate via e-mail.

Version of ExoPlayer being used

2.3.1

Device(s) and version(s) of Android being used:

100% reproduce

Pixel XL (7.1.2)
Samsung GS6 (6.0.1)
Nexus 6 (5.10)
Emulator (7.1.1)

A full bug report captured from the device

Will e-mail this as well

@AquilesCanta
Copy link
Contributor

Could you send a link to the content via e-mail as well?

@sheaam30
Copy link
Author

sent

@sheaam30
Copy link
Author

sheaam30 commented Apr 29, 2017

@AquilesCanta it looks like it's a com.google.android.exoplayer2.source.BehindLiveWindowException. I saw issue #1782 and looks like it's related to that, although it does happen with the DemoPlayer which it's supposed to be fixed in.

Edit: Getting that exception only once in a while. Sometimes it'll freeze and give me that error and other times it won't.

@AquilesCanta
Copy link
Contributor

Sorry, I haven't had time to look into this. Will update this once I do.

@AquilesCanta
Copy link
Contributor

AquilesCanta commented May 10, 2017

Hello, @sheaam30. Sorry for the delay. Can you provide a link to the live stream to dev.exoplayer@gmail.com? Being able to reproduce the issue myself will make debugging much easier. I see the chunks are available, so it should not be much of an inconvenience.

@yueyueniao2012
Copy link

yueyueniao2012 commented May 19, 2017

I also meet this issue with this url:
http://live.hkstv.hk.lxdns.com/live/hks/playlist.m3u8.
This video play stuck buffering in random time and never come back to ready.But Exoplayer(release-v2 branch new code demo) print no error log.

@AquilesCanta
Copy link
Contributor

AquilesCanta commented May 25, 2017

@sheaam30, this is a friendly ping. Please provide the actual streams to reproduce the issue (unfortunately, a copy of the manifest is not enough).

@yueyueniao2012 Please file a new issue including all the information required in the issue template. I am not able to reproduce the described behavior in the Demo app (dev branch).

@yueyueniao2012
Copy link

yueyueniao2012 commented May 26, 2017

@AquilesCanta This issue will always appear on any device when playing a little bit longer time.Through the analysis of a period of time I find the issue is that sometime this live stream http://live.hkstv.hk.lxdns.com/live/hks/playlist.m3u8 HlsMediaPlaylist's mediaSequence suddenly change to start from zero.This behavior leads to HlsPlaylistTracker's func getLatestPlaylistSnapshot always return oldPlaylist,so the Exoplayer stuck at buffering.I think in this case the player should continue to play the live stream or throw an exception and not stuck at buffering.

private HlsMediaPlaylist getLatestPlaylistSnapshot(HlsMediaPlaylist oldPlaylist,
      HlsMediaPlaylist loadedPlaylist) {
    if (!loadedPlaylist.isNewerThan(oldPlaylist)) {
      if (loadedPlaylist.hasEndTag) {
        // If the loaded playlist has an end tag but is not newer than the old playlist then we have
        // an inconsistent state. This is typically caused by the server incorrectly resetting the
        // media sequence when appending the end tag. We resolve this case as best we can by
        // returning the old playlist with the end tag appended.
        return oldPlaylist.copyWithEndTag();
      } else {
        return oldPlaylist;
      }
    }
    long startTimeUs = getLoadedPlaylistStartTimeUs(oldPlaylist, loadedPlaylist);
    int discontinuitySequence = getLoadedPlaylistDiscontinuitySequence(oldPlaylist, loadedPlaylist);
    return loadedPlaylist.copyWith(startTimeUs, discontinuitySequence);
  }

@AquilesCanta
Copy link
Contributor

@yueyueniao2012, please file a new issue. The original reported issue and your issue might have nothing to do with each other.

@synologic
Copy link

I'm seeing this even when the EXT-X-MEDIA-SEQUENCE increments and not rolling back to zero

@AquilesCanta
Copy link
Contributor

Closing this issue due to lack of required information. If you have encountered a similar behavior, please file a new issue, including all the information requested in the issue template.

@google google locked and limited conversation to collaborators Sep 30, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants