zoukankan      html  css  js  c++  java
  • ffmpeg编译x264, 这个libffmpeg即可解码又可以h264编码

     
    http://blog.csdn.net/u012917616/article/details/40921861
    不废话,直接上.sh脚本:

    export NDK=/home/xxx/my_software/android-ndk-r10

    export PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt

    export PLATFORM=$NDK/platforms/android-14/arch-arm

    export PREFIX=/home/xxx/x264


    build_one(){

    ./configure --target-os=linux --prefix=$PREFIX

    --enable-cross-compile

    --enable-runtime-cpudetect

    --disable-asm

    --arch=arm

    --cc=$PREBUILT/linux-x86/bin/arm-linux-androideabi-gcc

    --cross-prefix=$PREBUILT/linux-x86/bin/arm-linux-androideabi-

    --disable-stripping

    --nm=$PREBUILT/linux-x86/bin/arm-linux-androideabi-nm

    --sysroot=$PLATFORM

    --enable-nonfree

    --enable-version3

    --disable-everything

    --enable-gpl

    --disable-doc

    --enable-avresample

    --enable-demuxer=rtsp

    --enable-muxer=rtsp

    --disable-ffplay

    --disable-ffserver

    --enable-ffmpeg

    --disable-ffprobe

    --enable-libx264

    --enable-encoder=libx264

    --enable-decoder=h264

    --enable-protocol=rtp

    --enable-hwaccels

    --enable-zlib

    --disable-devices

    --disable-avdevice

    --extra-cflags="-I/home/xxx/x264/include -fPIC -DANDROID -D__thumb__ -mthumb -Wfatal-errors -Wno-deprecated -mfloat-abi=softfp -mfpu=vfpv3-d16 -marm -march=armv7-a"

    --extra-ldflags="-L/home/xxx/x264/lib"


    #make clean

    make -j4 install


    $PREBUILT/linux-x86/bin/arm-linux-androideabi-ar d libavcodec/libavcodec.a inverse.o


    $PREBUILT/linux-x86/bin/arm-linux-androideabi-ld -rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -L$PREFIX/lib  -soname libffmpeg.so -shared -nostdlib  -z noexecstack -Bsymbolic --whole-archive --no-undefined -o $PREFIX/libffmpeg.so libavcodec/libavcodec.a libavfilter/libavfilter.a libavresample/libavresample.a libavformat/libavformat.a libavutil/libavutil.a libswscale/libswscale.a /home/xxx/x264/lib/libx264.a -lc -lm -lz -ldl -llog --dynamic-linker=/system/bin/linker $PREBUILT/linux-x86/lib/gcc/arm-linux-androideabi/4.8/libgcc.a

    }


    build_one
  • 相关阅读:
    【火炉炼AI】机器学习003-简单线性回归器的创建,测试,模型保存和加载
    【火炉炼AI】机器学习002-标记编码方法
    【火炉炼AI】机器学习001-数据预处理技术(均值移除,范围缩放,归一化,二值化,独热编码)
    HOJ 13830 DNA Sequencing
    HDU 6078 Wavel Sequence
    hoj 13814 Cake cut
    HDU6071 Lazy Running
    HDU 6070 Dirt Ratio
    HDU 6070 Dirt Ratio
    HDU 6059 Kanade's trio
  • 原文地址:https://www.cnblogs.com/runner42/p/4083782.html
Copyright © 2011-2022 走看看