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)
- Image Issue in Notification itemBuilder HOT 1
- Device capabilities report unsupported frameRate HOT 7
- The exoplayer was created using the child thread looper, and verifyCurrentThread() reported an error when receiving the callback onSurfaceChanged() HOT 4
- Multicast ABR Support in ExoPlayer HOT 1
- how can I save video to local storage of exoplayer cached video like Tiktok does HOT 2
- Only first frame and Audio Plays in Android 23 with MPEG-4 - AVC HOT 1
- how to dynamic refresh the metadata of one playing media item? HOT 1
- How to limit the interval between change bitrate for HLS stream? HOT 1
- AV1 Seek Support Issue HOT 1
- eca3 - eca audio format HOT 1
- Failed to initialize OMX.MTK.VIDEO.DECODER.AVC.secure HOT 1
- 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
- Stream link starts downloading instead of playing, after it dowwnloaded completely it starts playing. HOT 2
- Can I defined provision-url not by getProvisionRequest in FrameworkMediaDrm.
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.