Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exoplayer buffering on full buffer

I am developing an application that plays mp4 videos using ExoPlayer. I have managed to set it up and play some videos, but there is something I don't quite understand. When the video is fully buffered and I seek forward, the player enters in state BUFFERING and takes some (very short) time to resume playing. What is that time for in a full buffer?? I know that exoplayer does not buffer previous frames, but why is it also rebuffering when going forward? I have tracked that delay down to "doSomeWork()" method on the TrackRenderers, but still I have no idea how to 'fix' it. I am currently using the code on ExoPlayer's demo and the ExtractorRendererBuilder for the videos.

Anyone else encountered that situation?

Thank you.

like image 237
Alqueraf Avatar asked Nov 08 '22 16:11

Alqueraf


1 Answers

The "BUFFERING" is primarily for two reasons.

  1. if the player can seek into a frame in memory, then it does a linear search to find the key-frame and jumps to it. the linear search takes a little while, depending on the number of frames in memory
  2. if the frame is not in memory, then exoplayer has to download the frames to memory from network/disk. That obviously takes longer.
like image 139
pellucide Avatar answered Nov 14 '22 22:11

pellucide