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