赞
踩
开源播放器内核比较:ijkPlayer、VLC、ExoPlayer、MediaPlayer、SmartPlayer
ijkplayer(c语言):https://github.com/Bilibili/ijkplayer
Exoplayer:https://github.com/google/ (google开源)
GSYVideoPlayer:https://github.com/CarGuo/GSYVideoPlayer
Jiaozi(饺子、节操):https://github.com/lipangit/JiaoZiVideoPlayer (坑多)
Vitamio(强大):https://www.vitamio.org/
awesomeplayer:https://github.com/filipebezerra/AwesomePlayer (5.1已经弃用)
nuplayer:https://github.com/timsheu/NuPlayer-Android (没有star)
mpv(c语言):https://github.com/mpv-player/mpv (基于MPlayer/mplayer2)
VideoPlayerManager:https://github.com/danylovolokh/VideoPlayerManager
PLDroidPlayer(七牛):https://github.com/pili-engineering/PLDroidPlayer
SmarterStreaming(大牛):https://github.com/daniulive/SmarterStreaming (付费)
jjdxm_ijkplayer:https://github.com/jjdxmashl/jjdxm_ijkplayer
NiceVieoPlayer:https://github.com/xiaoyanger0825/NiceVieoPlayer
开源控件总结
ijkplayer只是一个播放器内核,并没有封装好控制界面。
GSYVideoPlayer 翻改至 JiaoZiVideoPlayer ,二者都是基于 ijkplayer 的二次开发。
https://github.com/danikula/AndroidVideoCache
https://github.com/Zhaoss/WeiXinRecordedDemo
https://github.com/pili-engineering/PLDroidShortVideo
https://github.com/LanSoSdk/LanSoEditor_common
https://github.com/aiyaapp/AiyaEffectsAndroid
https://github.com/yangjie10930/EpMedia
https://github.com/rdsdk/rdVideoEditSDK-for-Android
v2.6.4及以前(VideoPlayActivity.java)
JieCao 是作者最开始开发的,后面更新为Jiaozi 视频。
https://github.com/lipangit/JieCaoVideoPlayer
implementation('fm.jiecao:jiecaovideoplayer:5.5.4')
<fm.jiecao.jcvideoplayer_lib.JCVideoPlayerStandard
android:id="@+id/jc_video"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
https://github.com/lipangit/JiaoZiVideoPlayer
compile 'cn.jzvd:jiaozivideoplayer:6.2.7'
<cn.jzvd.JZVideoPlayerStandard
android:id="@+id/videoplayer"
android:layout_width="match_parent"
android:layout_height="200dp"/>
https://github.com/Jzvd/JZVideo
注意:
一般不需要新开activity来播放视频。
activity关闭时注意回收播放器。
@Override
protected void onPause() {
super.onPause();
JZVideoPlayer.releaseAllVideos();
}
@Override
public void onBackPressed() {
if (JZVideoPlayer.backPress()) {
return;
}
super.onBackPressed();
}
activity的配置问题(竖向、转动)-
https://segmentfault.com/a/1190000011959615
https://blog.csdn.net/zhjin8510/article/details/95460829
该播放器的核心实现类为以上几个。
JZ提供两种播放引擎
补充说明:JZMediaIjkplayer集成了ijkplayer(tv.danmaku.ijk.media.player.IMediaPlayer).
https://github.com/CarGuo/GSYVideoPlayer
视频播放器(IJKplayer、ExoPlayer、MediaPlayer),HTTPS,支持弹幕,外挂字幕,支持滤镜、水印、gif截图,片头广告、中间广告,多个同时播放,支持基本的拖动,声音、亮度调节,支持边播边缓存,支持视频自带rotation的旋转(90,270之类),重力旋转与手动旋转的同步支持,支持列表播放 ,列表全屏动画,视频加载速度,列表小窗口支持拖动,动画效果,调整比例,多分辨率切换,支持切换播放器,进度条小窗口预览,列表切换详情页面无缝播放,rtsp、concat、mpeg。
https://github.com/xiaoyanger0825/NiceVieoPlayer 未维护
整个功能有参考节操播放器,但是自己这样封装和节操播放器还是有很大差异:
常用类:IMediaPlayer,IjkMediaPlayer,IjkTimedText
库名 | 支持support的版本 | 支持AndroidX的版本 | Start数 |
---|---|---|---|
ExoPlayer | v2.9.6 | v2.10.0 + | 18.1K |
GSYVideoPlayer | v6.0.3 | v7.0.0 + | 16.6K |
JzVideo | v7.2.0 | v7.2.1 + | 10.4k =>1.8K |
DKVideoPlayer | v3.0.3 | v3.0.4+ | 3.6K |
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。