diff --git a/README.md b/README.md index 4045db5..dbb0c81 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # FFmpegAndroid android端基于FFmpeg库的使用。
-基于ffmpeg3.2.4版本,编译生成libffmpeg.so文件。
-添加编译ffmpeg源码的参考脚本
+添加编译ffmpeg、shine、mp3lame源码的参考脚本
目前音视频相关处理:
- #### 音频剪切、拼接 @@ -29,6 +28,7 @@ android端基于FFmpeg库的使用。
- #### 音视频解码播放 - #### OpenGL+GPUImage滤镜 - #### FFmpeg的AVFilter滤镜 +- #### 使用mp3lame库进行mp3转码 - #### IjkPlayer的RTSP超低延时直播 - #### IjkPlayer的RTSP多路投屏直播 @@ -67,6 +67,11 @@ android端基于FFmpeg库的使用。
![动态图片](https://github.com/xufuji456/FFmpegAndroid/blob/master/gif/reverse.gif) + +mp3lame编译脚本: + +![文件](https://github.com/xufuji456/FFmpegAndroid/blob/master/shell/mp3lame) + ***

diff --git a/build.sh b/build.sh deleted file mode 100644 index ea2f8ce..0000000 --- a/build.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash - -NDK=/home/mn/bin/android-ndk-r15b -SYSROOT=$NDK/platforms/android-16/arch-arm/ -TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 -PREFIX=../output -ADDI_CFLAGS="-marm" - - -function build_ffmpeg -{ - ./configure \ - --prefix=$PREFIX \ - --enable-shared \ - --enable-small \ - --disable-static \ - --disable-doc \ - --disable-ffmpeg \ - --disable-ffplay \ - --disable-ffprobe \ - --disable-ffserver \ - --disable-symver \ - --target-os=linux \ - --arch=arm \ - --cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \ - --enable-cross-compile \ - --sysroot=$SYSROOT \ - --extra-cflags="-Os -fpic $ADDI_CFLAGS" \ - --extra-ldflags="$ADDI_LDFLAGS" \ - $ADDITIONAL_CONFIGURE_FLAG - make clean - make - make install -} - -cd ffmpeg -build_ffmpeg \ No newline at end of file diff --git a/build_ffmpeg_onelib.sh b/shell/ffmpeg/build_ffmpeg_onelib.sh similarity index 100% rename from build_ffmpeg_onelib.sh rename to shell/ffmpeg/build_ffmpeg_onelib.sh diff --git a/shell/mp3lame/Android.mk b/shell/mp3lame/Android.mk new file mode 100644 index 0000000..9197909 --- /dev/null +++ b/shell/mp3lame/Android.mk @@ -0,0 +1,21 @@ +WORKING_DIR := $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_PATH := $(WORKING_DIR) +LOCAL_ARM_MODE := arm +LOCAL_MODULE := mp3lame +LOCAL_SRC_FILES := mp3lame/bitstream.c mp3lame/encoder.c \ + mp3lame/fft.c mp3lame/gain_analysis.c mp3lame/id3tag.c \ + mp3lame/lame.c mp3lame/newmdct.c mp3lame/quantize.c \ + mp3lame/presets.c mp3lame/psymodel.c mp3lame/quantize_pvt.c \ + mp3lame/reservoir.c mp3lame/set_get.c mp3lame/tables.c \ + mp3lame/takehiro.c mp3lame/util.c mp3lame/vbrquantize.c \ + mp3lame/VbrTag.c mp3lame/version.c + +LOCAL_C_INCLUDES := mp3lame +LOCAL_LDLIBS := -llog -lz -lm -landroid + +include $(BUILD_STATIC_LIBRARY) +#include $(BUILD_SHARED_LIBRARY) + diff --git a/shell/shine/Android.mk b/shell/shine/Android.mk new file mode 100644 index 0000000..2c1083a --- /dev/null +++ b/shell/shine/Android.mk @@ -0,0 +1,19 @@ +WORKING_DIR := $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_PATH := $(WORKING_DIR) +LOCAL_ARM_MODE := arm +LOCAL_MODULE := shine +LOCAL_SRC_FILES := shine/bitstream.c shine/huffman.c \ + shine/l3bitstream.c shine/l3loop.c shine/l3mdct.c \ + shine/l3subband.c shine/layer3.c shine/reservoir.c \ + shine/tables.c +LOCAL_LDLIBS := -llog -lz -lm -landroid + +LOCAL_C_INCLUDES := shine +LOCAL_LDLIBS := -llog -lz -lm -landroid + +include $(BUILD_STATIC_LIBRARY) +#include $(BUILD_SHARED_LIBRARY) +