• 嵌入式交流群:705573984 资源分享群:708912078

移植ffmpeg到i.mx6ull

嵌入式 admin 2个月前 (10-01) 115次浏览

交叉编译x264

x264源码:

https://url91.ctfile.com/f/10165491-512342545-657bdd(访问密码:5623)

交叉编译命令:

tar -xvf x264-master.tar.gz

cd x264-master

./configure  –enable-shared –enable-static –host=arm-linux-gnueabihf –cross-prefix=arm-linux-gnueabihf-   –disable-opencl –enable-pic –disable-asm –prefix=$PWD/_install

make

make install

 

交叉编译ffmpeg

ffmpeg源码:

https://url91.ctfile.com/f/10165491-512344032-486ca6(访问密码:5623)

 

tar -xjf ffmpeg-snapshot.tar.bz2

cd ffmpeg

把extra-cflags和extra-cflags替换成自己安装的绝对路径

./configure –cross-prefix=arm-linux-gnueabihf- –enable-cross-compile –target-os=linux –cc=arm-linux-gnueabihf-gcc –arch=arm –prefix=$PWD/_install –enable-shared –disable-static –enable-gpl –enable-nonfree –disable-ffplay –enable-swscale –enable-pthreads –disable-armv5te –disable-armv6 –disable-armv6t2 –disable-x86asm –disable-stripping –enable-libx264 –extra-cflags=-I/home/xl/files/alpha/test/x264-master/_install/include –extra-ldflags=-L/home/xl/files/alpha/test/x264-master/_install/lib –extra-libs=-ldl

Makefile 38 行新增 : CFLAGS += -fPIC

make

make install

复制库和可执行程序

复制x264-master/_install 和ffmpeg/_install内容到开发板

路径分别为:  /root/x264  /root/ffmpeg

最后新增profile文件,内容如下:

export PATH=”/root/ffmpeg/bin:$PATH”

export LD_LIBRARY_PATH=/root/x264/lib/:/root/ffmpeg/lib:

执行

ffmpeg -i 202199103339.flv -vcodec copy -acodec copy 202199103339.mp4


转载请注明原文链接:移植ffmpeg到i.mx6ull
喜欢 (0)
[sp91@qq.com]
分享 (0)