I am trying to build FFMPEG with libx264 for Android.
I can successfully build and use FFMPEG for Android but I realized that I need the ability to encode, therefore
I have met the same issue before, and I tried several times to find out the reason:
You must make sure the x264 and the ffmpeg are using same way to compile. like: using Android NDK. Using the same gcc compiler.
So you can not compile ffmpeg with this command:"--cross-prefix=$PREBUILT/darwin-x86_64/bin/arm-linux-androideabi-", but compile the x264 without that. Here is my x264 compile script:
./configure --prefix=$PREFIX \
--enable-static \
--enable-pic \
--disable-asm \
--disable-cli \
--host=arm-linux \
--cross-prefix=$PREBUILT/darwin-x86_64/bin/arm-linux-androideabi- \
--sysroot=$PLATFORM
make
sudo make install
sudo ldconfig