IMX.6Q 移植FFmpeg libx264软件编码 libmp3lame

ubuntu 16.04 

工具链

sun@sun:/$ 

sun@sun:/$ arm-fsl-linux-gnueabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-fsl-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/home/sun/im6q/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/../libexec/gcc/arm-fsl-linux-gnueabi/4.6.2/lto-wrapper
Target: arm-fsl-linux-gnueabi
Configured with: /work/build/.build/src/gcc-linaro-4.6-2011.06-0/configure --build=i686-build_pc-linux-gnu --host=i686-build_pc-linux-gnu --target=arm-fsl-linux-gnueabi --prefix=/work/fsl-linaro-toolchain-2.13 --with-sysroot=/work/fsl-linaro-toolchain-2.13/arm-fsl-linux-gnueabi/multi-libs --enable-languages=c,c++ --with-pkgversion='Freescale MAD -- Linaro 2011.07 -- Built at 2011/08/10 09:20' --enable-__cxa_atexit --disable-libmudflap --disable-libgomp --disable-libssp --with-gmp=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-mpfr=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-mpc=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-ppl=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-cloog=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-libelf=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm -L/work/build/.build/arm-fsl-linux-gnueabi/build/static/lib -lpwl' --enable-threads=posix --enable-target-optspace --enable-plugin --enable-multilib --with-local-prefix=/work/fsl-linaro-toolchain-2.13/arm-fsl-linux-gnueabi/multi-libs --disable-nls --enable-c99 --enable-long-long --with-system-zlib
Thread model: posix

gcc version 4.6.2 20110630 (prerelease) (Freescale MAD -- Linaro 2011.07 -- Built at 2011/08/10 09:20)

sun@sun:~/im6q$ tar xf last_x264.tar.bz2 
sun@sun:~/im6q$ 
sun@sun:~/im6q$ tar xf ffmpeg-3.4.tar.bz2 
sun@sun:~/im6q$ tar xf lame-3.100.tar.gz 

x264

sun@sun:~/im6q/x264-snapshot-20171128-2245$ ./configure --host=arm-fsl-linux-gnueabi --prefix=/x264-imx6q --enable-shared  --disable-asm

make -j4

make install

mp3lame

sun@sun:~/im6q/x264-snapshot-20171128-2245$ ./configure --host=arm-fsl-linux-gnueabi --prefix=/lame-imx6q --enable-shared --disable-static

make -j4

make install


//ffmpeg

sun@sun:~/im6q/ffmpeg-3.4$ ./configure --cross-prefix=arm-fsl-linux-gnueabi- --enable-cross-compile --target-os=linux --cc=arm-fsl-linux-gnueabi-gcc --arch=arm --prefix=/ffmpeg-imx6q --enable-shared --disable-static --enable-gpl --enable-nonfree --enable-libx264 --enable-ffmpeg --disable-ffplay --enable-ffserver --enable-swscale --enable-pthreads  --enable-libmp3lame  --disable-stripping --extra-cflags=-I/x264-imx6q/include --extra-ldflags=-L/x264-imx6q/lib --extra-cflags=-I/lame-imx6q/include --extra-ldflags=-L/lame-imx6q/lib

make -j4

make install


lame-imx6q

x264-imx6q

ffmpeg-imx6q

 lib include目录下的   都复制到板子/usr/lib /usr/include/

单独的复制ffmpeg-imx6qbin目录下的文件  nano板子的/usr/bin[ffmpeg ffplay之类的]


root@myzr /home/imx6/x264-imx6q$ 
root@myzr /home/imx6/x264-imx6q$ 
root@myzr /home/imx6/x264-imx6q$ 
root@myzr /home/imx6/x264-imx6q$ ffmpeg -v
ffmpeg version 3.4 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 4.6.2 (Freescale MAD -- Linaro 2011.07 -- Built at 2011/08/10 09:20) 20110630 (prerelease)
  configuration: --cross-prefix=arm-fsl-linux-gnueabi- --enable-cross-compile --target-os=linux --cc=arm-fsl-linux-gnueabi-gcc --arch=arm --prefix=/ffmpeg-imx6q --enable-shared --disable-static --enable-gpl --enable-nonfree --enable-libx264 --enable-ffmpeg --disable-ffplay --enable-ffserver --enable-swscale --enable-pthreads --enable-libmp3lame --disable-stripping --extra-cflags=-I/x264-imx6q/include --extra-ldflags=-L/x264-imx6q/lib --extra-cflags=-I/lame-imx6q/include --extra-ldflags=-L/lame-imx6q/lib
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100

成功


你可能感兴趣的:(IMX.6Q)