Javernaut / ffmpeg-android-maker

Contains a script that assembles FFmpeg library for Android
MIT License
586 stars 173 forks source link

libmp3lame not packaged when building static executable? #55

Closed Shabinder closed 3 years ago

Shabinder commented 3 years ago
ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
      built with Android (7019983 based on r365631c3) clang version 9.0.9 (https://android.googlesource.com/toolchain/llvm-project a2a1e703c0edb03ba29944e529ccbf457742737b) (based on LLVM 9.0.9svn)
      configuration: --disable-everything --disable-network --enable-small --prefix=/mnt/c/Users/mrsha/AndroidStudioProjects/spotiflyer/ffmpeg/ffmpeg-android-maker/build/ffmpeg/arm64-v8a --enable-cross-compile --target-os=android --arch=aarch64 --sysroot=/home/shabinder/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot --cc=/home/shabinder/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang --cxx=/home/shabinder/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang++ --ld=/home/shabinder/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang --ar=/home/shabinder/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-ar --as=/home/shabinder/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang --nm=/home/shabinder/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-nm --ranlib=/home/shabinder/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-ranlib --strip=/home/shabinder/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-strip --extra-cflags='-O3 -fPIC -I/mnt/c/Users/mrsha/AndroidStudioProjects/spotiflyer/ffmpeg/ffmpeg-android-maker/build/external/arm64-v8a/include' --extra-ldflags='-L/mnt/c/Users/mrsha/AndroidStudioProjects/spotiflyer/ffmpeg/ffmpeg-android-maker/build/external/arm64-v8a/lib ' --enable-filter=aresample --enable-decoder='aac*,ac3*' --enable-demuxer=mov --enable-muxer=mp3 --enable-protocol=file --pkg-config=/usr/bin/pkg-config --x86asmexe=/home/shabinder/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin/yasm --enable-libmp3lame
      libavutil      56. 70.100 / 56. 70.100
      libavcodec     58.134.100 / 58.134.100
      libavformat    58. 76.100 / 58. 76.100
      libavdevice    58. 13.100 / 58. 13.100
      libavfilter     7.110.100 /  7.110.100
      libswscale      5.  9.100 /  5.  9.100
      libswresample   3.  9.100 /  3.  9.100

As you can see conf does have --enable-libmp3lame

Build Cmd:./ffmpeg-android-maker.sh --android-api-level=21 -lame

If I specify -acodec libmp3lame, then I get Unknown encoder 'libmp3lame' and when I simply don't mention codec manually, I get

Automatic encoder selection failed for output stream #0:0. Default encoder for format mp3 (codec mp3) is probably disabled. Please choose an encoder manually.
    Error selecting an encoder for stream 0:0

Instructions Followed to Build Static Executable: https://github.com/Javernaut/ffmpeg-android-maker/issues/49#issuecomment-871316847

Shabinder commented 3 years ago

I was Using --disable-everything and It seems to interfere , when I removed that it works fine

Shabinder commented 3 years ago

--enable-encoder=libmp3lame

Adding this did the trick.