ffmpeg for android 独立ndk以及android项目下编译 --ubuntu

Android中集成FFmpeg及NDK基础知识 在日常App开发中,难免有些功能是需要借助NDK来完成的,比如现在常见的音视频处理等,今天就以ffmpeg入手,来学习下Android NDK开发的套路.总的来说使用CMake方式还是比较简单的,编写文件,在gradle中指定文件位置就好.重点在于相关库的交叉编译及编写调用相关api文件的C文件,这里就需要一些C的基础了.原文Android中集成FFmpeg及NDK基础知识 - 掘金。 阅读详情

ffmpegfor android 编解码部分编译,不包含ffplay部分;

如果有一定英语基础,一定要去官网下载,热心网友的各种版本大多不如官网的全面准确,以点盖面的学习,可能影响效率。

官网地址:http://ffmpeg.org/trac/ffmpeg/wiki/How%20to%20compile%20FFmpeg%20for%20Android  ,打开后如下图:

官网for android推荐了两个版本,一个是独立的项目,使用安装的ndk进行编译;另一个是在android项目下编译;

 

一.使用ndk工具直接编译的版本:Bambuser:http://bambuser.com/opensource
 
下载自己需要的版本;
     
我测试了最新的版本,可以使用;

   下载完成后,根据README文件,1. 设置NDK路径 2.运行./build.sh OK;默认编译armv7a和 armv7a-neon版本;

    我使用的源码及编译结果在这里可以下载: http://download.youkuaiyun.com/detail/changliangdoscript/5312320 


二. android项目下编译的版本:ffmpeg4android:http://sourceforge.net/projects/ffmpeg4android/files/20130219/
1. ffmpeg4android.readme
是编译说明;
2.
根据编译说明,很简单就完成了;
如果编译失败,可能是版本问题。
最新的ffmpeg可能和android项目下的ndk版本相差比较大从而导致编译不过,可以选择旧版本的ffmpeg4android也可以在新的android项目下编译测试;

 

FFmpeg之一编译ForAndroid 首先,被这部分烦的不行的可以去github里clone一些别人的成品轻松拿到适合Android的编译结果 说下自己的环境 win10 x64 VMware® Workstation 12 Pro ubuntu 14.04 LTS android-ndk-r10b ffmpeg3.0.2 Step1android-ndk-r10b的安装,超级简单,去官网按照自己的配置下 阅读详情

相关推荐

ffmpeg for android编译全过程与遇到的问题

编译前准备编译环境:Ubuntu16,可自行下载最新版并百度永久许可证或在服务器上安装Ubuntu有条件的最好还是在Liunx平台下编译吧,Windows平台下编译坑更多,文章末尾有Github源码可自取开始编译1.解压NDK,执行如果提示没有unzip,执行此命令安装2.解压ffmepg,3.进入ffmpeg4.2.2目录,修改根目录下的 configure 文件搜索替换为此步骤主要是将so命名为Android通用的so名称。

qq_52703909的博客 1091

FFmpeg打造Android万能音频播放器

FFmpeg打造Android万能音频播放器视频教程,移植FFmpeg到Android平台,利用FFmpeg解码音频数据并用OpenSL ES来播放,打造Android万能播放器。

Android NDK(ndk-r16b)交叉编译FFmpeg(3.3.9)

超详细编译ffmpeg3.3.9生成so库

Jushuzhan的专栏 2887

Android NDK 编译 FFmpeg:从下载源码到生成库的全过程

本文一步步介绍了通过 Android NDK 编译 FFmpeg 库的过程。

汽车行业,专注于座舱多媒体功能开发。欢迎大家在此共享想法,学习知识,探索新的技术。 4089

android-ffmpeg项目:Android NDK编译FFmpeg源代码指南

FFmpeg是一个强大的多媒体框架,用于处理几乎所有的音视频格式。其诞生于2000年,旨在为开发者提供一套可编程的命令行工具,用于记录、转换以及流化音频和视频数据。FFmpeg之所以在IT行业受到青睐,是因为它具备高度的灵活性和丰富的功能,能够满足从基础到复杂的多种媒体处理需求。Android NDK(Native Development Kit)是谷歌发布的一个工具集,它允许开发者使用C和C++语言编写性能密集型部分的Android应用。

weixin_33750664的博客 1461

ffmpeg4.16 ndk21 版本编译的android的库

ffmpeg4.16 ndk21 android 21 版本编译的库,包含 arm-v7a、arm-v8,包含include、动态链接库.so文件。

[原]如何用Android NDK编译FFmpeg

我们知道在Ubuntu下直接编译FFmpeg是很简单的,主要是先执行./configure,接着执行make命令来编译,完了紧接着执行make install执行安装。那么如何使用Android的NDK编译出来可以在Android下面可以使用的FFmpeg动态链接库呢?写下这篇文章就是学习如何裁剪并且编译出来可以使用的动态库。 一、获取FFmpeg源码:   首先在编译之前,得获取一份FFmp...

weixin_34348174的博客 237

从零开始使用matlab实现EKF-SLAM算法(含完整代码)

扩展卡尔曼滤波器同步定位与建图 (EKF-SLAM) 算法建立在 EKF 的基础上,集成了 EKF 的功能,可解决机器人技术中最具挑战性的问题之一:同时定位与建图 (SLAM)。 EKF-SLAM采用EKF方法来同时估计机器人的状态和周围环境的布局,而无需事先了解位置。 这种双重功能对于在未知环境中运行的自主系统至关重要,使它们能够在绘制区域地图时有效导航。 EKF-SLAM 算法一直是自动驾驶车辆和机器人系统开发的基石,为处理现实世界环境中固有的不确定性提供了一个强大的框架。

mjmmm的博客 6636

3.1 Android NDK交叉编译FFmpeg

本文介绍了在Ubuntu 20.04环境下使用NDK编译多个FFmpeg版本(4.4.6、5.1.6、6.1.2、7.0.2)的完整流程。项目包含自动下载脚本(NDK、FFmpeg源码及依赖项x264/fdk-aac)和编译控制脚本,支持分架构(arm64-v8a/armeabi-v7a)输出。目录结构清晰,包含源码目录(deps/ffmpeg)、NDK工具链和编译输出目录(output)。使用build_android.sh脚本可一键编译全部组件或单独编译指定库,通过代理设置加速下载。编译结果按版本和架构

卖猪肉的痴汉 1534

2篇1章1节:数据的基本概念以及 R 中的数据结构、向量与矩阵的创建及运算

本文详细介绍了R语言中常见的数据结构的向量和矩阵。通过掌握这些数据结构的基本概念和操作技巧,可以更高效地处理和分析数据。

MD Code 1245

MATLAB - 利用非线性模型预测控制(Nonlinear MPC)来控制四旋翼飞行器

本示例展示了如何利用非线性模型预测控制(MPC)为四旋翼飞行器设计一个跟踪轨迹的控制器。

机器人控制与仿真应用 4435

FFmpeg For Android (二) Ubuntu下编译FFmpeg源码

根据上一篇文章《FFmpeg For Android (一) 在Windows7下安装Ubuntu虚拟系统》安装并熟悉了Ubuntu 接下来开始编译FFmpeg 以下教程面向Android开发者1.下载相关文件首先去下载FFmpeg的源码 (国内在git下的话太慢了 经常中断)FFmpeg下载 http://www.ffmpeg.org/download.html我下载了ffmpeg-3.2.tar

没错, 我是东芝 2530

玩转Docker | 使用Docker部署Trilium Notes知识库工具

玩转Docker | 使用Docker部署Trilium Notes知识库工具

qq_59334230的博客 1441

ubuntu下 android ndk编译x264和ffmpeg

首先默认你的电脑已经配置好了ndk环境。 一、编译x264 1.下载x264 http://www.videolan.org/developers/x264.html 将下载下来的压缩包解压,我这里是解压到download目录下x264文件夹 1.在终端下进入x264目录: cd /home/kim/download/x264(换成你自己的路径) 2. 在x264文件夹下建立

jinrall的专栏 3032

基于反事实的因果推理Causal inference based on counterfactuals--一万六千字文献详细解读(因果关系的推理应用)【全文总结】

基于反事实的因果推理Causal inference based on counterfactuals--一万六千字文献详细解读(因果关系的推理应用)【全文总结】---来自一位即将入学的准研一,也希望这篇文章能够激励自己不断走下去!!

qq_46044325的博客 4442

unity6000.0.3版本URP下ScriptableRendererFeature如何实现一张自定义贴图效果?

🏆本文收录于 《全栈 Bug 调优(实战版)》 专栏。专栏聚焦真实项目中的各类疑难 Bug,从成因剖析 → 排查路径 → 解决方案 → 预防优化全链路拆解,形成一套可复用、可沉淀的实战知识体系。无论你是初入职场的开发者,还是负责复杂项目的资深工程师,都可以在这里构建一套属于自己的「问题诊断与性能调优」方法论,助你稳步进阶、放大技术价值。

**My Coding Family** 586

ffmpeg学习:ubuntu下编译Android版ffmpeg-kit

ubuntu下编译Android版的ffmpeg-kit

RQ997832的专栏 2493

【教程4>第2章>第19节】 GMSK解调系统的FPGA开发与matlab对比验证

MSK(Minimum Shift Keying,最小频移键控)和GMSK(Gaussian Minimum Shift Keying,高斯最小频移键控)都是数字调制技术,主要用于无线通信系统中将数字信号转换为模拟信号进行传输。它们都是连续相位移键控(Continuous Phase Shift Keying, CPK)的一种形式,意味着相邻码元之间没有相位跳变的突变,而是连续过渡,这有助于减少信号带宽和降低邻道干扰。GMSK的解调过程与MSK类似,我们这里还是采用和MSK解调一样的1bit解调方法。

FPGA/MATLAB学习教程/源码/项目合作开发 1221

Ubuntu18.04下编译FFmpeg for Android

模仿、求学都不是我们的目的,最终我们都希望在求知的过程中,有所领悟。最终走出自己的道。淡定、从容,如果不是刻意伪装,相信当事者必有丰富的人生阅历。把学习记录下面,不仅是为了备忘,更是对学习过程的梳理。当我们可以站在过去的肩膀上,又可以很好地向别人表达自己的思想。相信我们的人生一定会更加精彩。道路维艰,且让我们脚踏实地,步步为营。 下面的文章参考了众多博客,亦夹杂了个人在编译过...

n_fly的博客 1265

双目相机标定理论与编程实现

双目相机标定是计算机视觉中的重要任务,通过确定双目相机的内参和外参,可以实现立体视觉的深度感知和三维重建。通过使用OpenCV库提供的函数,我们可以方便地进行双目相机的标定工作。双目相机标定是计算机视觉中的重要任务,用于确定双目相机的内参和外参,以实现立体视觉的深度感知和三维重建。通过上述代码,我们可以获得左右相机的内参矩阵、畸变系数、旋转矩阵和平移矩阵等参数,从而完成双目相机的标定过程。使用双目相机采集一系列左右相机的图像,确保标定板在不同位置和角度下都能被双目相机拍摄到。函数来检测标定板的角点。

ByteKnight的博客 325

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

Ubuntu 生成ffmpeg安卓全平台so

做安卓开发的时候,需要实现拉流渲染视频之类的功能,使用ffmpeg比较方便。但是要生成ffmpeg的安卓库是有点麻烦的,需要使用ndk的工具链以及shell。但其实如果了解Linux上编译程序库以及bash,整个生成过程还是相对容易的。............

codeofcc的博客 1879

锂电池充电器电路设计 里面有电路

锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。

在ubuntu环境下编译 ffmpeg for android

参考:Cross Compiling FFmpeg 4.0 for Android 怕链接打不开,先记录一下主要步骤: 环境:ubuntu 1604版本; Step 1: Downloading the prerequisites: Android-ndk-r15c — 因为从r16版本编译ffmpeg就会出现问题,因此我们选用r16以前的版本,:https://dl.google.co...

gs344937933的专栏 1083

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

VC中sqlite的使用

在VC中对sqlite的使用,实现数据库大批数据的快速插入,读取数据库中的数据在ListCtrl中显示

Ubuntu虚拟机NDK编译ffmpeg

Ubuntu虚拟机android平台编译ffmpeg,开启硬编解码选项

dami_lixm的专栏 924

用android ndk编译ffmpeg,[Android开发]使用NDK编译FFmpeg到Android下使用

这次使用 ndk r14 进行对 ffmpeg 3.2.4编译,使其能移植到Android下使用之前尝试在window 10环境下用NDK对FFmpeg进行编译,发现坑太多,各种路径不认。最后还是决定在虚拟机上安装Ubuntu再对其编译。前期准备:1.安装好虚拟机,这里之前安装的是VirtualBox 5.0.26的版本2.在虚拟机上安装Ubuntu,这里采用的是ubuntu 14.04 LTS...

weixin_28933797的博客 455

ubuntu上使用android ndk编译ffmpeg

笔者编译开发环境:本地使用win10系统以及aliyu云服务器(ubuntu系统)。 1、在http://www.ffmpeg.org/download.html中下载ffmpeg源码。 2、在https://developer.android.google.cn/ndk/downloads/中下载android ndk源码。 3、笔者这里在win10中下载的ffmpeg-4.1.3和androi...

weixin_37902052的博客 435
上一篇: android ffmpeg内核 开源播放器编译与使用 支持2.3及4.0
下一篇: 成功的7个性格模式
勤奋专注
博客等级 码龄19年 80粉丝 69原创
评论 23
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值