思科的
安装NASM
Android Builds
install android sdk and ndk.
export PATH=**ANDROID_SDK**/tools:$PATH
make OS=android NDKROOT=**ANDROID_NDK** TARGET=**ANDROID_TARGET**
Valid **ANDROID_TARGET** can be found in **ANDROID_SDK**/platforms, such as android-12.
You can also set ARCH, NDKLEVELaccording to your device and NDK version. 
ARC:arm, arm64, x86 and x86_64
NDKLEVEL specifies android api level, the default is 12.Available possibilities can be found in **ANDROID_NDK**/platforms,
By default these commands build for the armeabi-v7a
  • codec - encoder, decoder, console (test app), build (makefile, vcproj)
  • build - scripts for Makefile build system
  • test - GTest unittest files
  • testbin - autobuild scripts, test app config files
  • res - yuv and bitstream test files
# armeabi-v7a
make OS=android NDKROOT=$NDK_ROOT TARGET=android-21 ARCH=arm NDKLEVEL=21 clean
make OS=android NDKROOT=$NDK_ROOT TARGET=android-17 ARCH=arm NDKLEVEL=17
NDK 从 level21 开始支持 64位架构,因此 TARGET 低于 android-21 的将无法编译 arm64、x86_64、mips64 库
 mips、mips64 两种架构未做优化处理
生成的文件位于 ~/openh264 目录下,共计5个静态库,1个动态库
libcommon.a
libdecoder.a
libencoder.a
libopenh264.a
libprocessing.a
libopenh264.so
Invalid or unsupported command "update project -t android-17 -p ."
看makefile
"cd ./test/build/android && $(NDKROOT)/ndk-build -B APP_ABI=$(APP_ABI) && android update project -t $(TARGET) -p . && ant debug"
this error caused by using a higher SDK tool to build encoder & decoder demo program. The "android" tool does not support "update project" in the higher SDK version. Actually, the openh264 libraries have been built successfully.
实际已经编译成功了
ffmpeg
./configure --list-decoders和./configure --list-encoders都有
libopenh264
--enable-libopenh264
ffmpeg中
#include <wels/codec_api.h>
#include <wels/codec_ver.h>
vim meson.build
foreach t : ['', '-static']
pkgconf = configuration_data()
pkgconf.set('prefix', join_paths(get_option('prefix')))
pkgconf.set('VERSION', meson.project_version())
if t == '-static'
do_install = false
pkgconf.set('LIBS', '-lstdc++ -lpthread -lm')
pkgconf.set('LIBS_PRIVATE', '')
else
do_install = true
pkgconf.set('LIBS', '')
pkgconf.set('LIBS_PRIVATE', '-lstdc++ -lpthread -lm')
endif
undefined reference to '__dso_handle'
make install PREFIX=/some/path
make install-static PREFIX=/root/starRTC_ffmpeg/ffmpeg_compile/build_result/armeabi-v7a-neon
undefined reference to XXX_neonerrors at the stage of FFmpeg configuring.
In the end, I set USE_ASM to no and everything was okay.
Makefile
ifeq ($(BUILDTYPE), Release)
CFLAGS += $(CFLAGS_OPT)
USE_ASM = No
else
CFLAGS += $(CFLAGS_DEBUG)
USE_ASM = No
endif
arm-linux-androideabi/bin/ld: error: cannot find -lpthread
改为 -pthread
因为android的ndk虽然有pthread.h,但是没有libpthread.a,集成到libc.a里了-lc

OpenH264编译ffmpeg android的更多相关文章

  1. [原]如何用Android NDK编译FFmpeg

    我们知道在Ubuntu下直接编译FFmpeg是很简单的,主要是先执行./configure,接着执行make命令来编译,完了紧接着执行make install执行安装.那么如何使用Android的ND ...

  2. Android 环境下编译FFmpeg

    Android 环境下编译FFmpeg 开发环境:Ubuntu 12.04.2 LTS , android-sdk-linux, android-ndk-r8e 一 .X264 编译 1.    X2 ...

  3. Android NDK 编译FFmpeg(不需要复杂的环境变量设置)

    环境: CentOS6.2——64位 借鉴:https://vec.io/posts/how-to-build-ffmpeg-with-android-ndk 在根目录下创建work文件夹:cd  / ...

  4. Android开发学习之路--Android Studio cmake编译ffmpeg

      最新的android studio2.2引入了cmake可以很好地实现ndk的编写.这里使用最新的方式,对于以前的android下的ndk编译什么的可以参考之前的文章:Android开发学习之路– ...

  5. 手把手图文并茂教你用Android Studio编译FFmpeg库并移植

    转载请把头部出处链接和尾部二维码一起转载,本文出自逆流的鱼yuiop:http://blog.csdn.net/hejjunlin/article/details/52661331 之前曾写过一篇&l ...

  6. 用Android NDK编译FFmpeg

    附(2018-01-06):     有一个将x264及lame等库集成进去了且基于android的ffmpeg的编译方法,地址参见:       https://github.com/writing ...

  7. [笔记] Ubuntu下编译ffmpeg+openh264+x264

    [下载代码]   - ffmpeg: git clone git://source.ffmpeg.org/ffmpeg.git - openh264: git clone https://github ...

  8. Android中集成ffmpeg(一):编译ffmpeg

    方案选择 Android中集成ffmpeg的codec功能无非两种方式: JNI直接调用,主要用于App开发(无权限修改系统底层),如EXOPlayer,JPlayer等. 集成ffmpeg到OMX, ...

  9. android编译ffmpeg+x264

    下载最新版的x264ftp://ftp.videolan.org/pub/videolan/x264/snapshots/1.解压到指定的目录2.切换当前目录为该目录3.创建一个shell脚本buil ...

随机推荐

  1. DBUtils查找最大的ID总是返回0

    1.实体: public class Order { private int id; private Date orderDate; public int getId() { return id; } ...

  2. mybatis 对象关系映射例子

    入门 http://legend2011.blog.51cto.com/3018495/908956 增删改 http://legend2011.blog.51cto.com/3018495/9130 ...

  3. [svc]ansible自动化模块

    ansible命令执行模块 - command模块 [执行远程命令] $ ansible n1 -m command -a 'uname -n' - raw模块 [类似于command模块.支持管道传 ...

  4. 台式机vim配置

    set autoread syntax on "set number " filetype ident on "set autoindent "set expa ...

  5. Ctex中WinEdt经常弹出注册小窗口 解决办法

    使用WinEdt 7避免跳出“注册对话框” 在options菜单下点options…,在advanced configuration  =>  Event Handlers  下点Exit, 在 ...

  6. 百度地图API-搜索地址、定位、点击获取经纬度并标注

    百度地图api:http://developer.baidu.com/map/jsdemo.htm api申请ak:http://lbsyun.baidu.com/ 一.搜索地址.定位.点击获取经纬度 ...

  7. RIFF格式简介

    Resource Interchange File Format(简称RIFF),资源交换文件格式,是一种按照标记区块存储数据(tagged chunks)的通用文件存储格式,多用于存储音频.视频等多 ...

  8. idea 项目添加web支持

    选中项目添加 add - web

  9. 基于jQuery果冻式按钮焦点图切换代码

    基于jQuery果冻式按钮焦点图切换代码.这是一款基于jQuery+CSS3实现的图片切换代码.效果图如下: 在线预览   源码下载 实现的代码. html代码: <div class=&quo ...

  10. error "OPatch cannot find a valid oraInst.loc file to locate Central Inventory

    Error tersebut terjadi ketika akan menjalankan command opatch lsinventory untuk mengetahui patch yan ...