media icon indicating copy to clipboard operation
media copied to clipboard

What factors affect the speed of exoplayer loading online videos?

Open leo9082 opened this issue 1 year ago • 1 comments

In my app,i used exoplayer to load online video? but loading speed is very slow. In other app , the same online video is faster then mine.

I create a class extends DefaultHttpDataSource, and log speed of read . In my app , read length is small , only 200 to 300 . In other app , read length will be 1000 to 20000 .

↓this is log of other app 微信截图_20240801190153

↓this is log of my app 微信截图_20240801190552

And my app often stops reading data even though video is not prepared.

What can I do to improve this situation?

leo9082 avatar Aug 01 '24 11:08 leo9082

If I'm understanding your test/comparison set-up correctly:

  • You have two apps, "yours" and "other"
  • Both are using ExoPlayer with DefaultHttpDataSource
  • You added logging via subclassing DefaultHttpDataSource in both apps
    • It's unclear from your comment exactly what values you are logging.
  • You saw different values logged from each app as shown in your screenshots.

Since you have access to the source code of both apps, you are best placed to determine what the differences between the way they configure ExoPlayer and DefaultHttpDataSource are. It's somewhat difficult for us to offer any commentary on this experiment with the level of detail provided.

icbaker avatar Aug 07 '24 15:08 icbaker

Closing due to inactivity.

icbaker avatar Sep 02 '24 16:09 icbaker