Closed StevenMichael3213 closed 5 years ago
According your logs, input.m4a
file includes both audio and video. ffmpeg
tries to decode stream 1 (video: mjpeg) as an mp3 stream and fails. Because it is mjpeg
.
I think your configuration is fine and it will work without any issues on m4a audio files. But on files with video you need to enable video demuxers or find an option to skip demuxing of video streams.
Thank you for your replay sincerely.
After many attempts, I found that remove --disable-everything
then respectively disable encoders
disable decoders
disable muxers
etc then enable what I need from my configuration will achieve my goal.
This is my new configuration :
./configure \ --cross-prefix="${TARGET_HOST}-" \ --sysroot="${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${TOOLCHAIN}/sysroot" \ --prefix="${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME}" \ --pkg-config="${HOST_PKG_CONFIG_PATH}" \ --arch="${TARGET_ARCH}" \ --cpu="${TARGET_CPU}" \ --cc="${CC}" \ --cxx="${CXX}" \ --target-os=android \ ${ASM_FLAGS} \ --enable-cross-compile \ --enable-pic \ --enable-jni \ --enable-optimizations \ --enable-swscale \ --enable-shared \ --disable-v4l2-m2m \ --disable-outdev=v4l2 \ --disable-outdev=fbdev \ --disable-indev=v4l2 \ --disable-indev=fbdev \ ${SIZE_OPTIONS} \ --disable-openssl \ --disable-xmm-clobber-test \ ${DEBUG_OPTIONS} \ --disable-neon-clobber-test \ --disable-programs \ --disable-postproc \ --disable-doc \ --disable-htmlpages \ --disable-manpages \ --disable-podpages \ --disable-txtpages \ --disable-static \ --disable-sndio \ --disable-schannel \ --disable-securetransport \ --disable-xlib \ --disable-cuda \ --disable-cuvid \ --disable-nvenc \ --disable-vaapi \ --disable-vdpau \ --disable-videotoolbox \ --disable-audiotoolbox \ --disable-appkit \ --disable-alsa \ --disable-cuda \ --disable-cuvid \ --disable-nvenc \ --disable-vaapi \ --disable-vdpau \ --disable-gray \ --disable-network \ --disable-postproc \ --disable-pixelutils \ --disable-encoders \ --disable-decoders \ --disable-muxers \ --disable-parsers \ --disable-bsfs \ --disable-protocols \ --disable-devices \ --disable-demuxers \ --enable-protocol=file \ --enable-encoder=wavpack,wav,pcm_s16le,pcm_u8,aac \ --enable-decoder=wavpack,wav,pcm_s16le,aac \ --enable-muxer=wav,pcm_u8,adts \ --enable-demuxer=wav,pcm_u8,aac,pcm_s16le,mov,mp3 \ --enable-parser=aac \ ${CONFIGURE_POSTFIX} 1>>${BASEDIR}/build.log 2>&1
@StevenMichael3213 you can help me?
My apk is to big when i full full-gpl , i just need compress video that user record on my app.. Can you help me with this binary file?
thanks!
Description Hello, Thanks for the great project. It helps me a lot, it can compile .wav file to .mp3 so fast on some supported -neon devices. But it binary size too big. So I want to modify the configuration of
android-ffmpeg.sh
after studied this project ( wiki + issues) ,then build a minimal binary size aar. I have successfully compiled an aar use below configuration, but the function failed to use. Could u help me to check the configure is right?I need to execute 3 commands:
-hide_banner -y -i input.m4a -ac 2 -ar 44100 -acodec pcm_s16le -f wav out.wav
-hide_banner -y -i input.wav -ss 20 -t 300 -acodec copy out.wav
-hide_banner -y -i input1.wav -i input2.wav -filter_complex [0:a]volume=0.3,adelay=1000|1000[a];[1:a]volume=0.7,adelay=1000|1000[b];[a] [b]amix=inputs=2:duration=shortest -c:a libmp3lame -qscale:a 2 -b:a 128k output.mp3
This is my ffmpeg configuration:
Expected behavior I just want to --disable-some libs , --enable-some libs and filter ect, and only keep some functions involved .m4a .mp3 .wav volume adelay amix cut. Then get a minimum size of ffmpeg files to reduce the size of the final apk.
Current behavior Use the above configuration. I have successfully compiled an aar. I have imported it to my project. But when I excuted the first command
-hide_banner -y -i input.m4a -ac 2 -ar 44100 -acodec pcm_s16le -f wav out.wav
I see the error log from ffmepg:Now could you please help me point out errors in my configuration?
Thanks in advance for the answer and help.
Environment