(Use jni to port the h264 codec in ffmpeg, and generate the so library. The H264 C code in ffmpeg, the CPP code written by yourself, and the upper layer java code are all available. You can refer to the reference. The minimum android 2.1 is attached with a test avi file. But now android 4.0 has the ability to encode and decode h264)