资源简介
因为Android ijkplayer播放rtsp直播流在加载时延迟在5-10秒实在难以接受,再修改后解决了延迟问题,目前已达到2秒甚至秒开的效果
添加的方法:VideoOptionModel videoOptionMode0l = new VideoOptionModel(1, "analyzemaxduration", 100);
VideoOptionModel videoOptionMode02 = new VideoOptionModel(1, "probesize", 10240);
VideoOptionModel videoOptionMode03 = new VideoOptionModel(1, "flush_packets", 1);
VideoOptionModel videoOptionMode04 = new VideoOptionModel(4, "packet-buffering", 0);
VideoOptionModel videoOptionMode05 = new VideoOptionModel(4, "framedrop", 1);
VideoOptionModel videoOptionMode06 = new VideoOptionModel(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "framedrop", 1);
VideoOptionModel videoOptionMode07 = new VideoOptionModel(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "rtsp_transport", "tcp");
List list1 = new ArrayList();
list1.add(videoOptionMode0l);
list1.add(videoOptionMode02);
list1.add(videoOptionMode03);
list1.add(videoOptionMode04);
list1.add(videoOptionMode05);
list1.add(videoOptionMode06);
list1.add(videoOptionMode07);
GSYVideoManager.instance().setOptionModelList(list1);
评论
共有 条评论