使用libx264为android编译ffmpeg

时间:2015-03-05 11:28:10

标签: android linux android-ndk ffmpeg libx264

libx264路径有什么问题请有人帮帮我吗? 我编译了libx264最新的源代码。当我使用x264以下的路径编译ffmpeg源代码时。它不允许我录制视频。 请注意:我正在通过linux编译库

#!/bin/bash
######################################################
# Usage:
# put this script in top of FFmpeg source tree
# ./build_android
# It generates binary for following architectures:
# ARMv6 
# ARMv6+VFP 
# ARMv7+VFPv3-d16 (Tegra2) 
# ARMv7+Neon (Cortex-A8)
# Customizing:
# 1. Feel free to change ./configure parameters for more features
# 2. To adapt other ARM variants
# set $CPU and $OPTIMIZE_CFLAGS 
# call build_one
######################################################

HOME=/home
NDK=$HOME/hfi/Downloads/android-ndk-r10d
PLATFORM=$NDK/platforms/android-9/arch-arm
SYSROOT=$PLATFORM
PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64
TOOLCHAIN=$PREBUILT

function build_one
{
./configure \
--prefix=$PREFIX \
--enable-shared \
--enable-nonfree \
--enable-gpl \
--enable-libx264 \
--disable-doc \
--disable-ffmpeg \
--disable-ffplay \
--disable-ffprobe \
--disable-ffserver \
--disable-avdevice \
--disable-doc \
--disable-symver \
--cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
--target-os=linux \
--arch=arm \
--enable-cross-compile \
--sysroot=$SYSROOT \
--extra-cflags="-Os -I /usr/local/include +-fpic $ADDI_CFLAGS" \
--extra-ldflags="$ADDI_LDFLAGS" \
$ADDITIONAL_CONFIGURE_FLAG
make clean
make
make install
}
CPU=arm
PREFIX=$(pwd)/android/$CPU
ADDI_CFLAGS="-marm"
build_one

0 个答案:

没有答案