FFmpeg 1.2 for Android dynamic library Compilation

Source: Internet
Author: User

It took two days to finally compile it! Now, riwater provides the configured files for you to download. We hope to save you some time.

Latest FFMPEG version 1.2,If your version is different, modify the configuration file accordingly!

Compiling environment: Ubuntu-11.10, android-ndk-r6-crystax-2

Configuration File Download

1. Create a folder: FFMPEG. decompress the downloaded file to FFMPEG in Linux.

Tar xzvf ffmpeg-1.2.1.tar.gz

2. CD to the FFMPEG directory and run the following command:

Music ffmpeg-1.2.1 JNI

3. cd jni: Create config. Sh, Android. mk, Av. mk

4. Go to each library directory and create Android. mk

5. comment out the first line of makefile in each library Directory: include $ (subdir) ../config. Mak

6. Return to the JNI directory, open config. Sh, modify prebuilt and platform to your own directory, and execute:

./Config. Sh

7. Open config. h and search for av_restrict.CodeReplace:

# Ifdef av_restrict# UNDEFAv_restrict# Endif# DefineAv_restrict

8. Open libavutil/parseutils. h and replace # include <time. h> with # include <sys/../time. h>.

9. execute ndk-build, wait for about half an hour, you can find the generated so file under FFMPEG/libs, a total of 10 files, libffmpeg. so is only 2 kb. This file is useless, but it only helps us generate other libraries.

 
Configuration File Download

Related Article

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.