Custom codec

Building Custom FFmpeg library for MX Player:


      1. Linux or Cygwin or Mac.

      2. Android NDK (r20 for v1.21.0)

      3. FFmpeg source codes (can be downloaded from the download page)

Build Instructions:

      1. Extract the downloaded FFmpeg sources

      2. Open ffmpeg -> JNI folder

      3. Change CPU_CORE In and to match CPU core number of your building machine.

      4. If you would like to use your own FFmpeg build configuration, configs can be changed by editing

      5. Open Terminal.

      6. Change the working directory to ffmpeg/JNI directory.

      7. Create an environment variable NDK to point to your NDK path (e.g. export NDK=/usr/src/android-ndk-r20b)

      8. Run to build custom codec for all supported architectures

      9. If you would like to build custom codec for a particular architecture, then run both and with one of the following arguments.

        • arm64

        • neon

        • tegra3

        • tegra2

        • x86

        • x86_64

      10. On successful completion of the process, file will be generated on relevant subdirectories under the libs folder (e.g. ffmpeg/JNI/libs/arm64-v8a ).

Shipping custom codec.

Since 1.7.29, custom codec file naming convention is changed to the following format:<cpu-architecture-code>.<version-number>

CPU architecture code is one of the followings:

    • neon64

    • neon

    • tegra3

    • tegra2

    • x86

    • x86_64

Additional Notes:

    1. The version number will be similar to MX Player (e.g. 1.7.29, 1.7.30). However, sometimes MX Player will be upgraded without upgrading codec. So, Custom Codec version may not be exactly the same as the version of MX Player.

    2. If the codec is compressed in a .zip container, it's no longer required to be decompressed manually. MX Player itself extract codec file from .zip file when loading codec. Also, multiple codec files can be compressed on a single .zip file. MX Player loads correct codec from the file automatically.

    3. MX Player will recognize zipped codec files on SDCard root and Download directory automatically if the filename contains version code.

* This build instruction is applicable after version 1.13.0

* From version 1.7.6, file names are changed to, so forth to resolve conflict with system library files.

* From version 1.7.16, it generates single file;

* neon64 and x86_64 are supported since version 1.13.0