Comments (7)
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.
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.
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.
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.
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.
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.
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)
- Loading glsl shaders in Exoplayer? HOT 1
- play m3u8 media no audio HOT 1
- CC function broken in 2.18.7 HOT 1
- onDeviceVolumeChanged(int volume, boolean muted) is never triggered on a TV device HOT 1
- Video blinking when switching between videos with different ratios (Android 14 only) HOT 1
- How to gather HAR(HTTP Archive) file with ExoPlayer? HOT 1
- add support to play mpd dash which doesn't have default kid in it HOT 2
- Can I defined provision-url not by getProvisionRequest in FrameworkMediaDrm.
- Playing VP8 encoded webm format video, on Android 13, the video screen is unclear and appears blurred
- how triggers FIRST_QUARTILE HOT 1
- how to read sps and pps from the stream
- How in Exoplyaer Upgrade Gradle Version from agp_version = '7.4.2' to the latest 8.2? HOT 3
- how make default buildconfig to release I mean how change gradle that by default when build APK on Android Studio always be release by default? HOT 3
- Decrypting HLS Stream using decryption key locally from code
- DRM session error java.lang.IllegalArgumentException: {}: BAD_VALUE HOT 2
- exoplayer play rtsp ,then call seekToDefaultPosition ,player state already buffing HOT 1
- play error HOT 2
- TIVIMATE and INTERNAL PLAYER question HOT 1
- App crash when target sdk version 34 (android.app.MissingForegroundServiceTypeException: Starting FGS without a type callerApp=ProcessRecord)
- PlayerNotificationManager hasn't load rewind and forward button, play/pause button don't work
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from exoplayer.