ijkplayer 解决rtmp 延迟长的问题,达到秒开的结果

最近采用ijkplayer做视频直播推流,发现总是延迟,主要是视频缓冲区的问题


以下是解决方案

ijkMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "start-on-prepared", 0);  
  
ijkMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "http-detect-range-support", 0);  
  
ijkMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_CODEC, "skip_loop_filter", 48);  
ijkMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_CODEC, "skip_loop_filter", 8);  
 
ijkMediaPlayer.setOption(1, "analyzemaxduration", 100L);  
ijkMediaPlayer.setOption(1, "probesize", 10240L);  
ijkMediaPlayer.setOption(1, "flush_packets", 1L);  
ijkMediaPlayer.setOption(4, "packet-buffering", 0L);  
ijkMediaPlayer.setOption(4, "framedrop", 1L);


你可能感兴趣的:(安卓晋级Senior,Android,安卓开发进阶)