Ffmpeg-android is a project mainly written in Shell, it's free.
ffmpeg compiled for the Android OS
Download the Android NDK Revision 5b from http://developer.android.com/sdk/ndk/index.html
Extract it into a folder (e.g. your home directory, the example is for the mac os x version):
tar -jxvf android-ndk-r5b-darwin-x86.tar.bz2 mv android-ndk-r5b android-ndk
The original upstream source (and the patches, if any) can be extracted by running ./extract.sh.
To build, first set the environment variable NDK to point to the directory where the NDK is installed:
export NDK=~/android-ndk
Then just call ./build.sh.
To clean up the newly built files (removed unused files, remove libraries with version numbers in the name), call ./clean-build.sh.