GithubHelp home page GithubHelp logo

Comments (8)

CarGuo avatar CarGuo commented on August 26, 2024

引文关键帧,2s视频,出了网络 cdn 影响因素,更多是视频是因为解码需要的 GOP 有问题导致,建议你可以看下: https://juejin.cn/post/7057132141875822622

from gsyvideoplayer.

darrenfantasy avatar darrenfantasy commented on August 26, 2024

有几点疑问:
使用Exo2PlayerManager,不使用isLooping属性,差不多3s能加载出来,使用isLooping需要11s差不多。
使用SystemPlayerManager,不管是否使用isLooping属性,差不多2s能加载出来。
因为我这个是在启动app的时候就启动,是否有可能受到其他资源占用影响。
我们可以在子线程去做setPlayManager,setUp和startPlayLogic处理吗?

from gsyvideoplayer.

darrenfantasy avatar darrenfantasy commented on August 26, 2024

网上有看到:设置最大缓冲时长,exoplayer默认好像60s;如果设置了循环播放,即使视频数据只有15s, 内存中也是加载60s数据的。(解决: MediaPeriodQueue#MAXIMUM_BUFFER_AHEAD_PERIODS 修改为2,最多只填充2个视频数据)
但我看代码,我们好像没办法改变 MediaPeriodQueue#MAXIMUM_BUFFER_AHEAD_PERIODS 的值

from gsyvideoplayer.

CarGuo avatar CarGuo commented on August 26, 2024

有几点疑问:
使用Exo2PlayerManager,不使用isLooping属性,差不多3s能加载出来,使用isLooping需要11s差不多。
使用SystemPlayerManager,不管是否使用isLooping属性,差不多2s能加载出来。
因为我这个是在启动app的时候就启动,是否有可能受到其他资源占用影响。
我们可以在子线程去做setPlayManager,setUp和startPlayLogic处理吗?

用 isLooping 和不用 isLooping,区别在于 exo 都设置了一个 setRepeatMode 选项,system 和 exo 核心都是 mediacodec 所以在加载行为会是一样的,区别在于 system 的 mediaplayer 是直接设置的 loop (native call) ,但是 exo 的 setRepeatMode 是通过一个内部 handler queue 去实现

from gsyvideoplayer.

CarGuo avatar CarGuo commented on August 26, 2024

MAXIMUM_BUFFER_AHEAD_PERIODS

MAXIMUM_BUFFER_AHEAD_PERIODS 默认是 100 ,并且是他是 final ,不可以修改的

image

image

from gsyvideoplayer.

darrenfantasy avatar darrenfantasy commented on August 26, 2024

嗯,现在遇到就是设置了isLooping后变慢了,不知道有什么解决方案。
exo通过内部handler实现,是不是会受到主线程其他消息的影响导致变慢呢?

from gsyvideoplayer.

CarGuo avatar CarGuo commented on August 26, 2024

具体为什么慢我也盲猜不出来,2s 的视频或者你还是用 system 模式吧

from gsyvideoplayer.

darrenfantasy avatar darrenfantasy commented on August 26, 2024

具体为什么慢我也盲猜不出来,2s 的视频或者你还是用 system 模式吧

System的加载快,但是真实播放起来效果还是exo的好,system播起来看着没有exo流畅🤣

from gsyvideoplayer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.