vxh.viet
5/23/2016 - 8:13 AM

How to fucking build FFmpeg using VPlayer?

How to fucking build FFmpeg using VPlayer?

Soure: GitHub

Question: How to fucking build FFmpeg using VPlayer?

Answer: For FFMPEG v3.0.2 and NDK r11c

  1. Install Ubuntu (16.04) in VirtualBox (building on Windows is a NIGHTMARE, don't even try)

  2. Download and uncompress Android NDK (v11c) to a folder in your home directory (/home/viet/Android in my case or ~/)

  3. Since the ffmpeg (v2.6) coming with VPlayer has an annoying text relocation issue, we will build ffmpeg from scratch (FFMPEG v3.0.2 and NDK r11c).

  4. Open a terminal in Ubuntu and do this:

sudo apt-get install autoconf autoconf-archive automake pkg-config git libtool

  1. Clone the project to your Desktop:

git clone https://github.com/matthewn4444/VPlayer_lib.git

  1. open the .bashrc under your home directory (/home/viet in my case), need to enable hidden file to see. Add the following at the top of the file (every single dash and slash need to be exactly like this so TRIPLE CHECK IT, I've already done the hard part so dont be lazy):
export NDK=~/Android/android-ndk-r11c
export PATH=$PATH:$NDK

You can check to see if this path is set correctly with echo $NDK.

  1. Go into the folder {root}/VPlayer_library/jni and edit Application.mk:
  • Modify APP_ABI for which architectures to build for (in this case we only build for armeabi, armeabi-v7a and x86).
  • Modify APP_PLATFORM for which platform to build with (if you use a higher number, it will choose the next lower version; e.g you choose android-10, it will choose android-9 if 10 doesn't exist) (in this case we use android-22).
  1. We may not have the permission to create new file/ directory during the build process so go to your Desktop or where you clone the VPlayer, open a Terminal and do this:

sudo chmod -R 0777 /home/viet/Desktop/VPlayer_lib

  1. Go into the folder {root]/ffmpeg_build and run config_and_build.sh once.
  • This will build with the newest toolchain from your NDK folder. If you want to use a specific version, modify it in the android_android.sh file.
  • If the build fails, you might want to run this again.
  • If the build succeeds and then if you want to build again, you only need to run build_android.sh (you do not need to configure again).
  1. The output of the files are in {root}/VPlayer_library/jni/ffmpeg-build/{arch}/libffmpeg.so

TO DO: Need update to custom build without subtitles.