Kmp External Codec Libvlcjni.so Cpu Arm64-v8a 〈720p〉
System.loadLibrary("avcodec") System.loadLibrary("avformat") System.loadLibrary("vlcjni") Set environment variable for plugin path (if needed):
#!/bin/bash export ANDROID_NDK=/path/to/ndk export VLC_BUILD_DIR=build-arm64 ./compile.sh -a arm64 -l --release --enable-external-codecs --enable-mediacodec --enable-avcodec --enable-avformat
mediacodec: found decoder OMX.qcom.video.decoder.avc avcodec: using external libavcodec.so for H264 main: using video decoder module "mediacodec" If you see avcodec fallback, it’s working. To external codec over system one: kmp external codec libvlcjni.so cpu arm64-v8a
adb logcat | grep -E "avcodec|mediacodec|vlc" Expected output:
// In C++ init or via JNI setenv("VLC_PLUGIN_PATH", "/data/app/.../lib/arm64/plugins", 1) Check logs for successful external codec usage: System
To force loading from jniLibs :
val args = arrayOf( "--codec=mediacodec,avcodec", // try hardware first, then external FFmpeg "--avcodec-fast", "--avcodec-hw=any" ) val libVLC = LibVLC(this, args) val mediaPlayer = MediaPlayer(libVLC) // try hardware first
— Your VLC Android engineer