PPlayer Base on FFmpeg ,support RTMP/RTSP/HLS/H265
===
###### 基于Ffmpeg4.0.2(arm64-v8a)静态库搭建一套高可用的播放器
>FFmpeg 4.0.2静态库从0开始一个播放器的搭建,支持rtmp、rtsp、hls、本地MP4文件播放,视频解码+音频解码+音视频同步
>在这里你可以看到全部的jni部分代码,不隐藏实现的c++代码,java调用c,然后c中回调java方法,在native层开启线程,同步锁pthred_mutex,pthread等等的使用。
>你只需要有一点c的基础就可以动手开始改造本项目,查看本项目的每一次日志提交,清晰的脉络知识结构认知尽览无余。
### FFmpeg4.0.2编译脚本及更多介绍参考[PPlayer-Wiki](https://github.com/jdpxiaoming/PPlayer/wiki/ffmpeg4.0.2%E7%BC%96%E8%AF%91)<!-- @IGNORE PREVIOUS: link -->
# 为什么选用静态库
> 静态库是源代码的静态备份,jni编译时候会选择有用的头文件加载对应的源文件打包成so库,方便开发者写native层代码,用多少取多少(so体积不会固定死)是它的优势,
> 目前开源项目采用静态库的不是很多,极不方便新手入门jni和音视频开发,我就是要让你能够像写`hello-world`一样开始音视频的开发,that's all!
![pic](https://github.com/jdpxiaoming/PPlayer/blob/master/capture/output2.gif)
# 欢迎给我提`issue`,有想法也可以提.
# ToDoList
- [x] 视频解码
- [x] 音频解码
- [x] 音视频同步
- [x] 播放在线流媒体RTMP、RTSP、HLS
- [x] 线程释放
- [ ] `seek`进度条拖动(av_seek_frame)
- [x] 视频格式转码ex:flv->mp4. see [FFmpegTools](https://github.com/jdpxiaoming/FFmpegTools)
- [x] `x264`推流`H264` see [PPush](https://github.com/jdpxiaoming/PPush)
- [x] `faac`推流`AAC` see [PPush](https://github.com/jdpxiaoming/PPush)
# 运行demo
1. 去release中下载源代码,
2. 然后看下面静态库地址可以考虑百度网盘放到`app/lib`下
3. 直接使用AndroidStudio导入本项目运行app
## 播放本地`MP4`
1. 拷贝`capture/input.mp4`到`/data/com.poe.pplayer/cache`
2. 点击"播放"
##
# 播放`RTMP`.
```
mPlayer.setDataSource("rtmp://xxxxxxx.com/abcd12343");
```
# 测试流地址
1. 推荐[red5百度网盘](https://pan.baidu.com/s/1IEbbWcg5633GkL0V5MTupw) 提取码:`veyq`
2. `nginx+lib-rtmp`服务器搭配`FFmpeg`或者`Obs`推流
![pic](https://github.com/jdpxiaoming/PPlayer/blob/master/capture/hometiny.png)
# 静态库由于体积太大,我放到了百度网盘,
[FFmpeg4.0.2静态库(32/64bit)](https://pan.baidu.com/s/1Jh6HpRssMZTz2OH8j1GrGg) 提取码:`2c16`
# License
Copyright 2020 Poe.Cai.
FFmpeg codebase is mainly LGPL-licensed with optional components licensed under GPL. Please refer to the LICENSE file for detailed information.
没有合适的资源?快使用搜索试试~ 我知道了~
C语言ffmpeg 4.0.2静态库从0开始一个播放器的搭建.zip
共174个文件
h:116个
a:12个
png:11个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 78 浏览量
2024-03-07
10:56:11
上传
评论
收藏 89.98MB ZIP 举报
温馨提示
C语言ffmpeg 4.0.2静态库从0开始一个播放器的搭建.zip
资源推荐
资源详情
资源评论
收起资源包目录
C语言ffmpeg 4.0.2静态库从0开始一个播放器的搭建.zip (174个子文件)
libavcodec.a 91.36MB
libavcodec.a 57.36MB
libavformat.a 36.05MB
libavformat.a 24.07MB
libswscale.a 5.1MB
libswscale.a 2.68MB
libavutil.a 2.27MB
libavutil.a 1.54MB
libavfilter.a 1.12MB
libavfilter.a 747KB
libswresample.a 574KB
libswresample.a 393KB
gradlew.bat 2KB
AudioChannel.cpp 11KB
PoeFFmpeg.cpp 8KB
VideoChannel.cpp 8KB
native-lib.cpp 4KB
JavaCallHelper.cpp 2KB
output1.gif 384KB
output2.gif 300KB
.gitignore 216B
.gitignore 7B
build.gradle 1KB
build.gradle 564B
settings.gradle 42B
gradlew 5KB
avcodec.h 207KB
avformat.h 115KB
avfilter.h 41KB
opt.h 35KB
pixfmt.h 32KB
avio.h 31KB
frame.h 28KB
mem.h 23KB
hwcontext.h 22KB
swresample.h 21KB
intreadwrite.h 18KB
common.h 16KB
pixdesc.h 15KB
avstring.h 14KB
swscale.h 12KB
imgutils.h 11KB
log.h 11KB
buffer.h 10KB
samplefmt.h 10KB
channel_layout.h 9KB
avutil.h 9KB
hash.h 8KB
dict.h 8KB
spherical.h 8KB
mathematics.h 8KB
bprint.h 8KB
parseutils.h 7KB
encryption_info.h 7KB
buffersrc.h 6KB
buffersink.h 6KB
hwcontext_d3d11va.h 6KB
xvmc.h 6KB
audio_fifo.h 6KB
fifo.h 6KB
rational.h 6KB
vdpau.h 6KB
cpu.h 6KB
error.h 5KB
tree.h 5KB
timecode.h 5KB
eval.h 5KB
stereo3d.h 5KB
version.h 5KB
attributes.h 5KB
hwcontext_drm.h 5KB
version.h 5KB
dirac.h 4KB
videotoolbox.h 4KB
mastering_display_metadata.h 4KB
hwcontext_vaapi.h 4KB
version.h 4KB
qsv.h 4KB
dv_profile.h 4KB
threadmessage.h 4KB
murmur3.h 4KB
display.h 3KB
safe_queue.h 3KB
downmix_info.h 3KB
crc.h 3KB
avfft.h 3KB
hmac.h 3KB
bswap.h 3KB
d3d11va.h 3KB
xtea.h 3KB
mediacodec.h 3KB
BaseChannel.h 3KB
timestamp.h 3KB
avdct.h 3KB
file.h 3KB
cast5.h 3KB
sha512.h 3KB
sha.h 2KB
hwcontext_dxva2.h 2KB
blowfish.h 2KB
共 174 条
- 1
- 2
资源评论
白如意i
- 粉丝: 6862
- 资源: 3230
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功