https://github.com/appunite/AndroidFFmpeg.git

本地路径:这个比较全,四种播放方式都有,问题流媒体播放无控制,太快太慢都报错。

/lbg/android/ffmpeg/AndroidFFmpeg

https://github.com/appunite/AndroidFFmpeg

在jni目录下面有子模块:

sudo apt-get install autoconf libtool make autoconf-archive automake pkg-config
git submodule init
git submodule update

问题:子模块太多,下载不完
git clone https://github.com/appunite/AndroidFFmpeg.git AndroidFFmpeg
cd AndroidFFmpeg
git submodule init
git submodule sync #if you are updating source code
git submodule update
cd library-jni
cd jni
download libyuv and configure libs

./fetch.sh
build external libraries Download r8e ndk: https://dl.google.com/android/ndk/android-ndk-r8e-darwin-x86_64.tar.bz2 or https://dl.google.com/android/ndk/android-ndk-r8e-linux-x86_64.tar.bz2

Now it should also support r10e

export ANDROID_NDK_HOME=/your/path/to/android-ndk
build ffmpeg库: /lbg/android/ffmpeg/AndroidFFmpeg/library-jni/jni
build_android.sh中直接增加也可以:
set -x
export ANDROID_NDK_HOME=/lbg/android/android-ndk-r8e
sudo ./build_android.sh
make sure that files library-jni/jni/ffmpeg-build/{armeabi,armeabi-v7a,x86}/libffmpeg.so was created, otherwise you are in truble

build ndk jni library (in library-jni directory)

export PATH="${PATH}:${ANDROID_NDK_HOME}"
source /etc/profile
ndk-build          #只能用r8版本,12版本报错。
 异常:
 Cannot find module with tag 'cpufeatures' in import path

make sure that files library-jni/libs/{armeabi,armeabi-v7a,x86}/libffmpeg.so was created, otherwise you are in truble

build your project

./gradlew build
More codecs

If you need more codecs:

edit build_android.sh
add more codecs in ffmpeg configuration section
remove old ffmpeg-build directory by

rm -r ffmpeg-build
build ffmpeg end supporting libraries

./build_android.sh
During this process make sure that ffmpeg configuration goes without error.

After build make sure that files FFmpegLibrary/jni/ffmpeg-build/{armeabi,armeabi-v7a,x86}/libffmpeg.so was created, otherwise you are in truble

build your ndk library

ndk-build
另一种编译方法:
http://blog.csdn.net/huangqbio2/article/details/24413629

git clone https://review.appunite.com/androidffmpeg AndroidFFmpeg
cd AndroidFFmpeg

git submodule init
git submodule sync #if you are updating source code
git submodule update
cd FFmpegLibrary
cd jni
download libyuv

# I hate svn too :)

svn checkout http://libyuv.googlecode.com/svn/trunk/libyuv

setup freetype environemtn
cd freetype
./autogen.sh
cd ..

setup fribidi environemtn
cd fribidi
autoreconf -ivf
cd ..

setup libogg environemtn——我自己走的
cd libogg
autoreconf -ivf
cd ..

setup libass environemtn
cd libass
autoreconf -ivf
cd ..
setup vo-aacenc environment
cd vo-aacenc
autoreconf
cd ..

setup vo-amrwbenc environment
cd vo-amrwbenc
autoreconf
cd ..

build external libraries
export NDK=/your/path/to/android-ndk
./build_android.sh

make sure that files
FFmpegLibrary/jni/ffmpeg-build/{armeabi,armeabi-v7a,x86}/libffmpeg.so
was created, otherwise you are in truble
build ndk jni library
ndk-build

make sure that files FFmpegLibrary/libs/{armeabi,armeabi-v7a,x86}/libffmpeg.so was created, otherwise you are in truble

build your project

android update lib-project -p FFmpegLibrary

android update project -p FFmpegExample

cd FFmpegExample

ant debug

ant installd

or create new projects from FFmpegLibrary and FFmpegExample source directories in your eclipse.

Run FFmpegExample as your android project.

If you have adt >= 20.0 you can click right mouse button on project
and FFmpegLibrary project and "Android->Add native support".

## More codecs

If you need more codecs:

- edit build_android.sh

- add more codecs in ffmpeg configuration section

- remove old ffmpeg-build directory by

rm -r ffmpeg-build

- build ffmpeg end supporting libraries
./build_android.sh

During this process make sure that ffmpeg configuration goes without error.

After build make sure that files
FFmpegLibrary/jni/ffmpeg-build/{armeabi,armeabi-v7a,x86}/libffmpeg.so
was created, otherwise you are in truble

- build your ndk library

ndk-build

- refresh your FFmpegLibrary project in eclipse!!!!

- build your FFmpegExample project

## Credits

Library made by Jacek Marchwicki from Appunite.com

- Thanks to Martin Böhme for writing tutorial: http://www.inb.uni-luebeck.de/~boehme/libavcodec_update.html

- Thanks to Stephen Dranger for writing tutorial: http://dranger.com/ffmpeg/

- Thanks to Liu Feipeng for writing blog: http://www.roman10.net/how-to-port-ffmpeg-the-program-to-androidideas-and-thoughts/

- Thanks to ffmpeg team for writing cool stuff http://ffmpeg.org

- Thanks to Alvaro for writing blog: http://odroid.foros-phpbb.com/t338-ffmpeg-compiled-with-android-ndk

- Thanks to android-fplayer for sample code: http://code.google.com/p/android-fplayer/

- Thanks to best-video-player for sample code: http://code.google.com/p/best-video-player/

- Thanks to Robin Watts for his work in yuv2rgb converter http://wss.co.uk/pinknoise/yuv2rgb/

- Thanks to Mohamed Naufal (https://github.com/hexene) and Martin
Storsjö (https://github.com/mstorsjo) for theirs work on sample code for
 stagefright/openmax integration layer.

- Thanks www.fourcc.org for theirs http://www.fourcc.org/yuv.php page

- Thanks to Cedric Fungfor his blog bost: http://vec.io/posts/use-android-hardware-decoder-with-omxcodec-in-ndk

- Thanks Google/Google chrome/Chromium teams for libyuv library https://code.google.com/p/libyuv/

- Thanks to Picker Wengs for this slides about android multimedia stack
http://www.slideshare.net/pickerweng/android-multimedia-framework

AndroidFFmpeg相关推荐

  1. Android-ffmpeg编译so文件

    Android中如果需要用到ffmpeg做视频处理,那么最好的方法就是从头到尾亲自从编译到集成.踏入ffmpeg的第一步自然就是通过编译得到Android中可以用的so文件 环境准备 centerOS ...

  2. android mp4流格式,将RTSP流保存到android中的mp4文件

    使用ffmpeg. >添加ffmpeg依赖项. compile 'nl.bravobit:android-ffmpeg:1.1.5' >记录流. String RTSP_URL = &qu ...

  3. 直接拿来用!最火的Android开源项目(完结篇)

    http://www.oschina.net/project/tag/342/android-ui?lang=0&os=0&sort=view&p=5 此前,CSDN移动频道推 ...

  4. 直接拿来用!最火的Android开源项目(完结篇)(转)

    摘要:截至目前,在GitHub"最受欢迎的开源项目"系列文章中我们已介绍了40个Android开源项目,对于如此众多的项目,你是Mark.和码友分享经验还是慨叹"活到老要 ...

  5. ffmpeg 怎么用

    一开始了, 项目里面需要ffmpeg 来转码, 但是不会ffmpeg, 怎么办了. android底层是linux内核,所以linux下的一些程序还是可以跑起来的,只不过android用的linux内 ...

  6. 基于 FFmpeg 的播放器 demo

    这里的播放器演示程序用于播放一个本地文件,因而不需要关心播放网络上的媒体数据时的网络传输问题. 对于播放本地媒体文件的播放器来说,所要完成的工作主要包括:解封装 -> 音频解码/视频解码 -&g ...

  7. 有用的网址集合, IT杂谈

    http://antkillerfarm.github.io/ 有用的网址集合 教程类 http://packages.ubuntu.com/ 使用apt-get获取软件虽然方便,但是从ubuntu的 ...

  8. github开源库(三)

    41.android-swipelistview SwipeListView是一个Android List View实现,实现了自定义ListView单元格,可通过滑动来显示扩展面板.开发者可直接登陆 ...

  9. GitHub上最火的74个Android开源项目(三)

    http://www.open-open.com/lib/view/open1388317075000.html GitHub上最火的40个Android开源项目(一) GitHub上最火的40个An ...

最新文章

  1. .NET Core微服务之基于Consul实现服务治理(续)
  2. JZOJ 100046. 【NOIP2017提高A组模拟7.14】收集卡片
  3. PHP限制提交文章条数,限制WordPress文章页面修订版本(revision)数量
  4. Kettle7 java 远程执行Trans/Job
  5. java对象如何保存日期_如何在Java中的日期对象中存储和检索毫秒?
  6. HDU1283 最简单的计算机【模拟】
  7. Sublime text使用快捷键
  8. SpringMVC架构
  9. 一步步构建大型网站架构(转载)
  10. 看见几篇文章,收藏一下。
  11. AUTO CAD快捷键常见命令
  12. Google Chrome for mac(谷歌浏览器)
  13. 【iOS开发】从小白到低水平开发者进厂实习自救指南
  14. 自己动手用Android和Xposed编写一个微信聊天机器人——《微信聊天精灵》实现关键词自动回复。
  15. iOS 字体转换
  16. openwrt路由器接华为E3372(E8372)网卡实现4G转有线和WIFI
  17. 万台服务器一人挑的奥秘
  18. 如何检验数据样本的正态性?
  19. DATAGUARD原理
  20. onenet云平台使用_使用平台

热门文章

  1. 利用单调栈判断二叉搜索树的后序遍历序列
  2. pytorch 指定卡1_[原创][深度][PyTorch] DDP系列第一篇:入门教程
  3. 网站服务器怎么组件,网站服务器搭建与配置详解!
  4. 去除0值和nan_Pandas 1.0的新功能
  5. word文档无法连接服务器,sql数据库无法连接服务器解决办法绝对有效
  6. 皮一皮:到底谁才是渣王...
  7. GitHub率先消灭了cookies:与烦人的用户条款说再见
  8. linux下装windows驱动,linux下安装windows xp无线网卡驱动
  9. php汽车找车位,车停在哪最省心?小编奉上找车位小指南
  10. android viewgroup 事件,android中viewgroup的事件传递分析