All Projects → jdpxiaoming → PPlayer

jdpxiaoming / PPlayer

Licence: other
ffmpeg 4.0.2静态库从0开始一个播放器的搭建,支持rtmp、rtsp、hls、本地MP4文件播放,音视频同步,直播推流

Programming Languages

c
50402 projects - #5 most used programming language
C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to PPlayer

RtmpPublishKit
rtmp publish kit for android , encode with mediacodec
Stars: ✭ 106 (+30.86%)
Mutual labels:  h264, rtmp, mediacodec
smart rtmpd
RTMP server, smart, compact, high performance(c, c++), high concurrency, easy to maintain, easy to deploy, (supports multiple operating systems Windows and Linux, ARM, FreeBSD)
Stars: ✭ 159 (+96.3%)
Mutual labels:  h264, rtsp, rtmp
Rtsp Simple Server
ready-to-use RTSP / RTMP server and proxy that allows to read, publish and proxy video and audio streams
Stars: ✭ 882 (+988.89%)
Mutual labels:  h264, rtsp, rtmp
wsa
WSA(Websocket Streaming Agent) is a stream server target for mp4/h264 streaming over websocket
Stars: ✭ 35 (-56.79%)
Mutual labels:  h264, rtsp, rtmp
Nginx Http Flv Module
Media streaming server based on nginx-rtmp-module. In addtion to the features nginx-rtmp-module provides, HTTP-FLV, GOP cache and VHOST (one IP for multi domain names) are supported now.
Stars: ✭ 2,063 (+2446.91%)
Mutual labels:  h264, rtmp
Rtmp
RTMP Server , RTMP Pusher , RTMP Client
Stars: ✭ 119 (+46.91%)
Mutual labels:  h264, rtmp
Haishinkit.swift
Camera and Microphone streaming library via RTMP, HLS for iOS, macOS, tvOS.
Stars: ✭ 2,237 (+2661.73%)
Mutual labels:  h264, rtmp
rrtsp client
Rust high level RTSP client
Stars: ✭ 12 (-85.19%)
Mutual labels:  h264, rtsp
Livego
live video streaming server in golang
Stars: ✭ 7,312 (+8927.16%)
Mutual labels:  h264, rtmp
Media Stream Library Js
JavaScript library to handle media streams on the command line (Node.js) and in the browser.
Stars: ✭ 192 (+137.04%)
Mutual labels:  h264, rtsp
mini
OpenSource Mini IP camera streamer
Stars: ✭ 64 (-20.99%)
Mutual labels:  h264, rtsp
Analysisavp
音视频学习,相关文件格式/协议分析。h264 nalu aac adts flv
Stars: ✭ 38 (-53.09%)
Mutual labels:  h264, rtmp
Ksylive ios
金山云直播SDK [ iOS推流+播放 ]融合版 支持美颜滤镜(Beauty Filter)、美声(Beauty Voice)、软硬编(Software/Hardware Encoder) 、网络自适应(Network Auto Adapt)、混音(Audio Mixer)、混响(Reverb)、画中画(PIP)
Stars: ✭ 861 (+962.96%)
Mutual labels:  h264, rtmp
react-native-vlc-media-player
React native media player for video streaming and playing. Supports RTSP, RTMP and other protocols supported by VLC player
Stars: ✭ 221 (+172.84%)
Mutual labels:  rtsp, rtmp
ZLMediaKit
WebRTC/RTSP/RTMP/HTTP/HLS/HTTP-FLV/WebSocket-FLV/HTTP-TS/HTTP-fMP4/WebSocket-TS/WebSocket-fMP4/GB28181/SRT server and client framework based on C++11
Stars: ✭ 7,790 (+9517.28%)
Mutual labels:  rtsp, rtmp
Jmuxer
jMuxer - a simple javascript mp4 muxer that works in both browser and node environment.
Stars: ✭ 222 (+174.07%)
Mutual labels:  h264, rtsp
gstreamer-rtc-streamer
webrtc streamer based on gstreamer
Stars: ✭ 65 (-19.75%)
Mutual labels:  rtsp, rtmp
EasyRTMP RTSP
基于Android手机、设备拉取远程RTSP流到本地,再转成RTMP,推送到RTMP服务器。。此Demo涉及到需要商业授权SDK。
Stars: ✭ 32 (-60.49%)
Mutual labels:  rtsp, rtmp
Libstreaming
A solution for streaming H.264, H.263, AMR, AAC using RTP on Android
Stars: ✭ 3,167 (+3809.88%)
Mutual labels:  h264, mediacodec
Androidffmpeg
android 读取摄像头和麦克风,使用rtmp推流
Stars: ✭ 298 (+267.9%)
Mutual labels:  h264, rtmp

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

为什么选用静态库

静态库是源代码的静态备份,jni编译时候会选择有用的头文件加载对应的源文件打包成so库,方便开发者写native层代码,用多少取多少(so体积不会固定死)是它的优势,

目前开源项目采用静态库的不是很多,极不方便新手入门jni和音视频开发,我就是要让你能够像写hello-world一样开始音视频的开发,that's all!

pic

欢迎给我提issue,有想法也可以提.

ToDoList

  • 视频解码
  • 音频解码
  • 音视频同步
  • 播放在线流媒体RTMP、RTSP、HLS
  • 线程释放
  • seek进度条拖动(av_seek_frame)
  • 视频格式转码ex:flv->mp4. see FFmpegTools
  • x264推流H264 see PPush
  • faac推流AAC see 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百度网盘 提取码:veyq
  2. nginx+lib-rtmp服务器搭配FFmpeg或者Obs推流 pic

静态库由于体积太大,我放到了百度网盘,

FFmpeg4.0.2静态库(32/64bit) 提取码: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.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].