Git Product home page Git Product logo

Comments (7)

natez0r avatar natez0r commented on May 5, 2024

I am also seeing this problem. For me it's easiest to reproduce if you seek near the end of the video and seek back to the beginning. We only use progressive download mp4 files.

Still happening in 1.0.13.

from exoplayer.

IanDBird avatar IanDBird commented on May 5, 2024

I retested the other day against the latest dev branch and was still able to reproduce. I explored different options how to try and workaround it myself, but since the issue is the player remaining in buffering, it's very difficult to determine the difference between a video buffering for a long time vs this issue. If the video is just taking a long time to load, the last thing you want to do is kill the video and try to load it again...

from exoplayer.

ephemient avatar ephemient commented on May 5, 2024

I think I can get it to happen more frequently by seeking right to almost the end of the file.

With additional logging in ExoPlayerImplInternal.rendererReadyOrEnded, it seems that MediaExtractor.getCachedDuration sometimes stops short of the requested buffer duration. Since FrameworkSampleSource.continueBuffering is a no-op, there is no way to ask it to buffer more, and ExoPlayer remains in this state indefinitely.

from exoplayer.

ojw28 avatar ojw28 commented on May 5, 2024

That sounds plausible. The easiest way to work around the issue would be to make an instance like:

ExoPlayer.Factory.newInstance(numRenderers, 0, 0)

Is your use case playing back regular MP4 files? The complete ExoPlayer based solution to this problem would be to implement everything at the application layer and stop using FrameworkSampleSource. This would give us enough control to fix these problems properly, as we've done for DASH and SmoothStreaming. It's quite a lot of work though.

from exoplayer.

ephemient avatar ephemient commented on May 5, 2024

Yes, I'm playing MP4s from a URL. Setting the buffer times to 0 does seem to avoid getting stuck, but doesn't feel great for other reasons.

As another potential workaround, how acceptable would it be to implement a buffer within FrameworkSampleSource which continues to read samples ahead from MediaExtractor until it has cached enough? Although I'm not sure how to tell if we're in the buffering or rebuffering case from there.

from exoplayer.

ojw28 avatar ojw28 commented on May 5, 2024

That doesn't sound ideal either. As per above, the best option by far is to implement everything at the application layer.

Maybe the best workaround would be to have FrameworkSampleSource.getBufferedPositionUs claim that it's buffered to the end if you're within the last ~5 seconds or so of the content. That would be more or less equivalent to setting the buffer times to 0 selectively, only when seeking near the end of the content.

from exoplayer.

ojw28 avatar ojw28 commented on May 5, 2024

On the latest dev branch, you can use ExoPlayer's application level MP4 extractor to avoid this issue (in the demo app, use TYPE_MP4 rather than TYPE_OTHER).

from exoplayer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.