-
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
Support I-frame only playback (trick play) in player and buffering logic #7171
Comments
@tonihei Please could you take a look? |
Setting the To load at most one chunk at a time, you need to set
Just to verify my understanding of your code. Are you pausing the player while you do this? If not, the playback position will advance and start loading the second chunk as soon as it gets closer to its start.
The expectation would be to load 2 chunks if the chunk durations is exactly 2 seconds. Did you see something else in this case?
Do you have a reliable way of reproducing that? If so, it would be great if you can provide example media and reproduction steps so that we can investigate.
As a more general remark: We are planning to add better support for this exact use case soon including for the problem of buffering too much data. |
Hi @tonihei ,
Yes, the player is paused.
Yes, it downloads 2 chunks.
I will try to setup set the demo app to replicate this behaviour and will share with you, but it has to be shared privately. Where can i send it?
Cool, is there any code alreaddy on the public branches? |
You can send emails to dev.exoplayer@gmail.com with "Issue #7171" in the subject line.
No, unfortunately not yet. It's really just a plan so far. We can use this GitHub issue to track this implementation. I'll update the title once we figured out whether the problem with stuck buffering is an actual bug or intended behaviour. |
Ok, thanks. |
Hi, Let me know if you need more info. Thank you |
Thanks for sharing! I can reproduce the issue and understand why it's happening now. We loaded the first audio and video chunk, and the video chunk has only one single sample (because it's I-frame only). The playback position is still at position 0 and we already rendered the first frame.
It's of course unfortunate that both states are logically correct in isolation but don't work together. :) If we were considering the sample duration, then the renderer should actually be ready for as long as the last sample is still playing and also, we should take this sample duration into account when calling LoadControl.shouldStartPlayback. I'll mark this as an enhancement to fix our playback logic for these I-frame only streams. This issue wouldn't occur (even for very small maxBuffer values in LoadControl) if the stream had a normal amount of video frames. This is easily verifiable by playing any other stream with the same LoadControl settings. For the mean time, you can use a slightly larger maxBuffer value to start loading the second chunk even if more inefficient. Also reassign to @ojw28, because he is currently working on improving I-frame only playback support. |
Hi @tonihei , Thank you for your comprehensive answer. Do you still need to do more tests with the test stream i provided or can i tell the operations team they can disabled it? |
As we are currently working on it, it would be great if you could keep the stream for a little while for testing. |
Sure, no problem, i'll ask them to keep it running as long as possible. |
Hi,
I'm trying to use a trickMode track on a Dash stream to display thumbnails above the seekbar when seeking.
I've already made most development and it's working.
For the thumbnails PlayerView player, i've changed the track selection parameters so that only that trickmode track is enabled.
Now i'm trying to make that player to load as less chunks as possible, and renderer as fast a possible.
To achieve that i've use a DefaultLoadControl, with custom values for Buffer Duration parameters.
val loadControl = DefaultLoadControl.Builder() .setBufferDurationsMs(1000, 5500, 1000, 1000) .createDefaultLoadControl()
With this values it works fine, but for each seek i do, it downloads 3 chunks.
What i'm trying to achieve is to have each seek downloads only one chunk, since i don't need more media (i just need do show a frame of it).
I've tried to change the maxBufferMs to 2000 ms, since my chunks length is 2 seconds, but it doesn't work as expected.
If change the maxBufferMs to a value lower than 5500 ms, on some seek operations (normally the first after player.prepare) the player will never change to STATE_READY, and will not render any media.
I've been going through the issues on github and i've saw some comments saying that lowering the maxBufferMs to extreme low values could break the playback, which i think it's what is happening to me.
I've also have been looking through the exoplayer code to try to understand why this is happening, and if there's a way i could go around it, but so far i didn't find anything very helpful.
Can help me with this?
Do you think there's a way to achieve what i'm trying to do?
Can you give me any directions on where to look to try to understand the problem?
Thanks in advance
The text was updated successfully, but these errors were encountered: