befovy / fijkplayer

ijkplayer for flutter. ijkplayer 的 flutter 封装。 Flutter video/audio player. Flutter media player plugin for android/iOS based on ijkplayer. fijkplayer 是基于 ijkplayer 封装的 flutter 媒体播放器,开箱即用,无需编译 ijkplayer
https://fijkplayer.befovy.com
MIT License
1.65k stars 354 forks source link

打开rtmp串流 延迟太大 #464

Open source-build opened 3 years ago

source-build commented 3 years ago

Describe the bug A clear and concise description of what the bug is. 清晰描述你遇到了什么问题。

What attempts have you made to resolve this error ? 为了解决这个问题你有什么尝试? 有问题请自己先努力尝试解决。 尤其是一些已经在错误输出中给出了可能的解决办法的问题

To Reproduce 问题的复现步骤 Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen. 描述清楚你希望的运行结果是什么

Screenshots If applicable, add screenshots to help explain your problem. 如果截图有助于对此问题的理解,一定要附上截图

fijkplayer version Which version you used. 用了什么版本的 fijkplayer

Smartphone (please complete the following information): 什么手机设备和系统版本?

Additional context Add any other context about the problem here. 其他有关此问题的内容

wangyuuuu commented 2 years ago

player.setOption(FijkOption.formatCategory, "rtsp_transport", 'tcp'); player.setOption(FijkOption.playerCategory, "fast", 1); player.setOption(FijkOption.formatCategory, "analyzeduration", 1); player.setOption(FijkOption.formatCategory, "analyzemaxduration", 100); player.setOption(FijkOption.formatCategory, "probesize", 100); player.setOption(FijkOption.formatCategory, "max-buffer-size", 0); player.setOption(FijkOption.formatCategory, "flush_packets", 0); player.setOption(FijkOption.playerCategory, "framedrop", 1); player.setOption(FijkOption.playerCategory, "packet-buffering", 0); player.setOption(FijkOption.playerCategory, "start-on-prepared", 1); player.setOption(FijkOption.playerCategory, "fflags", 'nobuffer'); player.setOption(FijkOption.playerCategory, "reconnect", 5); player.setOption(FijkOption.playerCategory, "framedrop", 5);

试试加上这些参数,祝你好运。。。