ubuntu下交叉编译ffmpeg
环境:ubuntu16.04
交叉编译器版本:4.8.3
依赖x264,lame
x264:
1.wget ftp://ftp.videolan.org/pub/x264/snapshots/last_stable_x264.tar.bz2
2.tar xvf last_stable_x264.tar.bz2
3.cd x264-snapshot-20170903-2245-stable
4.export CC=arm-linux-gnueabi-gcc
5.export AR=arm-linux-gnueabi-ar
6.mkdir build
7.cd build
8. ../configure --enable-static --enable-shared --disable-asm --prefix=$PWD/__install --host=arm-linux-gnueabi
9.make
10.make install
lame:
1.wget https://sourceforge.net/projects/lame/files/lame/3.99/lame-3.99.5.tar.gz
2.tar xvf lame-3.99.5.tar.gz
3.cd lame-3.99.5
4.mkdir build
5.cd build
6. ../configure --prefix=$PWD/__install --host=arm-linux-gnueabi
7.make
8.make install
ffmpeg:
1.wget www.ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
2. tar xvf ffmpeg-snapshot.tar.bz2
3.cd ffmpeg
4.mkdir build
5.cd build
6. ../configure --cross-prefix=/opt/x86-arm/arm-linux/bin/arm-linux-gnueabi- --disable-asm --enable-static --arch=arm --target-os=linux --prefix=$PWD/_install --disable-x86asm --enable-gpl --enable-libx264 --enable-nonfree --enable-cross-compile --extra-cflags=-I/home/jello/x264-snapshot-20170903-2245-stable/build/_install/include --extra-ldflags=-L/home/jello/x264-snapshot-20170903-2245-stable/build/_install/lib --extra-libs=-ldl
7.进过步骤6在当前目录下有ffbuild/config.mak,那么修改此文件
文件中有以下四处需要修改
1.
CFLAGS= -I/home/jello/x264-snapshot-20170903-2245-stable/build/_install/include -march=armv5te -std=c11 -fomit-frame-pointer -marm -pthread -g -Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -O3 -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=format-security -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=vla -Wformat -Wno-maybe-uninitialized
2.
ASFLAGS= -I/home/jello/x264-snapshot-20170903-2245-stable/build/_install/include -march=armv5te -g
3.
LDFLAGS= -L/home/jello/x264-snapshot-20170903-2245-stable/build/_install/lib -march=armv5te -Wl,--as-needed -Wl,-z,noexecstack -Wl,--warn-common -Wl,-rpath-link=libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample
4.EXTRALIBS=-lx264 -lm -pthread -pthread -lrt -ldl
将以上四项改动如下:
1.
CFLAGS= -I/home/jello/x264-snapshot-20170903-2245-stable/build/_install/include -I/home/jello/lame-3.99.5/build/_install/include/lame -march=armv5te -std=c11 -fomit-frame-pointer -marm -pthread -g -Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -O3 -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=format-security -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=vla -Wformat -Wno-maybe-uninitialized
2.
ASFLAGS= -I/home/jello/x264-snapshot-20170903-2245-stable/build/_install/include -I/home/jello/lame-3.99.5/build/_install/include/lame -march=armv5te -g
3.
LDFLAGS= -L/home/jello/x264-snapshot-20170903-2245-stable/build/_install/lib -L/home/jello/lame-3.99.5/build/_install/lib -march=armv5te -Wl,--as-needed -Wl,-z,noexecstack -Wl,--warn-common -Wl,-rpath-link=libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample
4.EXTRALIBS=-lx264 -lm -pthread -pthread -lrt -ldl -lmp3lame
8.make
9.make install
交叉编译完成!!!
ubuntu下交叉编译ffmpeg的更多相关文章
- ubuntu下交叉编译lftp
一.背景: lftp依赖于ncurses,readline和gnutls 二.准备工作 2.1交叉编译ncurses 2.1.1获取ncurses源码 wget ftp://ftp.invisible ...
- 在Ubuntu下编译FFmpeg
第一步:准备编译环境 .tar.bz2 -2245/ ./configure --enable-static--enable-shared--prefix=/usr/localmakesudomake ...
- ubuntu下调试ffmpeg程序出现undefined reference to pthread_once ,undefined reference to uncompress错误
Ubuntu(版本16.04)下默认配置编译Ffmpeg(版本4.1.3configure 添加选项--enable-threads),将编译好的ffmpeg库添加到程序 中进行编译出现undefin ...
- Xcode5和ios7下交叉编译ffmpeg
先申明本机环境 dev-mini:ffmpeg devone$ sw_vers ProductName: Mac OS X ProductVersion: BuildVersion: 1 ...
- ubuntu 下 编译ffmpeg 3.1.1
1,下载ggmpeg源码:http://ffmpeg.org/download.html 2.下载ndk ,百度 3.配置环境 3.1 编译FFMPEG时,出现了 ffmpeg yasm not fo ...
- ubuntu下交叉编译imagemagick
环境:ubuntu16.04 交叉编译器版本号:4.8.3 在编译之前要编译以下其依赖的软件或库:freetype,libpng,libxml2,libtiff,libjpeg,zlib,graphv ...
- ubuntu下编译ffmpeg+SDL+ffplay提取motion vector
编译ffmpeg: 第一步: 从官网http://ffmpeg.org/下载最新版本. 解压tar -xjvf ffmpeg-3.3.1.tar.bz2 进入目录cd ffmpeg-3.3.1 第二步 ...
- ubuntu下编译ffmpeg并用eclipse调试
一.下载ffnpeg源码 下载地址:http://ffmpeg.org/download.html 二.解决版本问题 可能之前你编译过ffmpeg,或者装过相关的库,那都要先卸载掉,否则用的时候会报一 ...
- ubuntu 下安装ffmpeg
FFmpeg是一套可以用来记录.转换数字音频.视频,并能将其转化为流的开源计算机程序.采用LGPL或GPL许可证.它提供了录制.转换以及流化音视 频的完整解决方案.它包含了非常先进的音频/视频编解码库 ...
随机推荐
- Python开发【笔记】:获取mp3文件获取信息
import eyed3 def main(): mp3 = '8200031001_13429822982_1_00163e086216990b11e82403f00d3d9a.mp3' xx = ...
- ICMP报文
类型:表示ICMP消息类型 代码:表示同一消息的不同信息 其他是时间戳或者标识符及序列号 类型 编码 描述 0 0 Echo Reply 3 0 网络不可达 3 1 主机不可达 3 2 协议不可达 ...
- Linux IO模式及 select、poll、epoll详解及源码(转)
原文:https://segmentfault.com/a/1190000003063859 我只摘取了其中的epoll代码示例,服务端代码 #define IPADDRESS "127.0 ...
- jquery实现选项卡(两句即可实现)
<!DOCTYPE HTML><html> <head> <meta charset="utf-8"> ...
- 总结)Nginx/LVS/HAProxy负载均衡软件的优缺点详解
总结)Nginx/LVS/HAProxy负载均衡软件的优缺点详解 PS:Nginx/LVS/HAProxy是目前使用最广泛的三种负载均衡软件,本人都在多个项目中实施过,参考了一些资料,结合自己的一些使 ...
- 奇特的Local System权限(转载)
转载自:http://mp.weixin.qq.com/s?__biz=MzA3NTM1MzE4Nw==&mid=202597764&idx=1&sn=0cef1a40fb3c ...
- 1.cassandra的搭建
参考: https://blog.csdn.net/ch648966459/article/details/51671276
- [LeetCode] 804. Unique Morse Code Words_Easy tag: Hash Table
International Morse Code defines a standard encoding where each letter is mapped to a series of dots ...
- 混淆和加密.NET开发工具
.NET开发的工具,可以用ILSpy等很轻松的反编译查看源码,为了保护自己写的软件,一般会对软件进行加密,不仅内部关键数据通过加密,软件开发完毕后,对软件也进行加密,防止别人很轻松的反编译和查看到比较 ...
- 1.keras实现-->自己训练卷积模型实现猫狗二分类(CNN)
原数据集:包含 25000张猫狗图像,两个类别各有12500 新数据集:猫.狗 (照片大小不一样) 训练集:各1000个样本 验证集:各500个样本 测试集:各500个样本 1= 狗,0= 猫 # 将 ...