-
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
Playing from memory (byte[]) #7228
Comments
Okay, I have some issues in my read callback now seems to move on. ExoPlayer starts buffering but it does not get through it: Log:
I believe 3 means buffering, but the player unfortunately does not get into ready state, and there are bunch of warnings before that. |
Your implementation of
Note that You also ignore Your implementation of
If you're not able to seek to arbitrary offsets within the 'file' then simply implementing a If your goal is to live stream content from a server, have you considered using one of the protocols designed for this like HLS or DASH? |
User error, but some conclusion:
(My PlayerView was hidden, silly mistake.) This issue shall be closed as it does not contain any more unanswered questions. |
You may be able to mitigate this by wrapping your DataSource in a CacheDataSource. ExoPlayer does indeed try and read little and often - if you want a more 'chunked' behaviour you need to implement it within your DataSource.
|
And we should be able to play a progressive live stream without using HLS or DASH, but we determine it's live by detecting |
Thanks for the This one however I don't get: From |
Yes, you're completely right, sorry about that. I'll edit my comment above to avoid tripping up a future reader. |
@danergo I'm also facing same issue, if you solve the issue can explain how can we do stream. |
It's actually not difficult. From your
Then in read you can pass your raw stream data to the buffer and ExoPlayer will play it if your device contains the right decoder and the stream is valid. |
[REQUIRED] Searched documentation and issues
[REQUIRED] Question
I have a fragmented mp4 with h264 video which is coming as byte[] from a server.
It is a live stream, i.e. it is not possible to load the whole stream at once.
So it is coming from the server chunk-by-chunk (HTML5 video player via MSE can play it nice and smooth).
I've created a custom
DataSource
:These are my initialization steps:
However ExoPlayer seems to try reading only 1 byte at a time starting from the 2nd.
How can I ask ExoPlayer to read more data? I.e. read 10K or 20K bytes at once.
(My read function will take care if there is nothing to read: will block.)
A full bug report captured from the device
This is the relevant logcat:
getUri
addTransferListener
open
getUri
getUri
read, readLength=4, offset=0
read, readLength=1, offset=4
read, readLength=1, offset=5
read, readLength=1, offset=6
read, readLength=1, offset=7
... (same line repeats)
close
Link to test content
Test content is not available yet, because a serving method is also needed for testing.
I hope reading of ExoPlayer can be also configured at least with the buffer size.
The text was updated successfully, but these errors were encountered: