Porting ffmpeg0.10 to Android in Ubuntu

Source: Internet
Author: User

Configuration of the ndk environment is not detailed here. There are many

Copy the FFMPEG source code to the JNI directory of the project and create the file config. Sh under the FFMPEG directory. The content is as follows:

./configure  --disable-static --enable-shared --enable-gpl --enable-version3 --enable-nonfree --disable-doc --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-avdevice --disable-avfilter --disable-postproc --enable-small --cross-prefix=/opt/android-ndk-r6b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi- --enable-cross-compile --target-os=linux --extra-cflags='-I/opt/android-ndk-r6b/platforms/android-8/arch-arm/usr/include' --extra-ldflags='-L/opt/android-ndk-r6b/platforms/android-8/arch-arm/usr/lib -nostdlib' --arch=arm --disable-symver --disable-debug --disable-strippingsed -i 's/HAVE_LRINT 0/HAVE_LRINT 1/g' config.hsed -i 's/HAVE_LRINTF 0/HAVE_LRINTF 1/g' config.hsed -i 's/HAVE_ROUND 0/HAVE_ROUND 1/g' config.hsed -i 's/HAVE_ROUNDF 0/HAVE_ROUNDF 1/g' config.hsed -i 's/HAVE_TRUNC 0/HAVE_TRUNC 1/g' config.hsed -i 's/HAVE_TRUNCF 0/HAVE_TRUNCF 1/g' config.h

The following attributes must be modified based on the location where the ndk is installed:

Cross-Prefix

Extra-cflags

Extra-ldflags

Note: These three must be modified based on your ndk.

Run the following command in the terminal project path:

Chmod + x config. Sh
./Config. Sh
Copy Android. mk to the ffmpeg directory.
Run ndk-build.
Now FFMPEG has been updated to 0.10.2, and I use 0.10

Config. Sh

Http://download.csdn.net/detail/wenwei19861106/4233233

Android. mk

Http://download.csdn.net/detail/wenwei19861106/4233236

Ffmpeg0.10

Http://download.csdn.net/detail/wenwei19861106/4233242

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.