Guest User

ffmpeg_arm_64

a guest
Jul 21st, 2018
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. #!/bin/bash
  2. #Change NDK to your Android NDK location
  3. NDK=/Desktop/ndk-bundle
  4. PLATFORM=$NDK/platforms/android-21/arch-arm64/
  5. PREBUILT=/home/osboxess/my_toolchains/arm64
  6.  
  7. GENERAL="\
  8. --enable-small \
  9. --enable-cross-compile \
  10. --extra-libs="-lgcc" \
  11. --arch=aarch64 \
  12. --cc=$PREBUILT/bin/aarch64-linux-android-gcc \
  13. --cross-prefix=$PREBUILT/bin/aarch64-linux-android- \
  14. --nm=$PREBUILT/bin/aarch64-linux-android-nm \
  15. --extra-cflags="-I../x264/android/arm64/include" \
  16. --extra-ldflags="-L../x264/android/arm64/lib" "
  17.  
  18. MODULES="\
  19. --enable-gpl \
  20. --enable-libx264"
  21.  
  22.  
  23.  
  24. function build_arm64
  25. {
  26. ./configure \
  27. --logfile=conflog.txt \
  28. --target-os=linux \
  29. --prefix=./android/arm64-v8a \
  30. ${GENERAL} \
  31. --sysroot=$PLATFORM \
  32. --extra-cflags="" \
  33. --extra-ldflags="-lx264 -Wl,-rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -nostdlib -lc -lm -ldl -llog" \
  34. --enable-shared \
  35. --disable-static \
  36. --disable-doc \
  37. --enable-zlib \
  38. ${MODULES}
  39.  
  40. make clean
  41. make
  42. make install
  43. }
  44.  
  45. build_arm64
  46.  
  47.  
  48. echo Android ARM64 builds finished
Add Comment
Please, Sign In to add comment